2020-10-17 20:12:00 +09:00
|
|
|
<template>
|
2023-04-08 09:01:42 +09:00
|
|
|
<div class="_formRoot">
|
|
|
|
<MkTab v-model="tab" style="margin-bottom: var(--margin)">
|
|
|
|
<option value="mute">{{ i18n.ts.mutedUsers }}</option>
|
|
|
|
<option value="block">{{ i18n.ts.blockedUsers }}</option>
|
|
|
|
</MkTab>
|
|
|
|
<div v-if="tab === 'mute'">
|
|
|
|
<MkPagination :pagination="mutingPagination" class="muting">
|
|
|
|
<template #empty
|
|
|
|
><FormInfo>{{ i18n.ts.noUsers }}</FormInfo></template
|
|
|
|
>
|
|
|
|
<template #default="{ items }">
|
|
|
|
<FormLink
|
|
|
|
v-for="mute in items"
|
|
|
|
:key="mute.id"
|
|
|
|
:to="userPage(mute.mutee)"
|
|
|
|
>
|
|
|
|
<MkAcct :user="mute.mutee" />
|
|
|
|
</FormLink>
|
|
|
|
</template>
|
|
|
|
</MkPagination>
|
|
|
|
</div>
|
|
|
|
<div v-if="tab === 'block'">
|
|
|
|
<MkPagination :pagination="blockingPagination" class="blocking">
|
|
|
|
<template #empty
|
|
|
|
><FormInfo>{{ i18n.ts.noUsers }}</FormInfo></template
|
|
|
|
>
|
|
|
|
<template #default="{ items }">
|
|
|
|
<FormLink
|
|
|
|
v-for="block in items"
|
|
|
|
:key="block.id"
|
|
|
|
:to="userPage(block.blockee)"
|
|
|
|
>
|
|
|
|
<MkAcct :user="block.blockee" />
|
|
|
|
</FormLink>
|
|
|
|
</template>
|
|
|
|
</MkPagination>
|
|
|
|
</div>
|
2020-10-17 20:12:00 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
2022-01-15 17:58:35 +09:00
|
|
|
<script lang="ts" setup>
|
2023-04-08 09:01:42 +09:00
|
|
|
import {} from "vue";
|
|
|
|
import MkPagination from "@/components/MkPagination.vue";
|
|
|
|
import MkTab from "@/components/MkTab.vue";
|
|
|
|
import FormInfo from "@/components/MkInfo.vue";
|
|
|
|
import FormLink from "@/components/form/link.vue";
|
|
|
|
import { userPage } from "@/filters/user";
|
|
|
|
import * as os from "@/os";
|
|
|
|
import { i18n } from "@/i18n";
|
|
|
|
import { definePageMetadata } from "@/scripts/page-metadata";
|
2020-10-17 20:12:00 +09:00
|
|
|
|
2023-04-08 09:01:42 +09:00
|
|
|
let tab = $ref("mute");
|
2020-10-17 20:12:00 +09:00
|
|
|
|
2022-01-15 17:58:35 +09:00
|
|
|
const mutingPagination = {
|
2023-04-08 09:01:42 +09:00
|
|
|
endpoint: "mute/list" as const,
|
2022-01-15 17:58:35 +09:00
|
|
|
limit: 10,
|
|
|
|
};
|
2020-10-17 20:12:00 +09:00
|
|
|
|
2022-01-15 17:58:35 +09:00
|
|
|
const blockingPagination = {
|
2023-04-08 09:01:42 +09:00
|
|
|
endpoint: "blocking/list" as const,
|
2022-01-15 17:58:35 +09:00
|
|
|
limit: 10,
|
|
|
|
};
|
2020-10-17 20:12:00 +09:00
|
|
|
|
2022-06-20 17:38:49 +09:00
|
|
|
const headerActions = $computed(() => []);
|
|
|
|
|
|
|
|
const headerTabs = $computed(() => []);
|
|
|
|
|
|
|
|
definePageMetadata({
|
|
|
|
title: i18n.ts.muteAndBlock,
|
2023-04-08 09:01:42 +09:00
|
|
|
icon: "ph-prohibit ph-bold ph-lg",
|
2020-10-17 20:12:00 +09:00
|
|
|
});
|
|
|
|
</script>
|