From b308dd58cc3eac4485ca8ca72167dceccc5d70b1 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 19 Mar 2020 17:12:12 +0700 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B5=D1=84=D0=B0=D0=BA=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D0=BD=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/Reader/Reader.vue | 3 --- client/components/Reader/TextPage/TextPage.vue | 12 ++++++++---- client/store/modules/reader.js | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index 6d2928bf..821a3517 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -67,9 +67,6 @@ @book-pos-changed="bookPosChanged" @do-action="doAction" - @tool-bar-toggle="toolBarToggle" - @full-screen-toogle="fullScreenToggle" - @stop-scrolling="stopScrolling" @scrolling-toggle="scrollingToggle" @help-toggle="helpToggle" @donate-toggle="donateToggle" diff --git a/client/components/Reader/TextPage/TextPage.vue b/client/components/Reader/TextPage/TextPage.vue index a3bc894b..68928c67 100644 --- a/client/components/Reader/TextPage/TextPage.vue +++ b/client/components/Reader/TextPage/TextPage.vue @@ -504,7 +504,7 @@ class TextPage extends Vue { async startTextScrolling() { if (this.doingScrolling || !this.book || !this.parsed.textLength || !this.linesDown || this.pageLineCount < 1 || this.linesDown.length <= this.pageLineCount) { - this.$emit('stop-scrolling'); + this.doStopScrolling(); return; } @@ -545,7 +545,7 @@ class TextPage extends Vue { } this.resolveTransition1Finish = null; this.doingScrolling = false; - this.$emit('stop-scrolling'); + this.doStopScrolling(); this.draw(); } @@ -889,11 +889,15 @@ class TextPage extends Vue { } doScrollingToggle() { - this.$emit('scrolling-toggle'); + this.$emit('do-action', {action: 'scrolling', event}); } doFullScreenToggle() { - this.$emit('full-screen-toogle'); + this.$emit('do-action', {action: 'fullScreen', event}); + } + + doStopScrolling() { + this.$emit('do-action', {action: 'stopScrolling', event}); } async doFontSizeInc() { diff --git a/client/store/modules/reader.js b/client/store/modules/reader.js index ac81658f..1cd342da 100644 --- a/client/store/modules/reader.js +++ b/client/store/modules/reader.js @@ -6,6 +6,7 @@ const readerActions = { 'redoAction': 'Действие вперед', 'fullScreen': 'На весь экран', 'scrolling': 'Плавный скроллинг', + 'stopScrolling': '', 'setPosition': 'Установить позицию', 'search': 'Найти в тексте', 'copyText': 'Скопировать текст со страницы', @@ -13,6 +14,7 @@ const readerActions = { 'offlineMode': 'Автономный режим (без интернета)', 'recentBooks': 'Открыть недавние', 'switchToolbar': 'Показать/скрыть панель управления', + 'donate': '', 'bookBegin': 'В начало книги', 'bookEnd': 'В конец книги', 'pageBack': 'Страницу назад',