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;
stream.on('_disconnected_', async () => {
if (defaultStore.state.serverDisconnectedBehavior === 'reload') {
location.reload();
} else if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
if (defaultStore.state.serverDisconnectedBehavior === 'dialog') {
if (reloadDialogShowing) return;
reloadDialogShowing = true;
const { canceled } = await confirm({

View File

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

View File

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