From 8267aa27c181c3963cbc8ec8d1d57e80fb85ef05 Mon Sep 17 00:00:00 2001 From: Esurio Date: Sun, 4 Aug 2024 15:34:30 +0000 Subject: [PATCH] enhance(phase 1): deprecate messaging feature --- locales/en-US.yml | 1 + locales/index.d.ts | 8 +++++ locales/ja-JP.yml | 1 + .../src/components/MkDeprecatedWarning.vue | 22 +++++++++++++ .../frontend/src/pages/messaging/index.vue | 33 ++----------------- 5 files changed, 34 insertions(+), 31 deletions(-) create mode 100644 packages/frontend/src/components/MkDeprecatedWarning.vue diff --git a/locales/en-US.yml b/locales/en-US.yml index 09cea5038b..8ffd1bcc91 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -385,6 +385,7 @@ termsOfService: "Terms of Service" start: "Begin" home: "Home" remoteUserCaution: "As this user is from a remote instance, the shown information may be incomplete." +deprecatedCaution: "This feature is deprecated and will remove in the future. \n If you needed, please take a backup." activity: "Activity" images: "Images" image: "Image" diff --git a/locales/index.d.ts b/locales/index.d.ts index c2cb704548..4e301f57a7 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1590,6 +1590,11 @@ export interface Locale extends ILocale { * センシティブなユーザーです。 */ "sensitiveUserCaution": string; + /** + * この機能は非推奨です。 + * 必要であれば、バックアップを取ることをお勧めします。 + */ + "deprecatedCaution": string; /** * アクティビティ */ @@ -9749,6 +9754,9 @@ export interface Locale extends ILocale { * サイコロ */ "dice": string; + /** + * 検索 + */ "search": string; }; "_cw": { diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 6d1560e3aa..95f6231b1f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -392,6 +392,7 @@ start: "始める" home: "ホーム" remoteUserCaution: "リモートユーザーのため、情報が不完全です。" sensitiveUserCaution: "センシティブなユーザーです。" +deprecatedCaution: "この機能は非推奨です。\n 必要であれば、バックアップを取ることをお勧めします。" activity: "アクティビティ" images: "画像" image: "画像" diff --git a/packages/frontend/src/components/MkDeprecatedWarning.vue b/packages/frontend/src/components/MkDeprecatedWarning.vue new file mode 100644 index 0000000000..8bce6ca78f --- /dev/null +++ b/packages/frontend/src/components/MkDeprecatedWarning.vue @@ -0,0 +1,22 @@ + + + + + diff --git a/packages/frontend/src/pages/messaging/index.vue b/packages/frontend/src/pages/messaging/index.vue index 688ae51941..acd2879abc 100644 --- a/packages/frontend/src/pages/messaging/index.vue +++ b/packages/frontend/src/pages/messaging/index.vue @@ -8,6 +8,7 @@ SPDX-License-Identifier: AGPL-3.0-only
+
@@ -36,7 +37,7 @@ import { $i } from '@/account.js'; import { globalEvents } from '@/events.js'; import MkChatPreview from '@/components/MkChatPreview.vue'; import MkPagination from '@/components/MkPagination.vue'; -import MkSearchInput from '@/components/MkSearchInput.vue'; +import MkDeprecatedWarning from '@/components/MkDeprecatedWarning.vue'; const pagingComponent = shallowRef>(); @@ -67,36 +68,6 @@ const groupsPagination = { }, }; -async function search() { - const query = searchQuery.value.toString().trim(); - - if (query == null || query === '') return; - - if (query.startsWith('https://')) { - const promise = misskeyApi('ap/show', { - uri: query, - }); - - os.promiseDialog(promise, null, null, i18n.ts.fetchingAsApObject); - - const res = await promise; - - if (res.type === 'User') { - router.push(`/@${res.object.username}@${res.object.host}`); - } else if (res.type === 'Note') { - router.push(`/notes/${res.object.id}`); - } - - return; - } - messagePagination.value = { - endpoint: 'messaging/message/search', - recipientId: recipientId.value, - groupId: groupId.value, - }; - key.value++; -} - function onMessage(message) { if (message.recipientId) { messages = messages.filter(m => !(