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

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

View file

@ -17,15 +17,25 @@ export default Vue.extend({
user: null
};
},
mounted() {
(this as any).api('users/show', {
username: (this as any).$route.params.user
}).then(user => {
this.user = user;
this.fetching = false;
watch: {
$route: 'fetch'
},
created() {
document.documentElement.style.background = '#fff';
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>

View file

@ -9,7 +9,8 @@
import Vue from 'vue';
export default Vue.extend({
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: {
navigate(user) {
@ -18,4 +19,3 @@ export default Vue.extend({
}
});
</script>