2018-10-30 19:16:13 -07:00
|
|
|
<template>
|
|
|
|
<ui-card>
|
2018-11-08 10:44:35 -08:00
|
|
|
<div slot="title"><fa icon="ban"/> {{ $t('mute-and-block') }}</div>
|
2018-10-30 19:16:13 -07:00
|
|
|
|
|
|
|
<section>
|
2018-11-08 10:44:35 -08:00
|
|
|
<header>{{ $t('mute') }}</header>
|
|
|
|
<ui-info v-if="!muteFetching && mute.length == 0">{{ $t('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>
|
2018-11-08 10:44:35 -08:00
|
|
|
<header>{{ $t('block') }}</header>
|
|
|
|
<ui-info v-if="!blockFetching && block.length == 0">{{ $t('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';
|
2018-11-08 10:44:35 -08:00
|
|
|
import i18n from '../../../i18n';
|
2018-10-30 19:16:13 -07:00
|
|
|
|
|
|
|
export default Vue.extend({
|
2018-11-08 10:44:35 -08:00
|
|
|
i18n: i18n('common/views/components/mute-and-block.vue'),
|
2018-10-30 19:16:13 -07:00
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
muteFetching: true,
|
|
|
|
blockFetching: true,
|
|
|
|
mute: [],
|
|
|
|
block: []
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
2018-11-08 15:13:34 -08:00
|
|
|
this.$root.api('mute/list').then(mute => {
|
2018-10-30 19:16:13 -07:00
|
|
|
this.mute = mute.map(x => x.mutee);
|
|
|
|
this.muteFetching = false;
|
|
|
|
});
|
|
|
|
|
2018-11-08 15:13:34 -08:00
|
|
|
this.$root.api('blocking/list').then(blocking => {
|
2018-10-30 19:16:13 -07:00
|
|
|
this.block = blocking.map(x => x.blockee);
|
|
|
|
this.blockFetching = false;
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|