From 28cb0fc70b67abf5fe0b1a765df0d97b0b4f4902 Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Thu, 30 Nov 2023 14:35:56 +0900 Subject: [PATCH] =?UTF-8?q?enhance:=20=E8=A8=AD=E5=AE=9A=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=82=BF=E3=82=B0=E3=82=92=E3=83=88=E3=83=AC=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=81=AB=E8=A1=A8=E7=A4=BA=E3=81=95=E3=81=9B=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B=E9=A0=85=E7=9B=AE?= =?UTF-8?q?=E3=82=92=E7=AE=A1=E7=90=86=E7=94=BB=E9=9D=A2=E3=81=A7=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A=E3=81=A7=E3=81=8D=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= =?UTF-8?q?=20(#12512)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * enhance: hiddenTagsを管理画面で設定できるように * Update locales/ja-JP.yml Co-authored-by: syuilo --------- Co-authored-by: syuilo --- locales/index.d.ts | 2 ++ locales/ja-JP.yml | 2 ++ packages/frontend/src/pages/admin/moderation.vue | 8 ++++++++ 3 files changed, 12 insertions(+) diff --git a/locales/index.d.ts b/locales/index.d.ts index 64ee30410..d72e7d29f 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1030,6 +1030,8 @@ export interface Locale { "sensitiveWords": string; "sensitiveWordsDescription": string; "sensitiveWordsDescription2": string; + "hiddenTags": string; + "hiddenTagsDescription": string; "notesSearchNotAvailable": string; "license": string; "unfavoriteConfirm": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f4daefa97..0f4164652 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1027,6 +1027,8 @@ resetPasswordConfirm: "パスワードリセットしますか?" sensitiveWords: "センシティブワード" sensitiveWordsDescription: "設定したワードが含まれるノートの公開範囲をホームにします。改行で区切って複数設定できます。" sensitiveWordsDescription2: "スペースで区切るとAND指定になり、キーワードをスラッシュで囲むと正規表現になります。" +hiddenTags: "非表示ハッシュタグ" +hiddenTagsDescription: "設定したタグをトレンドに表示させないようにします。改行で区切って複数設定できます。" notesSearchNotAvailable: "ノート検索は利用できません。" license: "ライセンス" unfavoriteConfirm: "お気に入り解除しますか?" diff --git a/packages/frontend/src/pages/admin/moderation.vue b/packages/frontend/src/pages/admin/moderation.vue index 59ee04138..47f46fe6c 100644 --- a/packages/frontend/src/pages/admin/moderation.vue +++ b/packages/frontend/src/pages/admin/moderation.vue @@ -39,6 +39,11 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + + @@ -72,6 +77,7 @@ import FormLink from '@/components/form/link.vue'; let enableRegistration: boolean = $ref(false); let emailRequiredForSignup: boolean = $ref(false); let sensitiveWords: string = $ref(''); +let hiddenTags: string = $ref(''); let preservedUsernames: string = $ref(''); let tosUrl: string | null = $ref(null); let privacyPolicyUrl: string | null = $ref(null); @@ -81,6 +87,7 @@ async function init() { enableRegistration = !meta.disableRegistration; emailRequiredForSignup = meta.emailRequiredForSignup; sensitiveWords = meta.sensitiveWords.join('\n'); + hiddenTags = meta.hiddenTags.join('\n'); preservedUsernames = meta.preservedUsernames.join('\n'); tosUrl = meta.tosUrl; privacyPolicyUrl = meta.privacyPolicyUrl; @@ -93,6 +100,7 @@ function save() { tosUrl, privacyPolicyUrl, sensitiveWords: sensitiveWords.split('\n'), + hiddenTags: hiddenTags.split('\n'), preservedUsernames: preservedUsernames.split('\n'), }).then(() => { fetchInstance();