paricafe/src/client/app/desktop/views/components/settings.mute.vue

38 lines
773 B
Vue
Raw Normal View History

2018-02-12 08:48:01 -06:00
<template>
2018-02-21 10:25:57 -06:00
<div>
2018-02-12 08:48:01 -06:00
<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">
2018-04-05 11:36:34 -05:00
<p><b>{{ getUserName(user) }}</b> @{{ getAcct(user) }}</p>
2018-02-12 08:48:01 -06:00
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
2018-04-01 23:44:32 -05:00
import getAcct from '../../../../../acct/render';
2018-04-05 11:36:34 -05:00
import getUserName from '../../../../../renderers/get-user-name';
2018-02-12 08:48:01 -06:00
export default Vue.extend({
data() {
return {
fetching: true,
2018-02-21 10:25:57 -06:00
users: []
2018-02-12 08:48:01 -06:00
};
},
2018-03-27 02:51:12 -05:00
methods: {
2018-04-05 11:36:34 -05:00
getAcct,
getUserName
2018-03-27 02:51:12 -05:00
},
2018-02-12 08:48:01 -06:00
mounted() {
2018-02-17 21:35:18 -06:00
(this as any).api('mute/list').then(x => {
2018-02-12 08:48:01 -06:00
this.users = x.users;
2018-02-19 08:37:09 -06:00
this.fetching = false;
2018-02-12 08:48:01 -06:00
});
}
});
</script>