diff --git a/client/components/Reader/Reader.vue b/client/components/Reader/Reader.vue
index c3a6fdf2..5b252535 100644
--- a/client/components/Reader/Reader.vue
+++ b/client/components/Reader/Reader.vue
@@ -96,64 +96,7 @@
-
-
-
-
+
@@ -178,13 +121,12 @@ import SettingsPage from './SettingsPage/SettingsPage.vue';
import HelpPage from './HelpPage/HelpPage.vue';
import ClickMapPage from './ClickMapPage/ClickMapPage.vue';
import ServerStorage from './ServerStorage/ServerStorage.vue';
-import Dialog from '../share/Dialog.vue';
+import ReaderDialogs from './ReaderDialogs/ReaderDialogs.vue';
import bookManager from './share/bookManager';
import rstore from '../../store/modules/reader';
import readerApi from '../../api/reader';
import * as utils from '../../share/utils';
-import {versionHistory} from './versionHistory';
export default @Component({
components: {
@@ -201,7 +143,7 @@ export default @Component({
HelpPage,
ClickMapPage,
ServerStorage,
- Dialog,
+ ReaderDialogs,
},
watch: {
bookPos: function(newValue) {
@@ -339,8 +281,7 @@ class Reader extends Vue {
this.updateRoute();
- await this.showWhatsNew();
- await this.showDonation();
+ await this.$refs.dialogs.init();
})();
}
@@ -351,8 +292,6 @@ class Reader extends Vue {
this.showClickMapPage = settings.showClickMapPage;
this.clickControl = settings.clickControl;
this.blinkCachedLoad = settings.blinkCachedLoad;
- this.showWhatsNewDialog = settings.showWhatsNewDialog;
- this.showDonationDialog2020 = settings.showDonationDialog2020;
this.showToolButton = settings.showToolButton;
this.enableSitesFilter = settings.enableSitesFilter;
@@ -416,64 +355,6 @@ class Reader extends Vue {
}
}
- async showWhatsNew() {
- await utils.sleep(2000);
-
- const whatsNew = versionHistory[0];
- if (this.showWhatsNewDialog &&
- whatsNew.showUntil >= utils.formatDate(new Date(), 'coDate') &&
- whatsNew.header != this.whatsNewContentHash) {
- this.whatsNewContent = 'Версия ' + whatsNew.header + whatsNew.content;
- this.whatsNewVisible = true;
- }
- }
-
- async showDonation() {
- await utils.sleep(3000);
- const today = utils.formatDate(new Date(), 'coDate');
-
- if ((this.mode == 'omnireader' || this.mode == 'liberama.top') && today < '2020-03-01' && this.showDonationDialog2020 && this.donationRemindDate != today) {
- this.donationVisible = true;
- }
- }
-
- donationDialogDisable() {
- this.donationVisible = false;
- if (this.showDonationDialog2020) {
- const newSettings = Object.assign({}, this.settings, { showDonationDialog2020: false });
- this.commit('reader/setSettings', newSettings);
- }
- }
-
- donationDialogRemind() {
- this.donationVisible = false;
- this.commit('reader/setDonationRemindDate', utils.formatDate(new Date(), 'coDate'));
- }
-
- openDonate() {
- this.donationVisible = false;
- this.donateToggle();
- }
-
- async copyLink(link) {
- const result = await utils.copyTextToClipboard(link);
- if (result)
- this.$root.notify.success(`Ссылка ${link} успешно скопирована в буфер обмена`);
- else
- this.$root.notify.error('Копирование не удалось');
- }
-
- openVersionHistory() {
- this.whatsNewVisible = false;
- this.versionHistoryToggle();
- }
-
- whatsNewDisable() {
- this.whatsNewVisible = false;
- const whatsNew = versionHistory[0];
- this.commit('reader/setWhatsNewContentHash', whatsNew.header);
- }
-
get routeParamPos() {
let result = undefined;
const q = this.$route.query;
@@ -577,14 +458,6 @@ class Reader extends Vue {
return this.$store.state.reader.settings;
}
- get whatsNewContentHash() {
- return this.$store.state.reader.whatsNewContentHash;
- }
-
- get donationRemindDate() {
- return this.$store.state.reader.donationRemindDate;
- }
-
addAction(pos) {
let a = this.actionList;
if (!a.length || a[a.length - 1] != pos) {
@@ -1228,9 +1101,12 @@ class Reader extends Vue {
keyHook(event) {
let result = false;
if (this.$root.rootRoute() == '/reader') {
- if (this.$root.stdDialog.active || this.$refs.dialog1.active || this.$refs.dialog2.active)
+ if (this.$root.stdDialog.active)
return result;
+ if (!result)
+ result = this.$refs.dialogs.keyHook(event);
+
if (!result && this.helpActive)
result = this.$refs.helpPage.keyHook(event);
@@ -1339,16 +1215,4 @@ class Reader extends Vue {
.clear {
color: rgba(0,0,0,0);
}
-
-.clickable {
- color: blue;
- text-decoration: underline;
- cursor: pointer;
-}
-
-.copy-icon {
- cursor: pointer;
- font-size: 120%;
- color: blue;
-}
diff --git a/client/components/Reader/ReaderDialogs/ReaderDialogs.vue b/client/components/Reader/ReaderDialogs/ReaderDialogs.vue
new file mode 100644
index 00000000..d5356c30
--- /dev/null
+++ b/client/components/Reader/ReaderDialogs/ReaderDialogs.vue
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/client/components/Reader/versionHistory.js b/client/components/Reader/versionHistory.js
index 85336aff..02038499 100644
--- a/client/components/Reader/versionHistory.js
+++ b/client/components/Reader/versionHistory.js
@@ -1,4 +1,16 @@
export const versionHistory = [
+{
+ showUntil: '2020-11-05',
+ header: '0.9.6 (2020-11-06)',
+ content:
+`
+
+ - завершена работа над новым окном "Библиотека"
+ - исправления багов
+
+`
+},
+
{
showUntil: '2020-10-31',
header: '0.9.5 (2020-11-01)',