upd: remove reload from DisconnectedBehavior

This feature was mainly broken and there is no real way to fix it and as it is mostly not needed it is easier to just remove it.

Closes transfem-org/Sharkey#43
This commit is contained in:
Mar0xy 2023-11-30 06:59:24 +01:00
parent 9383e3affd
commit 13550bac35
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
3 changed files with 2 additions and 5 deletions

View file

@ -39,9 +39,7 @@ export async function mainBoot() {
let reloadDialogShowing = false; let reloadDialogShowing = false;
stream.on('_disconnected_', async () => { stream.on('_disconnected_', async () => {
if (defaultStore.state.serverDisconnectedBehavior === 'reload') { if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
location.reload();
} else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
if (reloadDialogShowing) return; if (reloadDialogShowing) return;
reloadDialogShowing = true; reloadDialogShowing = true;
const { canceled } = await confirm({ const { canceled } = await confirm({

View file

@ -166,7 +166,6 @@ SPDX-License-Identifier: AGPL-3.0-only
</div> </div>
<MkSelect v-model="serverDisconnectedBehavior"> <MkSelect v-model="serverDisconnectedBehavior">
<template #label>{{ i18n.ts.whenServerDisconnected }}</template> <template #label>{{ i18n.ts.whenServerDisconnected }}</template>
<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> <option value="disabled">{{ i18n.ts._serverDisconnectedBehavior.disabled }}</option>

View file

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