Начало работы на HistoryPage
This commit is contained in:
20
client/components/Reader/HistoryPage/HistoryPage.vue
Normal file
20
client/components/Reader/HistoryPage/HistoryPage.vue
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
Раздел History в разработке
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
import Vue from 'vue';
|
||||||
|
import Component from 'vue-class-component';
|
||||||
|
|
||||||
|
export default @Component({
|
||||||
|
})
|
||||||
|
class HistoryPage extends Vue {
|
||||||
|
created() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
</script>
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="space"></div>
|
<div class="space"></div>
|
||||||
<el-tooltip content="История" :open-delay="1000" effect="light">
|
<el-tooltip content="История" :open-delay="1000" effect="light">
|
||||||
<el-button ref="history" class="tool-button" @click="buttonClick('history')"><i class="el-icon-document"></i></el-button>
|
<el-button ref="history" class="tool-button" :class="buttonActiveClass('history')" @click="buttonClick('history')"><i class="el-icon-document"></i></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -57,6 +57,7 @@
|
|||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import Component from 'vue-class-component';
|
import Component from 'vue-class-component';
|
||||||
import LoaderPage from './LoaderPage/LoaderPage.vue';
|
import LoaderPage from './LoaderPage/LoaderPage.vue';
|
||||||
|
import HistoryPage from './HistoryPage/HistoryPage.vue';
|
||||||
import TextPage from './TextPage/TextPage.vue';
|
import TextPage from './TextPage/TextPage.vue';
|
||||||
import ProgressPage from './ProgressPage/ProgressPage.vue';
|
import ProgressPage from './ProgressPage/ProgressPage.vue';
|
||||||
|
|
||||||
@@ -66,6 +67,7 @@ import readerApi from '../../api/reader';
|
|||||||
export default @Component({
|
export default @Component({
|
||||||
components: {
|
components: {
|
||||||
LoaderPage,
|
LoaderPage,
|
||||||
|
HistoryPage,
|
||||||
TextPage,
|
TextPage,
|
||||||
ProgressPage
|
ProgressPage
|
||||||
},
|
},
|
||||||
@@ -95,6 +97,8 @@ export default @Component({
|
|||||||
})
|
})
|
||||||
class Reader extends Vue {
|
class Reader extends Vue {
|
||||||
loaderActive = false;
|
loaderActive = false;
|
||||||
|
historyActive = false;
|
||||||
|
|
||||||
progressActive = false;
|
progressActive = false;
|
||||||
fullScreenActive = false;
|
fullScreenActive = false;
|
||||||
|
|
||||||
@@ -202,11 +206,18 @@ class Reader extends Vue {
|
|||||||
this.loaderActive = !this.loaderActive;
|
this.loaderActive = !this.loaderActive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
historyToggle() {
|
||||||
|
this.historyActive = !this.historyActive;
|
||||||
|
}
|
||||||
|
|
||||||
buttonClick(button) {
|
buttonClick(button) {
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case 'loader':
|
case 'loader':
|
||||||
this.loaderToggle();
|
this.loaderToggle();
|
||||||
break;
|
break;
|
||||||
|
case 'history':
|
||||||
|
this.historyToggle();
|
||||||
|
break;
|
||||||
case 'fullScreen':
|
case 'fullScreen':
|
||||||
this.fullScreenToggle();
|
this.fullScreenToggle();
|
||||||
break;
|
break;
|
||||||
@@ -223,6 +234,7 @@ class Reader extends Vue {
|
|||||||
const classActive = { 'tool-button-active': true, 'tool-button-active:hover': true };
|
const classActive = { 'tool-button-active': true, 'tool-button-active:hover': true };
|
||||||
switch (button) {
|
switch (button) {
|
||||||
case 'loader': return (this.loaderActive ? classActive : {});
|
case 'loader': return (this.loaderActive ? classActive : {});
|
||||||
|
case 'history': return (this.historyActive ? classActive : {});
|
||||||
case 'fullScreen': return (this.fullScreenActive ? classActive : {});
|
case 'fullScreen': return (this.fullScreenActive ? classActive : {});
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
@@ -235,6 +247,8 @@ class Reader extends Vue {
|
|||||||
result = 'ProgressPage';
|
result = 'ProgressPage';
|
||||||
else if (this.loaderActive)
|
else if (this.loaderActive)
|
||||||
result = 'LoaderPage';
|
result = 'LoaderPage';
|
||||||
|
else if (this.historyActive)
|
||||||
|
result = 'HistoryPage';
|
||||||
else if (this.lastOpenedBook)
|
else if (this.lastOpenedBook)
|
||||||
result = 'TextPage';
|
result = 'TextPage';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user