support for disabling the app’s built-in swipe-back navigation (#249)

This commit is contained in:
MaysWind
2025-09-20 21:57:53 +08:00
parent d947164eb6
commit 18b270debb
17 changed files with 42 additions and 1 deletions
+15
View File
@@ -75,6 +75,11 @@
<f7-list-item :title="tt('Statistics Settings')" link="/statistic/settings"></f7-list-item>
<f7-list-item :title="tt('Settings Sync')" link="/settings/sync"></f7-list-item>
<f7-list-item>
<span>{{ tt('Enable Swipe Back') }}</span>
<f7-toggle :checked="isEnableSwipeBack" @toggle:change="isEnableSwipeBack = $event"></f7-toggle>
</f7-list-item>
<f7-list-item>
<span>{{ tt('Enable Animation') }}</span>
<f7-toggle :checked="isEnableAnimate" @toggle:change="isEnableAnimate = $event"></f7-toggle>
@@ -146,6 +151,16 @@ const currentTimezoneName = computed<string>(() => {
return '';
});
const isEnableSwipeBack = computed<boolean>({
get: () => settingsStore.appSettings.swipeBack,
set: value => {
if (value !== settingsStore.appSettings.swipeBack) {
settingsStore.setEnableSwipeBack(value);
location.reload();
}
}
});
const isEnableAnimate = computed<boolean>({
get: () => settingsStore.appSettings.animate,
set: value => {