diff --git a/packages/frontend/src/components/MkEmojiEditDialog.vue b/packages/frontend/src/components/MkEmojiEditDialog.vue index 5490fed3ee..4e5fd70b6d 100644 --- a/packages/frontend/src/components/MkEmojiEditDialog.vue +++ b/packages/frontend/src/components/MkEmojiEditDialog.vue @@ -97,7 +97,6 @@ import { customEmojiCategories } from '@/custom-emojis.js'; import MkSwitch from '@/components/MkSwitch.vue'; import { selectFile, selectFiles } from '@/scripts/select-file.js'; import MkRolePreview from '@/components/MkRolePreview.vue'; -import { $i } from '@/account'; const props = defineProps<{ emoji?: any, @@ -117,6 +116,7 @@ let file = $ref(); let chooseFile: DriveFile|null = $ref(null); let draft = $ref(props.emoji ? props.emoji.draft : false); let isRequest = $ref(props.isRequest); +let url; watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => { rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null); @@ -242,8 +242,8 @@ async function done() { dialog.close(); } else { const created = isRequest - ? await os.apiWithDialog('admin/emoji/add-draft', params) - : await os.apiWithDialog('admin/emoji/add', params); + ? await os.apiWithDialog('admin/emoji/add-draft', params) + : await os.apiWithDialog('admin/emoji/add', params); emit('done', { created: created, diff --git a/packages/frontend/src/pages/about.emojis.vue b/packages/frontend/src/pages/about.emojis.vue index 68b5a2c9f5..f76e5779f3 100644 --- a/packages/frontend/src/pages/about.emojis.vue +++ b/packages/frontend/src/pages/about.emojis.vue @@ -85,19 +85,11 @@ const headerTabs = $computed(() => [{ }]); const filteredCategories = computed(() => { return customEmojiCategories.value.filter((category: any) => { - return customEmojis.value.some((e: any) => e.category === category && !e.draft); + return customEmojis.value.some((em: any) => em.category === category && !em.draft); }); }); definePageMetadata(ref({})); -const pagination = { - endpoint: 'admin/emoji/list' as const, - limit: 30, - params: computed(() => ({ - query: (query.value && query.value !== '') ? query.value : null, - })), -}; - let q = $ref(''); let searchEmojis = $ref(null); let selectedTags = $ref(new Set()); diff --git a/packages/frontend/src/pages/admin/roles.editor.vue b/packages/frontend/src/pages/admin/roles.editor.vue index 4583387126..48f2f10695 100644 --- a/packages/frontend/src/pages/admin/roles.editor.vue +++ b/packages/frontend/src/pages/admin/roles.editor.vue @@ -273,7 +273,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -293,7 +293,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + @@ -313,7 +313,7 @@ SPDX-License-Identifier: AGPL-3.0-only - + diff --git a/packages/frontend/src/pages/emojis.emoji.vue b/packages/frontend/src/pages/emojis.emoji.vue index 5926bc365e..6cd7b1bbb0 100644 --- a/packages/frontend/src/pages/emojis.emoji.vue +++ b/packages/frontend/src/pages/emojis.emoji.vue @@ -7,14 +7,14 @@ SPDX-License-Identifier: AGPL-3.0-only