upd: add option to disable server disconnect warning

Closes transfem-org/Sharkey#152
This commit is contained in:
Mar0xy 2023-11-15 23:59:29 +01:00
parent 8779c0defd
commit 62bb0d1eaa
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
5 changed files with 5 additions and 1 deletions

View file

@ -1735,6 +1735,7 @@ _serverDisconnectedBehavior:
reload: "Automatically reload" reload: "Automatically reload"
dialog: "Show warning dialog" dialog: "Show warning dialog"
quiet: "Show unobtrusive warning" quiet: "Show unobtrusive warning"
disabled: "Disable warning"
_channel: _channel:
create: "Create channel" create: "Create channel"
edit: "Edit channel" edit: "Edit channel"

1
locales/index.d.ts vendored
View file

@ -1857,6 +1857,7 @@ export interface Locale {
"reload": string; "reload": string;
"dialog": string; "dialog": string;
"quiet": string; "quiet": string;
"disabled": string;
}; };
"_channel": { "_channel": {
"create": string; "create": string;

View file

@ -1762,6 +1762,7 @@ _serverDisconnectedBehavior:
reload: "自動でリロード" reload: "自動でリロード"
dialog: "ダイアログで警告" dialog: "ダイアログで警告"
quiet: "控えめに警告" quiet: "控えめに警告"
disabled: "警告を無効にする"
_channel: _channel:
create: "チャンネルを作成" create: "チャンネルを作成"

View file

@ -169,6 +169,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option> <option value="reload">{{ i18n.ts._serverDisconnectedBehavior.reload }}</option>
<option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option> <option value="dialog">{{ i18n.ts._serverDisconnectedBehavior.dialog }}</option>
<option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option> <option value="quiet">{{ i18n.ts._serverDisconnectedBehavior.quiet }}</option>
<option value="disabled">{{ i18n.ts._serverDisconnectedBehavior.disabled }}</option>
</MkSelect> </MkSelect>
<MkRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" easing> <MkRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" easing>
<template #label>{{ i18n.ts.numberOfPageCache }}</template> <template #label>{{ i18n.ts.numberOfPageCache }}</template>

View file

@ -184,7 +184,7 @@ export const defaultStore = markRaw(new Storage('base', {
}, },
serverDisconnectedBehavior: { serverDisconnectedBehavior: {
where: 'device', where: 'device',
default: 'quiet' as 'quiet' | 'reload' | 'dialog', default: 'quiet' as 'quiet' | 'reload' | 'dialog' | 'disabled',
}, },
nsfw: { nsfw: {
where: 'device', where: 'device',