diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts index f3e0c1ef1f..35460a2e16 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/list-remote.ts @@ -24,39 +24,7 @@ export const meta = { optional: false, nullable: false, items: { type: 'object', - optional: false, nullable: false, - properties: { - id: { - type: 'string', - optional: false, nullable: false, - format: 'id', - }, - aliases: { - type: 'array', - optional: false, nullable: false, - items: { - type: 'string', - optional: false, nullable: false, - }, - }, - name: { - type: 'string', - optional: false, nullable: false, - }, - category: { - type: 'string', - optional: false, nullable: true, - }, - host: { - type: 'string', - optional: false, nullable: true, - description: 'The local host is represented with `null`.', - }, - url: { - type: 'string', - optional: false, nullable: false, - }, - }, + ref: 'EmojiDetailed', }, }, } as const; diff --git a/packages/frontend/src/pages/admin/custom-emojis-grid.impl.ts b/packages/frontend/src/pages/admin/custom-emojis-grid.impl.ts index 24bbdb3f62..89e2dee93c 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-grid.impl.ts +++ b/packages/frontend/src/pages/admin/custom-emojis-grid.impl.ts @@ -8,13 +8,12 @@ export type RegisterLogItem = { }; export type GridItem = { - readonly id?: string; - readonly fileId?: string; - readonly url: string; - - deleteCheck: boolean; - + checked: boolean; + id?: string; + fileId?: string; + url: string; name: string; + host: string; category: string; aliases: string; license: string; @@ -25,11 +24,12 @@ export type GridItem = { export function fromEmojiDetailed(it: Misskey.entities.EmojiDetailed): GridItem { return { + checked: false, id: it.id, fileId: undefined, url: it.url, - deleteCheck: false, name: it.name, + host: it.host ?? '', category: it.category ?? '', aliases: it.aliases.join(', '), license: it.license ?? '', @@ -41,11 +41,12 @@ export function fromEmojiDetailed(it: Misskey.entities.EmojiDetailed): GridItem export function fromDriveFile(it: Misskey.entities.DriveFile): GridItem { return { + checked: false, id: undefined, fileId: it.id, url: it.url, - deleteCheck: false, name: it.name.replace(/(\.[a-zA-Z0-9]+)+$/, ''), + host: '', category: '', aliases: '', license: '', diff --git a/packages/frontend/src/pages/admin/custom-emojis-grid.list.vue b/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue similarity index 67% rename from packages/frontend/src/pages/admin/custom-emojis-grid.list.vue rename to packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue index 051c5822ed..0edd313ba4 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-grid.list.vue +++ b/packages/frontend/src/pages/admin/custom-emojis-grid.local.list.vue @@ -1,27 +1,33 @@ + + + + + + diff --git a/packages/frontend/src/pages/admin/custom-emojis-grid.remote.vue b/packages/frontend/src/pages/admin/custom-emojis-grid.remote.vue new file mode 100644 index 0000000000..6d8ca316ea --- /dev/null +++ b/packages/frontend/src/pages/admin/custom-emojis-grid.remote.vue @@ -0,0 +1,245 @@ + + + + + + + diff --git a/packages/frontend/src/pages/admin/custom-emojis-grid.vue b/packages/frontend/src/pages/admin/custom-emojis-grid.vue index b0e6e46ddc..84087b9be9 100644 --- a/packages/frontend/src/pages/admin/custom-emojis-grid.vue +++ b/packages/frontend/src/pages/admin/custom-emojis-grid.vue @@ -4,74 +4,22 @@ -
- - - - - -
- - -
-
+ +