diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue index 57baaaa8..a381de32 100644 --- a/client/components/Reader/Reader.vue +++ b/client/components/Reader/Reader.vue @@ -35,8 +35,8 @@
- - + + @@ -69,7 +69,7 @@ @stop-text-search="stopTextSearch"> - + @@ -106,7 +106,7 @@ import ProgressPage from './ProgressPage/ProgressPage.vue'; import SetPositionPage from './SetPositionPage/SetPositionPage.vue'; import SearchPage from './SearchPage/SearchPage.vue'; import CopyTextPage from './CopyTextPage/CopyTextPage.vue'; -import HistoryPage from './HistoryPage/HistoryPage.vue'; +import RecentBooksPage from './RecentBooksPage/RecentBooksPage.vue'; import SettingsPage from './SettingsPage/SettingsPage.vue'; import HelpPage from './HelpPage/HelpPage.vue'; import ClickMapPage from './ClickMapPage/ClickMapPage.vue'; @@ -126,7 +126,7 @@ export default @Component({ SetPositionPage, SearchPage, CopyTextPage, - HistoryPage, + RecentBooksPage, SettingsPage, HelpPage, ClickMapPage, @@ -175,7 +175,7 @@ class Reader extends Vue { setPositionActive = false; searchActive = false; copyTextActive = false; - historyActive = false; + recentBooksActive = false; settingsActive = false; helpActive = false; clickMapActive = false; @@ -391,8 +391,8 @@ class Reader extends Vue { }*/ if (eventName == 'recent-changed') { - if (this.historyActive) { - await this.$refs.historyPage.updateTableData(); + if (this.recentBooksActive) { + await this.$refs.recentBooksPage.updateTableData(); } const oldBook = this.mostRecentBookReactive; @@ -478,7 +478,7 @@ class Reader extends Vue { closeAllTextPages() { this.setPositionActive = false; this.copyTextActive = false; - this.historyActive = false; + this.recentBooksActive = false; this.settingsActive = false; this.stopScrolling(); this.stopSearch(); @@ -570,14 +570,14 @@ class Reader extends Vue { } } - historyToggle() { - this.historyActive = !this.historyActive; - if (this.historyActive) { + recentBooksToggle() { + this.recentBooksActive = !this.recentBooksActive; + if (this.recentBooksActive) { this.closeAllTextPages(); - this.$refs.historyPage.init(); - this.historyActive = true; + this.$refs.recentBooksPage.init(); + this.recentBooksActive = true; } else { - this.historyActive = false; + this.recentBooksActive = false; } } @@ -662,8 +662,8 @@ class Reader extends Vue { case 'copyText': this.copyTextToggle(); break; - case 'history': - this.historyToggle(); + case 'recentBooks': + this.recentBooksToggle(); break; case 'refresh': this.refreshBook(); @@ -686,7 +686,7 @@ class Reader extends Vue { case 'scrolling': case 'search': case 'copyText': - case 'history': + case 'recentBooks': case 'settings': if (this[`${button}Active`]) classResult = classActive; @@ -714,7 +714,7 @@ class Reader extends Vue { case 'copyText': classResult = classDisabled; break; - case 'history': + case 'recentBooks': case 'refresh': if (!this.mostRecentBook()) classResult = classDisabled; @@ -957,8 +957,8 @@ class Reader extends Vue { if (!handled && this.settingsActive) handled = this.$refs.settingsPage.keyHook(event); - if (!handled && this.historyActive) - handled = this.$refs.historyPage.keyHook(event); + if (!handled && this.recentBooksActive) + handled = this.$refs.recentBooksPage.keyHook(event); if (!handled && this.setPositionActive) handled = this.$refs.setPositionPage.keyHook(event); @@ -1008,7 +1008,7 @@ class Reader extends Vue { this.refreshBook(); break; case 'KeyX': - this.historyToggle(); + this.recentBooksToggle(); event.preventDefault(); event.stopPropagation(); break; diff --git a/client/components/Reader/HistoryPage/HistoryPage.vue b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue similarity index 99% rename from client/components/Reader/HistoryPage/HistoryPage.vue rename to client/components/Reader/RecentBooksPage/RecentBooksPage.vue index 86eed2a1..ff84aae2 100644 --- a/client/components/Reader/HistoryPage/HistoryPage.vue +++ b/client/components/Reader/RecentBooksPage/RecentBooksPage.vue @@ -119,7 +119,7 @@ export default @Component({ } }, }) -class HistoryPage extends Vue { +class RecentBooksPage extends Vue { loading = false; search = null; tableData = []; @@ -301,7 +301,7 @@ class HistoryPage extends Vue { } close() { - this.$emit('history-toggle'); + this.$emit('recent-books-toggle'); } keyHook(event) { diff --git a/client/store/modules/reader.js b/client/store/modules/reader.js index af575c91..394bbd71 100644 --- a/client/store/modules/reader.js +++ b/client/store/modules/reader.js @@ -8,7 +8,7 @@ const toolButtons = [ {name: 'search', show: true, text: 'Найти в тексте'}, {name: 'copyText', show: false, text: 'Скопировать текст со страницы'}, {name: 'refresh', show: true, text: 'Принудительно обновить книгу'}, - {name: 'history', show: true, text: 'Открыть недавние'}, + {name: 'recentBooks', show: true, text: 'Открыть недавние'}, ]; const fonts = [