2018-02-15 21:19:23 -07:00
|
|
|
<template>
|
|
|
|
<mk-ui>
|
|
|
|
<span slot="header" v-if="!fetching">
|
|
|
|
<img :src="`${user.avatar_url}?thumbnail&size=64`" alt="">
|
|
|
|
{{ '%i18n:mobile.tags.mk-user-followers-page.followers-of%'.replace('{}', user.name) }}
|
|
|
|
</span>
|
|
|
|
<mk-user-followers 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-17 20:35:18 -07:00
|
|
|
(this as any).api('users/show', {
|
2018-02-15 21:19:23 -07:00
|
|
|
username: this.username
|
|
|
|
}).then(user => {
|
|
|
|
this.user = user;
|
2018-02-19 07:37:09 -07:00
|
|
|
this.fetching = false;
|
2018-02-15 21:19:23 -07:00
|
|
|
|
|
|
|
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>
|