From 335c6a8ed054ec6dab98b515ef7025531506d392 Mon Sep 17 00:00:00 2001 From: NoriDev Date: Fri, 24 Nov 2023 16:36:41 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EB=A6=AC=EB=AA=A8=ED=8A=B8=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=EC=9D=98=20=EC=9D=B4=EB=AA=A8=EC=A7=80=EB=A5=BC=20?= =?UTF-8?q?=EC=A6=89=EC=8B=9C=20=EA=B0=80=EC=A0=B8=EC=98=AC=20=EC=88=98=20?= =?UTF-8?q?=EC=9E=88=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_CHERRYPICK.md | 1 + .../backend/src/server/api/EndpointsModule.ts | 8 +++---- packages/backend/src/server/api/endpoints.ts | 4 ++-- .../server/api/endpoints/admin/emoji/steal.ts | 2 +- packages/cherrypick-js/src/api.types.ts | 2 +- .../src/components/global/MkCustomEmoji.vue | 21 ++++++++++--------- 6 files changed, 20 insertions(+), 18 deletions(-) diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md index e83ce75d7c..b5f098eb52 100644 --- a/CHANGELOG_CHERRYPICK.md +++ b/CHANGELOG_CHERRYPICK.md @@ -37,6 +37,7 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2023xx](CHANGE - Revert: 사용자 통계 표시 기능 제거 ([MisskeyIO/misskey@114c7fe](https://github.com/MisskeyIO/misskey/commit/114c7fe6b37dd6bddbcd9d92406f8b13bf688e8b)) ### Client +- Feat: 리모트 서버의 이모지를 즉시 가져올 수 있음 ([pikokr/cherrypicnic@03d536c](https://github.com/pikokr/cherrypicnic/commit/03d536c00212f2dfbebecf75e5d58e0ddb749444), [pikokr/cherrypicnic@8a2d6f3](https://github.com/pikokr/cherrypicnic/commit/8a2d6f3b518fc13a6c32364780fba3be5eea3e5d)) - Enhance: 사운드 설정을 저장할 때 확실하게 표시하도록 - Fix: '모달 배경색 제거' 옵션이 이모지 피커에 반영되지 않음 - Fix: 열람 주의로 설정된 노트의 반응이 더 보기를 눌러야 표시됨 diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index cd1b7c40d8..ae10d06144 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -39,7 +39,6 @@ import * as ep___admin_emoji_addAliasesBulk from './endpoints/admin/emoji/add-al import * as ep___admin_emoji_add from './endpoints/admin/emoji/add.js'; import * as ep___admin_emoji_adds from './endpoints/admin/emoji/adds.js'; import * as ep___admin_emoji_copy from './endpoints/admin/emoji/copy.js'; -import * as ep___admin_emoji_steal from './endpoints/admin/emoji/steal.js'; import * as ep___admin_emoji_deleteBulk from './endpoints/admin/emoji/delete-bulk.js'; import * as ep___admin_emoji_delete from './endpoints/admin/emoji/delete.js'; import * as ep___admin_emoji_importZip from './endpoints/admin/emoji/import-zip.js'; @@ -49,6 +48,7 @@ import * as ep___admin_emoji_removeAliasesBulk from './endpoints/admin/emoji/rem import * as ep___admin_emoji_setAliasesBulk from './endpoints/admin/emoji/set-aliases-bulk.js'; import * as ep___admin_emoji_setCategoryBulk from './endpoints/admin/emoji/set-category-bulk.js'; import * as ep___admin_emoji_setLicenseBulk from './endpoints/admin/emoji/set-license-bulk.js'; +import * as ep___admin_emoji_steal from './endpoints/admin/emoji/steal.js'; import * as ep___admin_emoji_update from './endpoints/admin/emoji/update.js'; import * as ep___admin_federation_deleteAllFiles from './endpoints/admin/federation/delete-all-files.js'; import * as ep___admin_federation_refreshRemoteInstanceMetadata from './endpoints/admin/federation/refresh-remote-instance-metadata.js'; @@ -431,7 +431,6 @@ const $admin_emoji_addAliasesBulk: Provider = { provide: 'ep:admin/emoji/add-ali const $admin_emoji_add: Provider = { provide: 'ep:admin/emoji/add', useClass: ep___admin_emoji_add.default }; const $admin_emoji_adds: Provider = { provide: 'ep:admin/emoji/adds', useClass: ep___admin_emoji_adds.default }; const $admin_emoji_copy: Provider = { provide: 'ep:admin/emoji/copy', useClass: ep___admin_emoji_copy.default }; -const $admin_emoji_steal: Provider = { provide: 'ep:admin/emoji/steal', useClass: ep___admin_emoji_steal.default }; const $admin_emoji_deleteBulk: Provider = { provide: 'ep:admin/emoji/delete-bulk', useClass: ep___admin_emoji_deleteBulk.default }; const $admin_emoji_delete: Provider = { provide: 'ep:admin/emoji/delete', useClass: ep___admin_emoji_delete.default }; const $admin_emoji_importZip: Provider = { provide: 'ep:admin/emoji/import-zip', useClass: ep___admin_emoji_importZip.default }; @@ -441,6 +440,7 @@ const $admin_emoji_removeAliasesBulk: Provider = { provide: 'ep:admin/emoji/remo const $admin_emoji_setAliasesBulk: Provider = { provide: 'ep:admin/emoji/set-aliases-bulk', useClass: ep___admin_emoji_setAliasesBulk.default }; const $admin_emoji_setCategoryBulk: Provider = { provide: 'ep:admin/emoji/set-category-bulk', useClass: ep___admin_emoji_setCategoryBulk.default }; const $admin_emoji_setLicenseBulk: Provider = { provide: 'ep:admin/emoji/set-license-bulk', useClass: ep___admin_emoji_setLicenseBulk.default }; +const $admin_emoji_steal: Provider = { provide: 'ep:admin/emoji/steal', useClass: ep___admin_emoji_steal.default }; const $admin_emoji_update: Provider = { provide: 'ep:admin/emoji/update', useClass: ep___admin_emoji_update.default }; const $admin_federation_deleteAllFiles: Provider = { provide: 'ep:admin/federation/delete-all-files', useClass: ep___admin_federation_deleteAllFiles.default }; const $admin_federation_refreshRemoteInstanceMetadata: Provider = { provide: 'ep:admin/federation/refresh-remote-instance-metadata', useClass: ep___admin_federation_refreshRemoteInstanceMetadata.default }; @@ -828,7 +828,6 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_emoji_add, $admin_emoji_adds, $admin_emoji_copy, - $admin_emoji_steal, $admin_emoji_deleteBulk, $admin_emoji_delete, $admin_emoji_importZip, @@ -838,6 +837,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_emoji_setAliasesBulk, $admin_emoji_setCategoryBulk, $admin_emoji_setLicenseBulk, + $admin_emoji_steal, $admin_emoji_update, $admin_federation_deleteAllFiles, $admin_federation_refreshRemoteInstanceMetadata, @@ -1218,7 +1218,6 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_emoji_add, $admin_emoji_adds, $admin_emoji_copy, - $admin_emoji_steal, $admin_emoji_deleteBulk, $admin_emoji_delete, $admin_emoji_importZip, @@ -1228,6 +1227,7 @@ const $retention: Provider = { provide: 'ep:retention', useClass: ep___retention $admin_emoji_setAliasesBulk, $admin_emoji_setCategoryBulk, $admin_emoji_setLicenseBulk, + $admin_emoji_steal, $admin_emoji_update, $admin_federation_deleteAllFiles, $admin_federation_refreshRemoteInstanceMetadata, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index 23c5c56c2f..e322a89d95 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -38,7 +38,6 @@ import * as ep___admin_emoji_addAliasesBulk from './endpoints/admin/emoji/add-al import * as ep___admin_emoji_add from './endpoints/admin/emoji/add.js'; import * as ep___admin_emoji_adds from './endpoints/admin/emoji/adds.js'; import * as ep___admin_emoji_copy from './endpoints/admin/emoji/copy.js'; -import * as ep___admin_emoji_steal from './endpoints/admin/emoji/steal.js'; import * as ep___admin_emoji_deleteBulk from './endpoints/admin/emoji/delete-bulk.js'; import * as ep___admin_emoji_delete from './endpoints/admin/emoji/delete.js'; import * as ep___admin_emoji_importZip from './endpoints/admin/emoji/import-zip.js'; @@ -48,6 +47,7 @@ import * as ep___admin_emoji_removeAliasesBulk from './endpoints/admin/emoji/rem import * as ep___admin_emoji_setAliasesBulk from './endpoints/admin/emoji/set-aliases-bulk.js'; import * as ep___admin_emoji_setCategoryBulk from './endpoints/admin/emoji/set-category-bulk.js'; import * as ep___admin_emoji_setLicenseBulk from './endpoints/admin/emoji/set-license-bulk.js'; +import * as ep___admin_emoji_steal from './endpoints/admin/emoji/steal.js'; import * as ep___admin_emoji_update from './endpoints/admin/emoji/update.js'; import * as ep___admin_federation_deleteAllFiles from './endpoints/admin/federation/delete-all-files.js'; import * as ep___admin_federation_refreshRemoteInstanceMetadata from './endpoints/admin/federation/refresh-remote-instance-metadata.js'; @@ -428,7 +428,6 @@ const eps = [ ['admin/emoji/add', ep___admin_emoji_add], ['admin/emoji/adds', ep___admin_emoji_adds], ['admin/emoji/copy', ep___admin_emoji_copy], - ['admin/emoji/steal', ep___admin_emoji_steal], ['admin/emoji/delete-bulk', ep___admin_emoji_deleteBulk], ['admin/emoji/delete', ep___admin_emoji_delete], ['admin/emoji/import-zip', ep___admin_emoji_importZip], @@ -438,6 +437,7 @@ const eps = [ ['admin/emoji/set-aliases-bulk', ep___admin_emoji_setAliasesBulk], ['admin/emoji/set-category-bulk', ep___admin_emoji_setCategoryBulk], ['admin/emoji/set-license-bulk', ep___admin_emoji_setLicenseBulk], + ['admin/emoji/steal', ep___admin_emoji_steal], ['admin/emoji/update', ep___admin_emoji_update], ['admin/federation/delete-all-files', ep___admin_federation_deleteAllFiles], ['admin/federation/refresh-remote-instance-metadata', ep___admin_federation_refreshRemoteInstanceMetadata], diff --git a/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts b/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts index 0ddf85e897..f7fde8d6b8 100644 --- a/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts +++ b/packages/backend/src/server/api/endpoints/admin/emoji/steal.ts @@ -13,7 +13,7 @@ import { DriveService } from '@/core/DriveService.js'; import { GlobalEventService } from '@/core/GlobalEventService.js'; import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js'; import { ApiError } from '../../../error.js'; -import {IsNull} from "typeorm"; +import { IsNull } from 'typeorm'; export const meta = { tags: ['admin'], diff --git a/packages/cherrypick-js/src/api.types.ts b/packages/cherrypick-js/src/api.types.ts index a35d9a8316..7575d2bbf0 100644 --- a/packages/cherrypick-js/src/api.types.ts +++ b/packages/cherrypick-js/src/api.types.ts @@ -58,9 +58,9 @@ export type Endpoints = { 'admin/emoji/adds': { req: TODO; res: TODO; }; 'admin/emoji/copy': { req: TODO; res: TODO; }; 'admin/emoji/list-remote': { req: TODO; res: TODO; }; - 'admin/emoji/steal': { req: TODO; res: TODO; }; 'admin/emoji/list': { req: TODO; res: TODO; }; 'admin/emoji/remove': { req: TODO; res: TODO; }; + 'admin/emoji/steal': { req: TODO; res: TODO; }; 'admin/emoji/update': { req: TODO; res: TODO; }; 'admin/federation/delete-all-files': { req: { host: string; }; res: null; }; 'admin/federation/refresh-remote-instance-metadata': { req: TODO; res: TODO; }; diff --git a/packages/frontend/src/components/global/MkCustomEmoji.vue b/packages/frontend/src/components/global/MkCustomEmoji.vue index 6cc3818ebc..fc0d8d4105 100644 --- a/packages/frontend/src/components/global/MkCustomEmoji.vue +++ b/packages/frontend/src/components/global/MkCustomEmoji.vue @@ -30,6 +30,7 @@ import { customEmojisMap } from '@/custom-emojis.js'; import * as os from '@/os.js'; import copyToClipboard from '@/scripts/copy-to-clipboard.js'; import { i18n } from '@/i18n.js'; +import { $i } from '@/account.js'; const props = defineProps<{ name: string; @@ -93,17 +94,17 @@ function onClick(ev: MouseEvent) { os.success(); }, }, ...(props.host && $i && ($i.isAdmin || $i.policies.canManageCustomEmojis) ? [{ - text: i18n.ts.import, - icon: 'ti ti-plus', - action: async () => { - await os.apiWithDialog('admin/emoji/steal', { - name: customEmojiName.value, - host: props.host, - }); - }, - }] : []), ...(props.menuReaction && react ? [{ - text: i18n.ts.doReaction, + text: i18n.ts.import, icon: 'ti ti-plus', + action: async () => { + await os.apiWithDialog('admin/emoji/steal', { + name: customEmojiName.value, + host: props.host, + }); + }, + }] : []), ...(props.menuReaction && react ? [{ + text: i18n.ts.doReaction, + icon: 'ti ti-mood-plus', action: () => { react(`:${props.name}:`); },