1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-26 04:28:28 +09:00
misskey/src/web/app/mobile/views/pages/following.vue

43 lines
941 B
Vue
Raw Normal View History

2018-02-16 13:19:23 +09:00
<template>
<mk-ui>
<span slot="header" v-if="!fetching">
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt="">
{{ '%i18n:mobile.tags.mk-user-following-page.following-of'.replace('{}', user.name) }}
</span>
<mk-user-following v-if="!fetching" :user="user" @loaded="onLoaded"/>
</mk-ui>
</template>
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
export default Vue.extend({
props: ['username'],
data() {
return {
fetching: true,
user: null
};
},
mounted() {
Progress.start();
2018-02-18 12:35:18 +09:00
(this as any).api('users/show', {
2018-02-16 13:19:23 +09:00
username: this.username
}).then(user => {
this.fetching = false;
this.user = user;
document.title = '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) + ' | Misskey';
document.documentElement.style.background = '#313a42';
});
},
methods: {
onLoaded() {
Progress.done();
}
}
});
</script>