diff --git a/locales/index.d.ts b/locales/index.d.ts index 483c470be8..08d132fa39 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1134,6 +1134,10 @@ export interface Locale { "fileAttachedOnly": string; "showRepliesToOthersInTimeline": string; "hideRepliesToOthersInTimeline": string; + "showRepliesToOthersInTimelineAll": string; + "hideRepliesToOthersInTimelineAll": string; + "confirmShowRepliesAll": string; + "confirmHideRepliesAll": string; "externalServices": string; "impressum": string; "impressumUrl": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 725d1e7a87..9b909b55c5 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1131,6 +1131,10 @@ mutualFollow: "相互フォロー" fileAttachedOnly: "ファイル付きのみ" showRepliesToOthersInTimeline: "TLに他の人への返信を含める" hideRepliesToOthersInTimeline: "TLに他の人への返信を含めない" +showRepliesToOthersInTimelineAll: "TLに現在フォロー中の人全員の返信を含めるようにする" +hideRepliesToOthersInTimelineAll: "TLに現在フォロー中の人全員の返信を含めないようにする" +confirmShowRepliesAll: "この操作は元の戻せません。本当にTLに現在フォロー中の人全員の返信を含めるようにしますか" +confirmHideRepliesAll: "この操作は元の戻せません。本当にTLに現在フォロー中の人全員の返信を含めないようにしますか" externalServices: "外部サービス" impressum: "運営者情報" impressumUrl: "運営者情報URL" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 55de53fb07..2c12951b52 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -29,6 +29,8 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.showFixedPostForm }} {{ i18n.ts.showFixedPostFormInChannel }} + {{ i18n.ts.showRepliesToOthersInTimelineAll }} + {{ i18n.ts.hideRepliesToOthersInTimelineAll }} @@ -202,6 +204,7 @@ import { definePageMetadata } from '@/scripts/page-metadata.js'; import { miLocalStorage } from '@/local-storage.js'; import { globalEvents } from '@/events'; import { claimAchievement } from '@/scripts/achievements.js'; +import {confirm} from "@/os.js"; const lang = ref(miLocalStorage.getItem('lang')); const fontSize = ref(miLocalStorage.getItem('fontSize')); @@ -330,6 +333,14 @@ async function setPinnedList() { defaultStore.set('pinnedUserLists', [list]); } +async function updateRepliesAll(withReplies: boolean) { + os.confirm({ + type: 'warning', + text: withReplies ? i18n.ts.confirmShowRepliesAll : i18n.ts.confirmHideRepliesAll, + }) + await os.api('following/update-all', { withReplies }); +} + function removePinnedList() { defaultStore.set('pinnedUserLists', []); }