diff --git a/packages/frontend/src/pages/settings/mute-block.vue b/packages/frontend/src/pages/settings/mute-block.vue
index a08308f0ce..577337868f 100644
--- a/packages/frontend/src/pages/settings/mute-block.vue
+++ b/packages/frontend/src/pages/settings/mute-block.vue
@@ -5,22 +5,60 @@
-
- {{ i18n.ts.noUsers }}
-
-
-
-
+
+
+
+
+
{{ i18n.ts.noUsers }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Muted at:
+
Period: {{ item.expiresAt.toLocaleString() }}
+
Period: {{ i18n.ts.indefinitely }}
+
+
+
-
- {{ i18n.ts.noUsers }}
-
-
-
-
+
+
+
+
+
{{ i18n.ts.noUsers }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Blocked at:
+
Period: {{ item.expiresAt.toLocaleString() }}
+
Period: {{ i18n.ts.indefinitely }}
+
+
+
@@ -36,6 +74,8 @@ import FormLink from '@/components/form/link.vue';
import { userPage } from '@/filters/user';
import { i18n } from '@/i18n';
import { definePageMetadata } from '@/scripts/page-metadata';
+import MkUserCardMini from '@/components/MkUserCardMini.vue';
+import * as os from '@/os';
let tab = $ref('mute');
@@ -49,6 +89,47 @@ const blockingPagination = {
limit: 10,
};
+let expandedMuteItems = $ref([]);
+let expandedBlockItems = $ref([]);
+
+async function unmute(user, ev) {
+ os.popupMenu([{
+ text: i18n.ts.unmute,
+ icon: 'ti ti-x',
+ action: async () => {
+ await os.apiWithDialog('mute/delete', { userId: user.id });
+ //role.users = role.users.filter(u => u.id !== user.id);
+ },
+ }], ev.currentTarget ?? ev.target);
+}
+
+async function unblock(user, ev) {
+ os.popupMenu([{
+ text: i18n.ts.unblock,
+ icon: 'ti ti-x',
+ action: async () => {
+ await os.apiWithDialog('blocking/delete', { userId: user.id });
+ //role.users = role.users.filter(u => u.id !== user.id);
+ },
+ }], ev.currentTarget ?? ev.target);
+}
+
+async function toggleMuteItem(item) {
+ if (expandedMuteItems.includes(item.id)) {
+ expandedMuteItems = expandedMuteItems.filter(x => x !== item.id);
+ } else {
+ expandedMuteItems.push(item.id);
+ }
+}
+
+async function toggleBlockItem(item) {
+ if (expandedBlockItems.includes(item.id)) {
+ expandedBlockItems = expandedBlockItems.filter(x => x !== item.id);
+ } else {
+ expandedBlockItems.push(item.id);
+ }
+}
+
const headerActions = $computed(() => []);
const headerTabs = $computed(() => []);
@@ -58,3 +139,43 @@ definePageMetadata({
icon: 'ti ti-ban',
});
+
+