From 62bb0d1eaaa83547126486d9b66100ea85203424 Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Wed, 15 Nov 2023 23:59:29 +0100 Subject: [PATCH] upd: add option to disable server disconnect warning Closes transfem-org/Sharkey#152 --- locales/en-US.yml | 1 + locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + packages/frontend/src/pages/settings/general.vue | 1 + packages/frontend/src/store.ts | 2 +- 5 files changed, 5 insertions(+), 1 deletion(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index e416eeff0b..ed30ed001b 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -1735,6 +1735,7 @@ _serverDisconnectedBehavior: reload: "Automatically reload" dialog: "Show warning dialog" quiet: "Show unobtrusive warning" + disabled: "Disable warning" _channel: create: "Create channel" edit: "Edit channel" diff --git a/locales/index.d.ts b/locales/index.d.ts index 6cacf1ab39..ebab7f2c0b 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1857,6 +1857,7 @@ export interface Locale { "reload": string; "dialog": string; "quiet": string; + "disabled": string; }; "_channel": { "create": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 039937e408..837f15e176 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1762,6 +1762,7 @@ _serverDisconnectedBehavior: reload: "自動でリロード" dialog: "ダイアログで警告" quiet: "控えめに警告" + disabled: "警告を無効にする" _channel: create: "チャンネルを作成" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 0adba4bc31..a6257defe6 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -169,6 +169,7 @@ SPDX-License-Identifier: AGPL-3.0-only + diff --git a/packages/frontend/src/store.ts b/packages/frontend/src/store.ts index a4f8f4d110..30c876ec20 100644 --- a/packages/frontend/src/store.ts +++ b/packages/frontend/src/store.ts @@ -184,7 +184,7 @@ export const defaultStore = markRaw(new Storage('base', { }, serverDisconnectedBehavior: { where: 'device', - default: 'quiet' as 'quiet' | 'reload' | 'dialog', + default: 'quiet' as 'quiet' | 'reload' | 'dialog' | 'disabled', }, nsfw: { where: 'device',