This commit is contained in:
syuilo 2018-02-22 18:06:32 +09:00
parent f64a921575
commit eec84157a3
5 changed files with 28 additions and 12 deletions

View file

@ -5,8 +5,8 @@
</a> </a>
<div class="content-container"> <div class="content-container">
<div class="balloon"> <div class="balloon">
<p class="read" v-if="message.is_me && message.is_read">%i18n:common.tags.mk-messaging-message.is-read%</p> <p class="read" v-if="isMe && message.is_read">%i18n:common.tags.mk-messaging-message.is-read%</p>
<button class="delete-button" v-if="message.is_me" title="%i18n:common.delete%"> <button class="delete-button" v-if="isMe" title="%i18n:common.delete%">
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/> <img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
</button> </button>
<div class="content" v-if="!message.is_deleted"> <div class="content" v-if="!message.is_deleted">

View file

@ -20,6 +20,8 @@ import MkUser from './views/pages/user.vue';
import MkSelectDrive from './views/pages/selectdrive.vue'; import MkSelectDrive from './views/pages/selectdrive.vue';
import MkDrive from './views/pages/drive.vue'; import MkDrive from './views/pages/drive.vue';
import MkNotifications from './views/pages/notifications.vue'; import MkNotifications from './views/pages/notifications.vue';
import MkMessaging from './views/pages/messaging.vue';
import MkMessagingRoom from './views/pages/messaging-room.vue';
/** /**
* init * init
@ -49,6 +51,8 @@ init((launch) => {
{ path: '/', name: 'index', component: MkIndex }, { path: '/', name: 'index', component: MkIndex },
{ path: '/signup', name: 'signup', component: MkSignup }, { path: '/signup', name: 'signup', component: MkSignup },
{ path: '/i/notifications', component: MkNotifications }, { path: '/i/notifications', component: MkNotifications },
{ path: '/i/messaging', component: MkMessaging },
{ path: '/i/messaging/:username', component: MkMessagingRoom },
{ path: '/i/drive', component: MkDrive }, { path: '/i/drive', component: MkDrive },
{ path: '/i/drive/folder/:folder', component: MkDrive }, { path: '/i/drive/folder/:folder', component: MkDrive },
{ path: '/selectdrive', component: MkSelectDrive }, { path: '/selectdrive', component: MkSelectDrive },

View file

@ -14,6 +14,7 @@ import postDetail from './post-detail.vue';
import followButton from './follow-button.vue'; import followButton from './follow-button.vue';
import friendsMaker from './friends-maker.vue'; import friendsMaker from './friends-maker.vue';
import notifications from './notifications.vue'; import notifications from './notifications.vue';
import notificationPreview from './notification-preview.vue';
Vue.component('mk-ui', ui); Vue.component('mk-ui', ui);
Vue.component('mk-home', home); Vue.component('mk-home', home);
@ -29,3 +30,4 @@ Vue.component('mk-post-detail', postDetail);
Vue.component('mk-follow-button', followButton); Vue.component('mk-follow-button', followButton);
Vue.component('mk-friends-maker', friendsMaker); Vue.component('mk-friends-maker', friendsMaker);
Vue.component('mk-notifications', notifications); Vue.component('mk-notifications', notifications);
Vue.component('mk-notification-preview', notificationPreview);

View file

@ -17,15 +17,25 @@ export default Vue.extend({
user: null user: null
}; };
}, },
mounted() { watch: {
(this as any).api('users/show', { $route: 'fetch'
username: (this as any).$route.params.user },
}).then(user => { created() {
this.user = user; document.documentElement.style.background = '#fff';
this.fetching = false; this.fetch();
},
methods: {
fetch() {
this.fetching = true;
(this as any).api('users/show', {
username: (this as any).$route.params.username
}).then(user => {
this.user = user;
this.fetching = false;
document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${user.name} | Misskey`; document.title = `%i18n:mobile.tags.mk-messaging-room-page.message%: ${user.name} | Misskey`;
}); });
}
} }
}); });
</script> </script>

View file

@ -9,7 +9,8 @@
import Vue from 'vue'; import Vue from 'vue';
export default Vue.extend({ export default Vue.extend({
mounted() { mounted() {
document.title = 'Misskey | %i18n:mobile.tags.mk-messaging-page.message%'; document.title = 'Misskey %i18n:mobile.tags.mk-messaging-page.message%';
document.documentElement.style.background = '#fff';
}, },
methods: { methods: {
navigate(user) { navigate(user) {
@ -18,4 +19,3 @@ export default Vue.extend({
} }
}); });
</script> </script>