2018-10-30 19:16:13 -07:00
|
|
|
<template>
|
|
|
|
<ui-card>
|
2018-11-05 08:40:11 -08:00
|
|
|
<div slot="title"><fa icon="ban"/> %i18n:@mute-and-block%</div>
|
2018-10-30 19:16:13 -07:00
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@mute%</header>
|
2018-10-31 02:07:00 -07:00
|
|
|
<ui-info v-if="!muteFetching && mute.length == 0">%i18n:@no-muted-users%</ui-info>
|
2018-10-30 19:16:13 -07:00
|
|
|
<div class="users" v-if="mute.length != 0">
|
|
|
|
<div v-for="user in mute" :key="user.id">
|
|
|
|
<p><b>{{ user | userName }}</b> @{{ user | acct }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section>
|
|
|
|
<header>%i18n:@block%</header>
|
2018-10-31 02:07:00 -07:00
|
|
|
<ui-info v-if="!blockFetching && block.length == 0">%i18n:@no-blocked-users%</ui-info>
|
2018-10-30 19:16:13 -07:00
|
|
|
<div class="users" v-if="block.length != 0">
|
|
|
|
<div v-for="user in block" :key="user.id">
|
|
|
|
<p><b>{{ user | userName }}</b> @{{ user | acct }}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</ui-card>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
|
|
|
|
export default Vue.extend({
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
muteFetching: true,
|
|
|
|
blockFetching: true,
|
|
|
|
mute: [],
|
|
|
|
block: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
(this as any).api('mute/list').then(mute => {
|
|
|
|
this.mute = mute.map(x => x.mutee);
|
|
|
|
this.muteFetching = false;
|
|
|
|
});
|
|
|
|
|
|
|
|
(this as any).api('blocking/list').then(blocking => {
|
|
|
|
this.block = blocking.map(x => x.blockee);
|
|
|
|
this.blockFetching = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|