fix: only show option based on device + add option to backups
This commit is contained in:
parent
e17497e668
commit
8cb5f581a8
|
@ -45,10 +45,10 @@
|
|||
class="_formBlock"
|
||||
>{{ i18n.ts.useReactionPickerForContextMenu }}</FormSwitch
|
||||
>
|
||||
<FormSwitch v-model="swipeOnMobile" class="_formBlock">{{
|
||||
<FormSwitch v-if="deviceKind !== 'desktop'" v-model="swipeOnMobile" class="_formBlock">{{
|
||||
i18n.ts.swipeOnMobile
|
||||
}}</FormSwitch>
|
||||
<FormSwitch v-model="swipeOnDesktop" class="_formBlock">{{
|
||||
<FormSwitch v-if="deviceKind === 'desktop'" v-model="swipeOnDesktop" class="_formBlock">{{
|
||||
i18n.ts.swipeOnDesktop
|
||||
}}</FormSwitch>
|
||||
<FormSwitch v-model="enterSendsMessage" class="_formBlock">{{
|
||||
|
@ -256,6 +256,7 @@ import * as os from "@/os";
|
|||
import { unisonReload } from "@/scripts/unison-reload";
|
||||
import { i18n } from "@/i18n";
|
||||
import { definePageMetadata } from "@/scripts/page-metadata";
|
||||
import { deviceKind } from "@/scripts/device-kind";
|
||||
|
||||
const lang = ref(localStorage.getItem("lang"));
|
||||
const fontSize = ref(localStorage.getItem("fontSize"));
|
||||
|
@ -350,6 +351,10 @@ const showTimelineReplies = computed(
|
|||
defaultStore.makeGetterSetter("showTimelineReplies")
|
||||
);
|
||||
|
||||
watch(swipeOnDesktop, () => {
|
||||
defaultStore.set("swipeOnMobile", true);
|
||||
});
|
||||
|
||||
watch(lang, () => {
|
||||
localStorage.setItem("lang", lang.value as string);
|
||||
localStorage.removeItem("locale");
|
||||
|
|
|
@ -110,6 +110,7 @@ const defaultStoreSaveKeys: (keyof (typeof defaultStore)["state"])[] = [
|
|||
"squareAvatars",
|
||||
"numberOfPageCache",
|
||||
"showUpdates",
|
||||
"swipeOnMobile",
|
||||
"swipeOnDesktop",
|
||||
"showAdminUpdates",
|
||||
"enableCustomKaTeXMacro",
|
||||
|
|
Loading…
Reference in New Issue