From 32170d4d690fc047444e48ef3c71c640f3c45024 Mon Sep 17 00:00:00 2001 From: Gauthier Roebroeck Date: Fri, 8 May 2020 16:41:41 +0800 Subject: [PATCH] feat(webreader): add setting to disable swipe navigation useful for iOS users as pinch zoom works, but is broken with swipe --- komga-webui/src/views/BookReader.vue | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/komga-webui/src/views/BookReader.vue b/komga-webui/src/views/BookReader.vue index 126f2ff56..9755001b3 100644 --- a/komga-webui/src/views/BookReader.vue +++ b/komga-webui/src/views/BookReader.vue @@ -2,10 +2,10 @@
@@ -183,10 +183,15 @@ + + + + + { this.doublePages = (v === 'true') }) + this.loadFromCookie(cookieSwipe, (v) => { + this.swipe = (v === 'true') + }) this.loadFromCookie(cookieFit, (v) => { if (v) { this.imageFit = v @@ -490,6 +500,15 @@ export default Vue.extend({ this.$cookies.set(cookieDoublePages, doublePages, Infinity) }, }, + swipe: { + get: function (): boolean { + return this.settings.swipe + }, + set: function (swipe: boolean): void { + this.settings.swipe = swipe + this.$cookies.set(cookieSwipe, swipe, Infinity) + }, + }, }, methods: { keyPressed (e: KeyboardEvent) {