Skip to content

Commit

Permalink
enhance(frontend): tweak ui
Browse files Browse the repository at this point in the history
  • Loading branch information
syuilo committed Oct 4, 2023
1 parent 0dbf517 commit 89e4f28
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 37 deletions.
10 changes: 0 additions & 10 deletions packages/frontend/src/pages/settings/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -139,21 +139,11 @@ const menuDef = computed(() => [{
text: i18n.ts.roles,
to: '/settings/roles',
active: currentPage?.route.name === 'roles',
}, {
icon: 'ti ti-planet-off',
text: i18n.ts.instanceMute,
to: '/settings/instance-mute',
active: currentPage?.route.name === 'instance-mute',
}, {
icon: 'ti ti-ban',
text: i18n.ts.muteAndBlock,
to: '/settings/mute-block',
active: currentPage?.route.name === 'mute-block',
}, {
icon: 'ti ti-message-off',
text: i18n.ts.wordMute,
to: '/settings/word-mute',
active: currentPage?.route.name === 'word-mute',
}, {
icon: 'ti ti-api',
text: 'API',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import MkButton from '@/components/MkButton.vue';
import * as os from '@/os.js';
import { $i } from '@/account.js';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';

const instanceMutes = ref($i!.mutedInstances.join('\n'));
const changed = ref(false);
Expand All @@ -46,13 +45,4 @@ async function save() {
watch(instanceMutes, () => {
changed.value = true;
});

const headerActions = $computed(() => []);

const headerTabs = $computed(() => []);

definePageMetadata({
title: i18n.ts.instanceMute,
icon: 'ti ti-planet-off',
});
</script>
16 changes: 16 additions & 0 deletions packages/frontend/src/pages/settings/mute-block.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ SPDX-License-Identifier: AGPL-3.0-only

<template>
<div class="_gaps_m">
<MkFolder>
<template #icon><i class="ti ti-message-off"></i></template>
<template #label>{{ i18n.ts.wordMute }}</template>

<XWordMute/>
</MkFolder>

<MkFolder>
<template #icon><i class="ti ti-planet-off"></i></template>
<template #label>{{ i18n.ts.instanceMute }}</template>

<XInstanceMute/>
</MkFolder>

<MkFolder>
<template #icon><i class="ti ti-repeat-off"></i></template>
<template #label>{{ i18n.ts.mutedUsers }} ({{ i18n.ts.renote }})</template>
Expand Down Expand Up @@ -106,6 +120,8 @@ SPDX-License-Identifier: AGPL-3.0-only

<script lang="ts" setup>
import { } from 'vue';
import XInstanceMute from './mute-block.instance-mute.vue';
import XWordMute from './mute-block.word-mute.vue';
import MkPagination from '@/components/MkPagination.vue';
import { userPage } from '@/filters/user.js';
import { i18n } from '@/i18n.js';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,4 @@ async function save() {

changed.value = false;
}

const headerActions = $computed(() => []);

const headerTabs = $computed(() => []);

definePageMetadata({
title: i18n.ts.wordMute,
icon: 'ti ti-message-off',
});
</script>
8 changes: 0 additions & 8 deletions packages/frontend/src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,10 @@ export const routes = [{
path: '/import-export',
name: 'import-export',
component: page(() => import('./pages/settings/import-export.vue')),
}, {
path: '/instance-mute',
name: 'instance-mute',
component: page(() => import('./pages/settings/instance-mute.vue')),
}, {
path: '/mute-block',
name: 'mute-block',
component: page(() => import('./pages/settings/mute-block.vue')),
}, {
path: '/word-mute',
name: 'word-mute',
component: page(() => import('./pages/settings/word-mute.vue')),
}, {
path: '/api',
name: 'api',
Expand Down

0 comments on commit 89e4f28

Please sign in to comment.