|
@@ -2,10 +2,12 @@
|
|
<div class="column no-wrap">
|
|
<div class="column no-wrap">
|
|
<div ref="header" class="header" v-show="toolBarActive">
|
|
<div ref="header" class="header" v-show="toolBarActive">
|
|
<div ref="buttons" class="row justify-between no-wrap">
|
|
<div ref="buttons" class="row justify-between no-wrap">
|
|
- <button ref="loader" class="tool-button" :class="buttonActiveClass('loader')" @click="buttonClick('loader')" v-ripple>
|
|
|
|
- <q-icon name="la la-arrow-left" size="32px"/>
|
|
|
|
- <q-tooltip :delay="1500" anchor="bottom right" content-style="font-size: 80%">{{ rstore.readerActions['loader'] }}</q-tooltip>
|
|
|
|
- </button>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <button ref="loader" class="tool-button" :class="buttonActiveClass('loader')" @click="buttonClick('loader')" v-ripple>
|
|
|
|
+ <q-icon name="la la-arrow-left" size="32px"/>
|
|
|
|
+ <q-tooltip :delay="1500" anchor="bottom right" content-style="font-size: 80%">{{ rstore.readerActions['loader'] }}</q-tooltip>
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
|
|
<div>
|
|
<div>
|
|
<button ref="undoAction" v-show="showToolButton['undoAction']" class="tool-button" :class="buttonActiveClass('undoAction')" @click="buttonClick('undoAction')" v-ripple>
|
|
<button ref="undoAction" v-show="showToolButton['undoAction']" class="tool-button" :class="buttonActiveClass('undoAction')" @click="buttonClick('undoAction')" v-ripple>
|
|
@@ -42,9 +44,9 @@
|
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">{{ rstore.readerActions['refresh'] }}</q-tooltip>
|
|
<q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">{{ rstore.readerActions['refresh'] }}</q-tooltip>
|
|
</button>
|
|
</button>
|
|
<div class="space"></div>
|
|
<div class="space"></div>
|
|
- <button ref="offlineMode" v-show="showToolButton['offlineMode']" class="tool-button" :class="buttonActiveClass('offlineMode')" @click="buttonClick('offlineMode')" v-ripple>
|
|
|
|
- <q-icon name="la la-unlink" size="32px"/>
|
|
|
|
- <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">{{ rstore.readerActions['offlineMode'] }}</q-tooltip>
|
|
|
|
|
|
+ <button ref="libs" v-show="mode == 'liberama.top' && showToolButton['libs']" class="tool-button" :class="buttonActiveClass('libs')" @click="buttonClick('libs')" v-ripple>
|
|
|
|
+ <q-icon name="la la-sitemap" size="32px"/>
|
|
|
|
+ <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">{{ rstore.readerActions['libs'] }}</q-tooltip>
|
|
</button>
|
|
</button>
|
|
<button ref="recentBooks" v-show="showToolButton['recentBooks']" class="tool-button" :class="buttonActiveClass('recentBooks')" @click="buttonClick('recentBooks')" v-ripple>
|
|
<button ref="recentBooks" v-show="showToolButton['recentBooks']" class="tool-button" :class="buttonActiveClass('recentBooks')" @click="buttonClick('recentBooks')" v-ripple>
|
|
<q-icon name="la la-book-open" size="32px"/>
|
|
<q-icon name="la la-book-open" size="32px"/>
|
|
@@ -52,10 +54,16 @@
|
|
</button>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <button ref="settings" class="tool-button" :class="buttonActiveClass('settings')" @click="buttonClick('settings')" v-ripple>
|
|
|
|
- <q-icon name="la la-cog" size="32px"/>
|
|
|
|
- <q-tooltip :delay="1500" anchor="bottom left" content-style="font-size: 80%">{{ rstore.readerActions['settings'] }}</q-tooltip>
|
|
|
|
- </button>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ <button ref="offlineMode" v-show="showToolButton['offlineMode']" class="tool-button" :class="buttonActiveClass('offlineMode')" @click="buttonClick('offlineMode')" v-ripple>
|
|
|
|
+ <q-icon name="la la-unlink" size="32px"/>
|
|
|
|
+ <q-tooltip :delay="1500" anchor="bottom middle" content-style="font-size: 80%">{{ rstore.readerActions['offlineMode'] }}</q-tooltip>
|
|
|
|
+ </button>
|
|
|
|
+ <button ref="settings" class="tool-button" :class="buttonActiveClass('settings')" @click="buttonClick('settings')" v-ripple>
|
|
|
|
+ <q-icon name="la la-cog" size="32px"/>
|
|
|
|
+ <q-tooltip :delay="1500" anchor="bottom left" content-style="font-size: 80%">{{ rstore.readerActions['settings'] }}</q-tooltip>
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -77,6 +85,7 @@
|
|
@stop-text-search="stopTextSearch">
|
|
@stop-text-search="stopTextSearch">
|
|
</SearchPage>
|
|
</SearchPage>
|
|
<CopyTextPage v-if="copyTextActive" ref="copyTextPage" @do-action="doAction"></CopyTextPage>
|
|
<CopyTextPage v-if="copyTextActive" ref="copyTextPage" @do-action="doAction"></CopyTextPage>
|
|
|
|
+ <LibsPage v-show="libsActive" ref="libsPage" @load-book="loadBook" @libs-close="libsClose" @do-action="doAction"></LibsPage>
|
|
<RecentBooksPage v-show="recentBooksActive" ref="recentBooksPage" @load-book="loadBook" @recent-books-close="recentBooksClose"></RecentBooksPage>
|
|
<RecentBooksPage v-show="recentBooksActive" ref="recentBooksPage" @load-book="loadBook" @recent-books-close="recentBooksClose"></RecentBooksPage>
|
|
<SettingsPage v-show="settingsActive" ref="settingsPage" @do-action="doAction"></SettingsPage>
|
|
<SettingsPage v-show="settingsActive" ref="settingsPage" @do-action="doAction"></SettingsPage>
|
|
<HelpPage v-if="helpActive" ref="helpPage" @do-action="doAction"></HelpPage>
|
|
<HelpPage v-if="helpActive" ref="helpPage" @do-action="doAction"></HelpPage>
|
|
@@ -159,6 +168,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 LibsPage from './LibsPage/LibsPage.vue';
|
|
import RecentBooksPage from './RecentBooksPage/RecentBooksPage.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';
|
|
@@ -181,6 +191,7 @@ export default @Component({
|
|
SetPositionPage,
|
|
SetPositionPage,
|
|
SearchPage,
|
|
SearchPage,
|
|
CopyTextPage,
|
|
CopyTextPage,
|
|
|
|
+ LibsPage,
|
|
RecentBooksPage,
|
|
RecentBooksPage,
|
|
SettingsPage,
|
|
SettingsPage,
|
|
HelpPage,
|
|
HelpPage,
|
|
@@ -230,6 +241,7 @@ export default @Component({
|
|
class Reader extends Vue {
|
|
class Reader extends Vue {
|
|
rstore = {};
|
|
rstore = {};
|
|
loaderActive = false;
|
|
loaderActive = false;
|
|
|
|
+ offlineModeActive = false;
|
|
progressActive = false;
|
|
progressActive = false;
|
|
fullScreenActive = false;
|
|
fullScreenActive = false;
|
|
|
|
|
|
@@ -237,8 +249,8 @@ class Reader extends Vue {
|
|
setPositionActive = false;
|
|
setPositionActive = false;
|
|
searchActive = false;
|
|
searchActive = false;
|
|
copyTextActive = false;
|
|
copyTextActive = false;
|
|
|
|
+ libsActive = false;
|
|
recentBooksActive = false;
|
|
recentBooksActive = false;
|
|
- offlineModeActive = false;
|
|
|
|
settingsActive = false;
|
|
settingsActive = false;
|
|
helpActive = false;
|
|
helpActive = false;
|
|
clickMapActive = false;
|
|
clickMapActive = false;
|
|
@@ -410,7 +422,7 @@ class Reader extends Vue {
|
|
await utils.sleep(3000);
|
|
await utils.sleep(3000);
|
|
const today = utils.formatDate(new Date(), 'coDate');
|
|
const today = utils.formatDate(new Date(), 'coDate');
|
|
|
|
|
|
- if (this.mode == 'omnireader' && today < '2020-03-01' && this.showDonationDialog2020 && this.donationRemindDate != today) {
|
|
|
|
|
|
+ if ((this.mode == 'omnireader' || this.mode == 'liberama.top') && today < '2020-03-01' && this.showDonationDialog2020 && this.donationRemindDate != today) {
|
|
this.donationVisible = true;
|
|
this.donationVisible = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -587,7 +599,7 @@ class Reader extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- closeAllTextPages() {
|
|
|
|
|
|
+ closeAllWindows() {
|
|
this.setPositionActive = false;
|
|
this.setPositionActive = false;
|
|
this.copyTextActive = false;
|
|
this.copyTextActive = false;
|
|
this.recentBooksActive = false;
|
|
this.recentBooksActive = false;
|
|
@@ -600,7 +612,7 @@ class Reader extends Vue {
|
|
loaderToggle() {
|
|
loaderToggle() {
|
|
this.loaderActive = !this.loaderActive;
|
|
this.loaderActive = !this.loaderActive;
|
|
if (this.loaderActive) {
|
|
if (this.loaderActive) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -608,7 +620,7 @@ class Reader extends Vue {
|
|
this.setPositionActive = !this.setPositionActive;
|
|
this.setPositionActive = !this.setPositionActive;
|
|
const page = this.$refs.page;
|
|
const page = this.$refs.page;
|
|
if (this.setPositionActive && this.activePage == 'TextPage' && page.parsed) {
|
|
if (this.setPositionActive && this.activePage == 'TextPage' && page.parsed) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.setPositionActive = true;
|
|
this.setPositionActive = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -660,7 +672,7 @@ class Reader extends Vue {
|
|
this.searchActive = !this.searchActive;
|
|
this.searchActive = !this.searchActive;
|
|
const page = this.$refs.page;
|
|
const page = this.$refs.page;
|
|
if (this.searchActive && this.activePage == 'TextPage' && page.parsed) {
|
|
if (this.searchActive && this.activePage == 'TextPage' && page.parsed) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.searchActive = true;
|
|
this.searchActive = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -676,7 +688,7 @@ class Reader extends Vue {
|
|
this.copyTextActive = !this.copyTextActive;
|
|
this.copyTextActive = !this.copyTextActive;
|
|
const page = this.$refs.page;
|
|
const page = this.$refs.page;
|
|
if (this.copyTextActive && this.activePage == 'TextPage' && page.parsed) {
|
|
if (this.copyTextActive && this.activePage == 'TextPage' && page.parsed) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.copyTextActive = true;
|
|
this.copyTextActive = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -694,7 +706,7 @@ class Reader extends Vue {
|
|
recentBooksToggle() {
|
|
recentBooksToggle() {
|
|
this.recentBooksActive = !this.recentBooksActive;
|
|
this.recentBooksActive = !this.recentBooksActive;
|
|
if (this.recentBooksActive) {
|
|
if (this.recentBooksActive) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.$refs.recentBooksPage.init();
|
|
this.$refs.recentBooksPage.init();
|
|
this.recentBooksActive = true;
|
|
this.recentBooksActive = true;
|
|
} else {
|
|
} else {
|
|
@@ -702,6 +714,20 @@ class Reader extends Vue {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ libsClose() {
|
|
|
|
+ if (this.libsActive)
|
|
|
|
+ this.libsToogle();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ libsToogle() {
|
|
|
|
+ this.libsActive = !this.libsActive;
|
|
|
|
+ if (this.libsActive) {
|
|
|
|
+ this.$refs.libsPage.init();
|
|
|
|
+ } else {
|
|
|
|
+ this.$refs.libsPage.done();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
offlineModeToggle() {
|
|
offlineModeToggle() {
|
|
this.offlineModeActive = !this.offlineModeActive;
|
|
this.offlineModeActive = !this.offlineModeActive;
|
|
this.$refs.serverStorage.offlineModeActive = this.offlineModeActive;
|
|
this.$refs.serverStorage.offlineModeActive = this.offlineModeActive;
|
|
@@ -710,7 +736,7 @@ class Reader extends Vue {
|
|
settingsToggle() {
|
|
settingsToggle() {
|
|
this.settingsActive = !this.settingsActive;
|
|
this.settingsActive = !this.settingsActive;
|
|
if (this.settingsActive) {
|
|
if (this.settingsActive) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.settingsActive = true;
|
|
this.settingsActive = true;
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
@@ -724,7 +750,7 @@ class Reader extends Vue {
|
|
helpToggle() {
|
|
helpToggle() {
|
|
this.helpActive = !this.helpActive;
|
|
this.helpActive = !this.helpActive;
|
|
if (this.helpActive) {
|
|
if (this.helpActive) {
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
this.helpActive = true;
|
|
this.helpActive = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -791,8 +817,9 @@ class Reader extends Vue {
|
|
case 'search':
|
|
case 'search':
|
|
case 'copyText':
|
|
case 'copyText':
|
|
case 'refresh':
|
|
case 'refresh':
|
|
- case 'offlineMode':
|
|
|
|
|
|
+ case 'libs':
|
|
case 'recentBooks':
|
|
case 'recentBooks':
|
|
|
|
+ case 'offlineMode':
|
|
case 'settings':
|
|
case 'settings':
|
|
if (this.progressActive) {
|
|
if (this.progressActive) {
|
|
classResult = classDisabled;
|
|
classResult = classDisabled;
|
|
@@ -896,7 +923,7 @@ class Reader extends Vue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- this.closeAllTextPages();
|
|
|
|
|
|
+ this.closeAllWindows();
|
|
|
|
|
|
let url = encodeURI(decodeURI(opts.url));
|
|
let url = encodeURI(decodeURI(opts.url));
|
|
|
|
|
|
@@ -1071,9 +1098,6 @@ class Reader extends Vue {
|
|
case 'help':
|
|
case 'help':
|
|
this.helpToggle();
|
|
this.helpToggle();
|
|
break;
|
|
break;
|
|
- case 'settings':
|
|
|
|
- this.settingsToggle();
|
|
|
|
- break;
|
|
|
|
case 'undoAction':
|
|
case 'undoAction':
|
|
this.undoAction();
|
|
this.undoAction();
|
|
break;
|
|
break;
|
|
@@ -1101,12 +1125,18 @@ class Reader extends Vue {
|
|
case 'refresh':
|
|
case 'refresh':
|
|
this.refreshBook();
|
|
this.refreshBook();
|
|
break;
|
|
break;
|
|
- case 'offlineMode':
|
|
|
|
- this.offlineModeToggle();
|
|
|
|
|
|
+ case 'libs':
|
|
|
|
+ this.libsToogle();
|
|
break;
|
|
break;
|
|
case 'recentBooks':
|
|
case 'recentBooks':
|
|
this.recentBooksToggle();
|
|
this.recentBooksToggle();
|
|
break;
|
|
break;
|
|
|
|
+ case 'offlineMode':
|
|
|
|
+ this.offlineModeToggle();
|
|
|
|
+ break;
|
|
|
|
+ case 'settings':
|
|
|
|
+ this.settingsToggle();
|
|
|
|
+ break;
|
|
case 'switchToolbar':
|
|
case 'switchToolbar':
|
|
this.toolBarToggle();
|
|
this.toolBarToggle();
|
|
break;
|
|
break;
|
|
@@ -1173,29 +1203,28 @@ class Reader extends Vue {
|
|
if (this.$root.stdDialog.active || this.$refs.dialog1.active || this.$refs.dialog2.active)
|
|
if (this.$root.stdDialog.active || this.$refs.dialog1.active || this.$refs.dialog2.active)
|
|
return result;
|
|
return result;
|
|
|
|
|
|
- let handled = false;
|
|
|
|
- if (!handled && this.helpActive)
|
|
|
|
- handled = this.$refs.helpPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.helpActive)
|
|
|
|
+ result = this.$refs.helpPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.settingsActive)
|
|
|
|
- handled = this.$refs.settingsPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.settingsActive)
|
|
|
|
+ result = this.$refs.settingsPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.recentBooksActive)
|
|
|
|
- handled = this.$refs.recentBooksPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.recentBooksActive)
|
|
|
|
+ result = this.$refs.recentBooksPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.setPositionActive)
|
|
|
|
- handled = this.$refs.setPositionPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.setPositionActive)
|
|
|
|
+ result = this.$refs.setPositionPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.searchActive)
|
|
|
|
- handled = this.$refs.searchPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.searchActive)
|
|
|
|
+ result = this.$refs.searchPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.copyTextActive)
|
|
|
|
- handled = this.$refs.copyTextPage.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.copyTextActive)
|
|
|
|
+ result = this.$refs.copyTextPage.keyHook(event);
|
|
|
|
|
|
- if (!handled && this.$refs.page && this.$refs.page.keyHook)
|
|
|
|
- handled = this.$refs.page.keyHook(event);
|
|
|
|
|
|
+ if (!result && this.$refs.page && this.$refs.page.keyHook)
|
|
|
|
+ result = this.$refs.page.keyHook(event);
|
|
|
|
|
|
- if (!handled && event.type == 'keydown') {
|
|
|
|
|
|
+ if (!result && event.type == 'keydown') {
|
|
const action = this.$root.readerActionByKeyEvent(event);
|
|
const action = this.$root.readerActionByKeyEvent(event);
|
|
|
|
|
|
if (action == 'loader') {
|
|
if (action == 'loader') {
|