misskey/src/client/app/desktop/views/components/settings.mute.vue
2018-04-06 01:36:34 +09:00

38 lines
773 B
Vue

<template>
<div>
<div class="none ui info" v-if="!fetching && users.length == 0">
<p>%fa:info-circle%%i18n:desktop.tags.mk-mute-setting.no-users%</p>
</div>
<div class="users" v-if="users.length != 0">
<div v-for="user in users" :key="user.id">
<p><b>{{ getUserName(user) }}</b> @{{ getAcct(user) }}</p>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import getAcct from '../../../../../acct/render';
import getUserName from '../../../../../renderers/get-user-name';
export default Vue.extend({
data() {
return {
fetching: true,
users: []
};
},
methods: {
getAcct,
getUserName
},
mounted() {
(this as any).api('mute/list').then(x => {
this.users = x.users;
this.fetching = false;
});
}
});
</script>