Добавлен диалог с сообщением о новой читалке
This commit is contained in:
@@ -57,6 +57,37 @@
|
|||||||
<q-btn class="q-px-sm" dense no-caps @click="donationDialogRemind">Напомнить позже</q-btn>
|
<q-btn class="q-px-sm" dense no-caps @click="donationDialogRemind">Напомнить позже</q-btn>
|
||||||
</span>
|
</span>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
|
<Dialog ref="dialog3" v-model="liberamaTopVisible">
|
||||||
|
<template slot="header">
|
||||||
|
Здравствуйте, уважаемые читатели!
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div style="word-break: normal">
|
||||||
|
Создан новый ресурс:<br><br>
|
||||||
|
|
||||||
|
<a href="https://liberama.top" target="_blank">https://liberama.top</a>
|
||||||
|
<br><br>
|
||||||
|
Это клон читалки Omni Reader, но с некоторыми дополнениями, ориентированными в сторону более свободного обмена книгами:
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
<li>добавлено новое окно "Библиотека" для свободного доступа к Флибусте и другим ресурсам по желанию читателя</li>
|
||||||
|
<li>планируется добавить возможность создания подборок книг и обмена ими между пользователями</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
Легко мигрировать на новый сайт можно с помощью синхронизации с сервером.
|
||||||
|
О багах и предложениях просьба сообщать на почту <a href="mailto:bookpauk@gmail.com">bookpauk@gmail.com</a><br><br>
|
||||||
|
Спасибо, что вы с нами!
|
||||||
|
<br><br>
|
||||||
|
<div class="row justify-center">
|
||||||
|
<q-btn class="q-px-sm" color="primary" dense no-caps rounded @click="openDonate">Помочь проекту</q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span slot="footer">
|
||||||
|
<q-btn class="q-px-sm" dense no-caps @click="liberamaTopDialogDisable">Больше не показывать</q-btn>
|
||||||
|
</span>
|
||||||
|
</Dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -83,6 +114,7 @@ class ReaderDialogs extends Vue {
|
|||||||
whatsNewVisible = false;
|
whatsNewVisible = false;
|
||||||
whatsNewContent = '';
|
whatsNewContent = '';
|
||||||
donationVisible = false;
|
donationVisible = false;
|
||||||
|
liberamaTopVisible = false;
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.commit = this.$store.commit;
|
this.commit = this.$store.commit;
|
||||||
@@ -95,31 +127,32 @@ class ReaderDialogs extends Vue {
|
|||||||
async init() {
|
async init() {
|
||||||
await this.showWhatsNew();
|
await this.showWhatsNew();
|
||||||
await this.showDonation();
|
await this.showDonation();
|
||||||
|
await this.showLiberamaTop();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadSettings() {
|
loadSettings() {
|
||||||
const settings = this.settings;
|
const settings = this.settings;
|
||||||
this.showWhatsNewDialog = settings.showWhatsNewDialog;
|
this.showWhatsNewDialog = settings.showWhatsNewDialog;
|
||||||
this.showDonationDialog2020 = settings.showDonationDialog2020;
|
this.showDonationDialog2020 = settings.showDonationDialog2020;
|
||||||
|
this.showLiberamaTopDialog2020 = settings.showLiberamaTopDialog2020;
|
||||||
}
|
}
|
||||||
|
|
||||||
async showWhatsNew() {
|
async showWhatsNew() {
|
||||||
await utils.sleep(2000);
|
|
||||||
|
|
||||||
const whatsNew = versionHistory[0];
|
const whatsNew = versionHistory[0];
|
||||||
if (this.showWhatsNewDialog &&
|
if (this.showWhatsNewDialog &&
|
||||||
whatsNew.showUntil >= utils.formatDate(new Date(), 'coDate') &&
|
whatsNew.showUntil >= utils.formatDate(new Date(), 'coDate') &&
|
||||||
whatsNew.header != this.whatsNewContentHash) {
|
whatsNew.header != this.whatsNewContentHash) {
|
||||||
|
await utils.sleep(2000);
|
||||||
this.whatsNewContent = 'Версия ' + whatsNew.header + whatsNew.content;
|
this.whatsNewContent = 'Версия ' + whatsNew.header + whatsNew.content;
|
||||||
this.whatsNewVisible = true;
|
this.whatsNewVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async showDonation() {
|
async showDonation() {
|
||||||
await utils.sleep(3000);
|
|
||||||
const today = utils.formatDate(new Date(), 'coDate');
|
const today = utils.formatDate(new Date(), 'coDate');
|
||||||
|
|
||||||
if ((this.mode == 'omnireader' || this.mode == 'liberama.top') && 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) {
|
||||||
|
await utils.sleep(3000);
|
||||||
this.donationVisible = true;
|
this.donationVisible = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,8 +160,7 @@ class ReaderDialogs extends Vue {
|
|||||||
donationDialogDisable() {
|
donationDialogDisable() {
|
||||||
this.donationVisible = false;
|
this.donationVisible = false;
|
||||||
if (this.showDonationDialog2020) {
|
if (this.showDonationDialog2020) {
|
||||||
const newSettings = Object.assign({}, this.settings, { showDonationDialog2020: false });
|
this.commit('reader/setSettings', { showDonationDialog2020: false });
|
||||||
this.commit('reader/setSettings', newSettings);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,6 +171,7 @@ class ReaderDialogs extends Vue {
|
|||||||
|
|
||||||
openDonate() {
|
openDonate() {
|
||||||
this.donationVisible = false;
|
this.donationVisible = false;
|
||||||
|
this.liberamaTopVisible = false;
|
||||||
this.$emit('donate-toggle');
|
this.$emit('donate-toggle');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -177,8 +210,24 @@ class ReaderDialogs extends Vue {
|
|||||||
return this.$store.state.reader.donationRemindDate;
|
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() {
|
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 true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -251,6 +251,7 @@ const settingDefaults = {
|
|||||||
showServerStorageMessages: true,
|
showServerStorageMessages: true,
|
||||||
showWhatsNewDialog: true,
|
showWhatsNewDialog: true,
|
||||||
showDonationDialog2020: true,
|
showDonationDialog2020: true,
|
||||||
|
showLiberamaTopDialog2020: true,
|
||||||
enableSitesFilter: true,
|
enableSitesFilter: true,
|
||||||
|
|
||||||
fontShifts: {},
|
fontShifts: {},
|
||||||
|
|||||||
Reference in New Issue
Block a user