diff --git a/packages/client/src/pages/settings/general.vue b/packages/client/src/pages/settings/general.vue index 6a9af2412..0add2b9df 100644 --- a/packages/client/src/pages/settings/general.vue +++ b/packages/client/src/pages/settings/general.vue @@ -45,10 +45,10 @@ class="_formBlock" >{{ i18n.ts.useReactionPickerForContextMenu }} - {{ + {{ i18n.ts.swipeOnMobile }} - {{ + {{ i18n.ts.swipeOnDesktop }} {{ @@ -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"); diff --git a/packages/client/src/pages/settings/preferences-backups.vue b/packages/client/src/pages/settings/preferences-backups.vue index 313024d86..15fd804bf 100644 --- a/packages/client/src/pages/settings/preferences-backups.vue +++ b/packages/client/src/pages/settings/preferences-backups.vue @@ -110,6 +110,7 @@ const defaultStoreSaveKeys: (keyof (typeof defaultStore)["state"])[] = [ "squareAvatars", "numberOfPageCache", "showUpdates", + "swipeOnMobile", "swipeOnDesktop", "showAdminUpdates", "enableCustomKaTeXMacro",