add route

This commit is contained in:
samunohito 2024-02-18 10:04:39 +09:00
parent 5e64974539
commit 1cdf1bf4c9
9 changed files with 19 additions and 18 deletions

View File

@ -142,7 +142,7 @@ import {
emptyStrToNull,
emptyStrToUndefined,
RequestLogItem,
} from '@/pages/admin/custom-emojis-grid.impl.js';
} from '@/pages/admin/custom-emojis-manager.impl.js';
import MkGrid from '@/components/grid/MkGrid.vue';
import { i18n } from '@/i18n.js';
import MkInput from '@/components/MkInput.vue';
@ -158,7 +158,7 @@ import {
import { optInGridUtils } from '@/components/grid/optin-utils.js';
import { misskeyApi } from '@/scripts/misskey-api.js';
import MkPagingButtons from '@/components/MkPagingButtons.vue';
import XRegisterLogs from '@/pages/admin/custom-emojis-grid.local.logs.vue';
import XRegisterLogs from '@/pages/admin/custom-emojis-manager.local.logs.vue';
import MkFolder from '@/components/MkFolder.vue';
import MkSelect from '@/components/MkSelect.vue';
import { deviceKind } from '@/scripts/device-kind.js';

View File

@ -26,7 +26,7 @@
<script setup lang="ts">
import { computed, ref, toRefs } from 'vue';
import { RequestLogItem } from '@/pages/admin/custom-emojis-grid.impl.js';
import { RequestLogItem } from '@/pages/admin/custom-emojis-manager.impl.js';
import {
GridContext,
GridEvent,

View File

@ -75,7 +75,7 @@
import * as Misskey from 'misskey-js';
import { onMounted, ref } from 'vue';
import { misskeyApi } from '@/scripts/misskey-api.js';
import { emptyStrToEmptyArray, emptyStrToNull, RequestLogItem } from '@/pages/admin/custom-emojis-grid.impl.js';
import { emptyStrToEmptyArray, emptyStrToNull, RequestLogItem } from '@/pages/admin/custom-emojis-manager.impl.js';
import MkGrid from '@/components/grid/MkGrid.vue';
import { i18n } from '@/i18n.js';
import MkSelect from '@/components/MkSelect.vue';
@ -96,7 +96,7 @@ import {
} from '@/components/grid/grid-event.js';
import { DroppedFile, extractDroppedItems, flattenDroppedFiles } from '@/scripts/file-drop.js';
import { optInGridUtils } from '@/components/grid/optin-utils.js';
import XRegisterLogs from '@/pages/admin/custom-emojis-grid.local.logs.vue';
import XRegisterLogs from '@/pages/admin/custom-emojis-manager.local.logs.vue';
import { GridSetting } from '@/components/grid/grid.js';
const MAXIMUM_EMOJI_REGISTER_COUNT = 100;

View File

@ -15,8 +15,8 @@
<script setup lang="ts">
import { ref } from 'vue';
import MkTab from '@/components/MkTab.vue';
import XListComponent from '@/pages/admin/custom-emojis-grid.local.list.vue';
import XRegisterComponent from '@/pages/admin/custom-emojis-grid.local.register.vue';
import XListComponent from '@/pages/admin/custom-emojis-manager.local.list.vue';
import XRegisterComponent from '@/pages/admin/custom-emojis-manager.local.register.vue';
type PageMode = 'list' | 'register';

View File

@ -3,11 +3,11 @@
<div :class="$style.searchArea">
<MkInput v-model="query" :debounce="true" type="search" autocapitalize="off" style="flex: 1">
<template #prefix><i class="ti ti-search"></i></template>
<template #label>絵文字名</template>
<template #label>name</template>
</MkInput>
<MkInput v-model="host" :debounce="true" type="search" autocapitalize="off" style="flex: 1">
<template #prefix><i class="ti ti-cloud-network"></i></template>
<template #label>ホスト名</template>
<template #label>host</template>
</MkInput>
<MkButton primary style="margin-left: auto;" @click="onSearchButtonClicked">
{{ i18n.ts.search }}
@ -51,11 +51,11 @@ import { i18n } from '@/i18n.js';
import MkButton from '@/components/MkButton.vue';
import MkInput from '@/components/MkInput.vue';
import MkGrid from '@/components/grid/MkGrid.vue';
import { RequestLogItem } from '@/pages/admin/custom-emojis-grid.impl.js';
import { RequestLogItem } from '@/pages/admin/custom-emojis-manager.impl.js';
import { GridCellValueChangeEvent, GridContext, GridEvent, GridKeyDownEvent } from '@/components/grid/grid-event.js';
import { optInGridUtils } from '@/components/grid/optin-utils.js';
import MkFolder from '@/components/MkFolder.vue';
import XRegisterLogs from '@/pages/admin/custom-emojis-grid.local.logs.vue';
import XRegisterLogs from '@/pages/admin/custom-emojis-manager.local.logs.vue';
import * as os from '@/os.js';
import { GridSetting } from '@/components/grid/grid.js';

View File

@ -14,8 +14,8 @@
import { computed, ref } from 'vue';
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import XGridLocalComponent from '@/pages/admin/custom-emojis-grid.local.vue';
import XGridRemoteComponent from '@/pages/admin/custom-emojis-grid.remote.vue';
import XGridLocalComponent from '@/pages/admin/custom-emojis-manager.local.vue';
import XGridRemoteComponent from '@/pages/admin/custom-emojis-manager.remote.vue';
import MkPageHeader from '@/components/global/MkPageHeader.vue';
import MkStickyContainer from '@/components/global/MkStickyContainer.vue';

View File

@ -116,6 +116,11 @@ const menuDef = computed(() => [{
text: i18n.ts.customEmojis,
to: '/admin/emojis',
active: currentPage.value?.route.name === 'emojis',
}, {
icon: 'ti ti-icons',
text: i18n.ts.customEmojis + '(beta)',
to: '/admin/emojis2',
active: currentPage.value?.route.name === 'emojis2',
}, {
icon: 'ti ti-sparkles',
text: i18n.ts.avatarDecorations,

View File

@ -20,10 +20,6 @@ const page = (loader: AsyncComponentLoader<any>) => defineAsyncComponent({
const routes: RouteDef[] = [{
path: '/@:initUser/pages/:initPageName/view-source',
component: page(() => import('@/pages/page-editor/page-editor.vue')),
}, {
path: '/emojis2',
name: 'emojis2',
component: page(() => import('@/pages/admin/custom-emojis-grid.vue')),
}, {
path: '/@:username/pages/:pageName',
component: page(() => import('@/pages/page.vue')),
@ -368,7 +364,7 @@ const routes: RouteDef[] = [{
}, {
path: '/emojis2',
name: 'emojis2',
component: page(() => import('@/pages/admin/custom-emojis-grid.vue')),
component: page(() => import('@/pages/admin/custom-emojis-manager2.vue')),
}, {
path: '/avatar-decorations',
name: 'avatarDecorations',