From 89bd413178ce83de4dfe8fdaeadc6d6f18be3364 Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 25 Jan 2019 22:18:00 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B0=D0=BB=D0=BE=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=BD=D0=B0=20HistoryPage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reader/HistoryPage/HistoryPage.vue | 20 +++++++++++++++++++ client/components/Reader/Reader.vue | 16 ++++++++++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 client/components/Reader/HistoryPage/HistoryPage.vue diff --git a/client/components/Reader/HistoryPage/HistoryPage.vue b/client/components/Reader/HistoryPage/HistoryPage.vue new file mode 100644 index 00000000..7270a3a9 --- /dev/null +++ b/client/components/Reader/HistoryPage/HistoryPage.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index b062112e..4fae89d2 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -34,7 +34,7 @@
- + @@ -57,6 +57,7 @@ import Vue from 'vue'; import Component from 'vue-class-component'; import LoaderPage from './LoaderPage/LoaderPage.vue'; +import HistoryPage from './HistoryPage/HistoryPage.vue'; import TextPage from './TextPage/TextPage.vue'; import ProgressPage from './ProgressPage/ProgressPage.vue'; @@ -66,6 +67,7 @@ import readerApi from '../../api/reader'; export default @Component({ components: { LoaderPage, + HistoryPage, TextPage, ProgressPage }, @@ -95,6 +97,8 @@ export default @Component({ }) class Reader extends Vue { loaderActive = false; + historyActive = false; + progressActive = false; fullScreenActive = false; @@ -202,11 +206,18 @@ class Reader extends Vue { this.loaderActive = !this.loaderActive; } + historyToggle() { + this.historyActive = !this.historyActive; + } + buttonClick(button) { switch (button) { case 'loader': this.loaderToggle(); break; + case 'history': + this.historyToggle(); + break; case 'fullScreen': this.fullScreenToggle(); break; @@ -223,6 +234,7 @@ class Reader extends Vue { const classActive = { 'tool-button-active': true, 'tool-button-active:hover': true }; switch (button) { case 'loader': return (this.loaderActive ? classActive : {}); + case 'history': return (this.historyActive ? classActive : {}); case 'fullScreen': return (this.fullScreenActive ? classActive : {}); } return {}; @@ -235,6 +247,8 @@ class Reader extends Vue { result = 'ProgressPage'; else if (this.loaderActive) result = 'LoaderPage'; + else if (this.historyActive) + result = 'HistoryPage'; else if (this.lastOpenedBook) result = 'TextPage';