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