From 4bb22183df084795db8801f6e50270aef40becce Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Fri, 6 Nov 2020 17:57:16 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=20=D0=B4=D0=B8=D0=B0=D0=BB=D0=BE=D0=B3=20=D1=81=20=D1=81?= =?UTF-8?q?=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=D0=BC=20=D0=BE?= =?UTF-8?q?=20=D0=BD=D0=BE=D0=B2=D0=BE=D0=B9=20=D1=87=D0=B8=D1=82=D0=B0?= =?UTF-8?q?=D0=BB=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reader/ReaderDialogs/ReaderDialogs.vue | 61 +++++++++++++++++-- client/store/modules/reader.js | 1 + 2 files changed, 56 insertions(+), 6 deletions(-) diff --git a/client/components/Reader/ReaderDialogs/ReaderDialogs.vue b/client/components/Reader/ReaderDialogs/ReaderDialogs.vue index d5356c30..cf0ed906 100644 --- a/client/components/Reader/ReaderDialogs/ReaderDialogs.vue +++ b/client/components/Reader/ReaderDialogs/ReaderDialogs.vue @@ -57,6 +57,37 @@ Напомнить позже + + + + +
+ Создан новый ресурс:

+ + https://liberama.top +

+ Это клон читалки Omni Reader, но с некоторыми дополнениями, ориентированными в сторону более свободного обмена книгами: + +
    +
  • добавлено новое окно "Библиотека" для свободного доступа к Флибусте и другим ресурсам по желанию читателя
  • +
  • планируется добавить возможность создания подборок книг и обмена ими между пользователями
  • +
+ + Легко мигрировать на новый сайт можно с помощью синхронизации с сервером. + О багах и предложениях просьба сообщать на почту bookpauk@gmail.com

+ Спасибо, что вы с нами! +

+
+ Помочь проекту +
+
+ + + Больше не показывать + +
@@ -83,6 +114,7 @@ class ReaderDialogs extends Vue { whatsNewVisible = false; whatsNewContent = ''; donationVisible = false; + liberamaTopVisible = false; created() { this.commit = this.$store.commit; @@ -95,31 +127,32 @@ class ReaderDialogs extends Vue { async init() { await this.showWhatsNew(); await this.showDonation(); + await this.showLiberamaTop(); } loadSettings() { const settings = this.settings; this.showWhatsNewDialog = settings.showWhatsNewDialog; this.showDonationDialog2020 = settings.showDonationDialog2020; + this.showLiberamaTopDialog2020 = settings.showLiberamaTopDialog2020; } async showWhatsNew() { - await utils.sleep(2000); - const whatsNew = versionHistory[0]; if (this.showWhatsNewDialog && whatsNew.showUntil >= utils.formatDate(new Date(), 'coDate') && whatsNew.header != this.whatsNewContentHash) { + await utils.sleep(2000); 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) { + await utils.sleep(3000); this.donationVisible = true; } } @@ -127,8 +160,7 @@ class ReaderDialogs extends Vue { donationDialogDisable() { this.donationVisible = false; if (this.showDonationDialog2020) { - const newSettings = Object.assign({}, this.settings, { showDonationDialog2020: false }); - this.commit('reader/setSettings', newSettings); + this.commit('reader/setSettings', { showDonationDialog2020: false }); } } @@ -139,6 +171,7 @@ class ReaderDialogs extends Vue { openDonate() { this.donationVisible = false; + this.liberamaTopVisible = false; this.$emit('donate-toggle'); } @@ -177,8 +210,24 @@ class ReaderDialogs extends Vue { return this.$store.state.reader.donationRemindDate; } + async showLiberamaTop() { + const today = utils.formatDate(new Date(), 'coDate'); + + if (this.mode == 'omnireader' && today < '2020-12-01' && this.showLiberamaTopDialog2020) { + await utils.sleep(3000); + this.liberamaTopVisible = true; + } + } + + liberamaTopDialogDisable() { + this.liberamaTopVisible = false; + if (this.showLiberamaTopDialog2020) { + this.commit('reader/setSettings', { showLiberamaTopDialog2020: false }); + } + } + keyHook() { - if (this.$refs.dialog1.active || this.$refs.dialog2.active) + if (this.$refs.dialog1.active || this.$refs.dialog2.active || this.$refs.dialog3.active) return true; return false; } diff --git a/client/store/modules/reader.js b/client/store/modules/reader.js index b9b8cefc..48e78a7f 100644 --- a/client/store/modules/reader.js +++ b/client/store/modules/reader.js @@ -251,6 +251,7 @@ const settingDefaults = { showServerStorageMessages: true, showWhatsNewDialog: true, showDonationDialog2020: true, + showLiberamaTopDialog2020: true, enableSitesFilter: true, fontShifts: {},