Переименование HistoryPage -> RecentBooksPage
This commit is contained in:
@@ -35,8 +35,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<div class="space"></div>
|
<div class="space"></div>
|
||||||
<el-tooltip v-show="showToolButton['history']" content="Открыть недавние" :open-delay="1000" effect="light">
|
<el-tooltip v-show="showToolButton['recentBooks']" content="Открыть недавние" :open-delay="1000" effect="light">
|
||||||
<el-button ref="history" class="tool-button" :class="buttonActiveClass('history')" @click="buttonClick('history')"><i class="el-icon-document"></i></el-button>
|
<el-button ref="recentBooks" class="tool-button" :class="buttonActiveClass('recentBooks')" @click="buttonClick('recentBooks')"><i class="el-icon-document"></i></el-button>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
@stop-text-search="stopTextSearch">
|
@stop-text-search="stopTextSearch">
|
||||||
</SearchPage>
|
</SearchPage>
|
||||||
<CopyTextPage v-if="copyTextActive" ref="copyTextPage" @copy-text-toggle="copyTextToggle"></CopyTextPage>
|
<CopyTextPage v-if="copyTextActive" ref="copyTextPage" @copy-text-toggle="copyTextToggle"></CopyTextPage>
|
||||||
<HistoryPage v-show="historyActive" ref="historyPage" @load-book="loadBook" @history-toggle="historyToggle"></HistoryPage>
|
<RecentBooksPage v-show="recentBooksActive" ref="recentBooksPage" @load-book="loadBook" @recent-books-toggle="recentBooksToggle"></RecentBooksPage>
|
||||||
<SettingsPage v-if="settingsActive" ref="settingsPage" @settings-toggle="settingsToggle"></SettingsPage>
|
<SettingsPage v-if="settingsActive" ref="settingsPage" @settings-toggle="settingsToggle"></SettingsPage>
|
||||||
<HelpPage v-if="helpActive" ref="helpPage" @help-toggle="helpToggle"></HelpPage>
|
<HelpPage v-if="helpActive" ref="helpPage" @help-toggle="helpToggle"></HelpPage>
|
||||||
<ClickMapPage v-show="clickMapActive" ref="clickMapPage"></ClickMapPage>
|
<ClickMapPage v-show="clickMapActive" ref="clickMapPage"></ClickMapPage>
|
||||||
@@ -106,7 +106,7 @@ import ProgressPage from './ProgressPage/ProgressPage.vue';
|
|||||||
import SetPositionPage from './SetPositionPage/SetPositionPage.vue';
|
import SetPositionPage from './SetPositionPage/SetPositionPage.vue';
|
||||||
import SearchPage from './SearchPage/SearchPage.vue';
|
import SearchPage from './SearchPage/SearchPage.vue';
|
||||||
import CopyTextPage from './CopyTextPage/CopyTextPage.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 SettingsPage from './SettingsPage/SettingsPage.vue';
|
||||||
import HelpPage from './HelpPage/HelpPage.vue';
|
import HelpPage from './HelpPage/HelpPage.vue';
|
||||||
import ClickMapPage from './ClickMapPage/ClickMapPage.vue';
|
import ClickMapPage from './ClickMapPage/ClickMapPage.vue';
|
||||||
@@ -126,7 +126,7 @@ export default @Component({
|
|||||||
SetPositionPage,
|
SetPositionPage,
|
||||||
SearchPage,
|
SearchPage,
|
||||||
CopyTextPage,
|
CopyTextPage,
|
||||||
HistoryPage,
|
RecentBooksPage,
|
||||||
SettingsPage,
|
SettingsPage,
|
||||||
HelpPage,
|
HelpPage,
|
||||||
ClickMapPage,
|
ClickMapPage,
|
||||||
@@ -175,7 +175,7 @@ class Reader extends Vue {
|
|||||||
setPositionActive = false;
|
setPositionActive = false;
|
||||||
searchActive = false;
|
searchActive = false;
|
||||||
copyTextActive = false;
|
copyTextActive = false;
|
||||||
historyActive = false;
|
recentBooksActive = false;
|
||||||
settingsActive = false;
|
settingsActive = false;
|
||||||
helpActive = false;
|
helpActive = false;
|
||||||
clickMapActive = false;
|
clickMapActive = false;
|
||||||
@@ -391,8 +391,8 @@ class Reader extends Vue {
|
|||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (eventName == 'recent-changed') {
|
if (eventName == 'recent-changed') {
|
||||||
if (this.historyActive) {
|
if (this.recentBooksActive) {
|
||||||
await this.$refs.historyPage.updateTableData();
|
await this.$refs.recentBooksPage.updateTableData();
|
||||||
}
|
}
|
||||||
|
|
||||||
const oldBook = this.mostRecentBookReactive;
|
const oldBook = this.mostRecentBookReactive;
|
||||||
@@ -478,7 +478,7 @@ class Reader extends Vue {
|
|||||||
closeAllTextPages() {
|
closeAllTextPages() {
|
||||||
this.setPositionActive = false;
|
this.setPositionActive = false;
|
||||||
this.copyTextActive = false;
|
this.copyTextActive = false;
|
||||||
this.historyActive = false;
|
this.recentBooksActive = false;
|
||||||
this.settingsActive = false;
|
this.settingsActive = false;
|
||||||
this.stopScrolling();
|
this.stopScrolling();
|
||||||
this.stopSearch();
|
this.stopSearch();
|
||||||
@@ -570,14 +570,14 @@ class Reader extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
historyToggle() {
|
recentBooksToggle() {
|
||||||
this.historyActive = !this.historyActive;
|
this.recentBooksActive = !this.recentBooksActive;
|
||||||
if (this.historyActive) {
|
if (this.recentBooksActive) {
|
||||||
this.closeAllTextPages();
|
this.closeAllTextPages();
|
||||||
this.$refs.historyPage.init();
|
this.$refs.recentBooksPage.init();
|
||||||
this.historyActive = true;
|
this.recentBooksActive = true;
|
||||||
} else {
|
} else {
|
||||||
this.historyActive = false;
|
this.recentBooksActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -662,8 +662,8 @@ class Reader extends Vue {
|
|||||||
case 'copyText':
|
case 'copyText':
|
||||||
this.copyTextToggle();
|
this.copyTextToggle();
|
||||||
break;
|
break;
|
||||||
case 'history':
|
case 'recentBooks':
|
||||||
this.historyToggle();
|
this.recentBooksToggle();
|
||||||
break;
|
break;
|
||||||
case 'refresh':
|
case 'refresh':
|
||||||
this.refreshBook();
|
this.refreshBook();
|
||||||
@@ -686,7 +686,7 @@ class Reader extends Vue {
|
|||||||
case 'scrolling':
|
case 'scrolling':
|
||||||
case 'search':
|
case 'search':
|
||||||
case 'copyText':
|
case 'copyText':
|
||||||
case 'history':
|
case 'recentBooks':
|
||||||
case 'settings':
|
case 'settings':
|
||||||
if (this[`${button}Active`])
|
if (this[`${button}Active`])
|
||||||
classResult = classActive;
|
classResult = classActive;
|
||||||
@@ -714,7 +714,7 @@ class Reader extends Vue {
|
|||||||
case 'copyText':
|
case 'copyText':
|
||||||
classResult = classDisabled;
|
classResult = classDisabled;
|
||||||
break;
|
break;
|
||||||
case 'history':
|
case 'recentBooks':
|
||||||
case 'refresh':
|
case 'refresh':
|
||||||
if (!this.mostRecentBook())
|
if (!this.mostRecentBook())
|
||||||
classResult = classDisabled;
|
classResult = classDisabled;
|
||||||
@@ -957,8 +957,8 @@ class Reader extends Vue {
|
|||||||
if (!handled && this.settingsActive)
|
if (!handled && this.settingsActive)
|
||||||
handled = this.$refs.settingsPage.keyHook(event);
|
handled = this.$refs.settingsPage.keyHook(event);
|
||||||
|
|
||||||
if (!handled && this.historyActive)
|
if (!handled && this.recentBooksActive)
|
||||||
handled = this.$refs.historyPage.keyHook(event);
|
handled = this.$refs.recentBooksPage.keyHook(event);
|
||||||
|
|
||||||
if (!handled && this.setPositionActive)
|
if (!handled && this.setPositionActive)
|
||||||
handled = this.$refs.setPositionPage.keyHook(event);
|
handled = this.$refs.setPositionPage.keyHook(event);
|
||||||
@@ -1008,7 +1008,7 @@ class Reader extends Vue {
|
|||||||
this.refreshBook();
|
this.refreshBook();
|
||||||
break;
|
break;
|
||||||
case 'KeyX':
|
case 'KeyX':
|
||||||
this.historyToggle();
|
this.recentBooksToggle();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ export default @Component({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
class HistoryPage extends Vue {
|
class RecentBooksPage extends Vue {
|
||||||
loading = false;
|
loading = false;
|
||||||
search = null;
|
search = null;
|
||||||
tableData = [];
|
tableData = [];
|
||||||
@@ -301,7 +301,7 @@ class HistoryPage extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.$emit('history-toggle');
|
this.$emit('recent-books-toggle');
|
||||||
}
|
}
|
||||||
|
|
||||||
keyHook(event) {
|
keyHook(event) {
|
||||||
@@ -8,7 +8,7 @@ const toolButtons = [
|
|||||||
{name: 'search', show: true, text: 'Найти в тексте'},
|
{name: 'search', show: true, text: 'Найти в тексте'},
|
||||||
{name: 'copyText', show: false, text: 'Скопировать текст со страницы'},
|
{name: 'copyText', show: false, text: 'Скопировать текст со страницы'},
|
||||||
{name: 'refresh', show: true, text: 'Принудительно обновить книгу'},
|
{name: 'refresh', show: true, text: 'Принудительно обновить книгу'},
|
||||||
{name: 'history', show: true, text: 'Открыть недавние'},
|
{name: 'recentBooks', show: true, text: 'Открыть недавние'},
|
||||||
];
|
];
|
||||||
|
|
||||||
const fonts = [
|
const fonts = [
|
||||||
|
|||||||
Reference in New Issue
Block a user