Compare commits

..

5 Commits

Author SHA1 Message Date
Book Pauk
f650124428 Merge branch 'release/0.7.1c' 2019-09-20 23:54:38 +07:00
Book Pauk
795d109c76 Поправил описание 2019-09-20 23:54:02 +07:00
Book Pauk
6868b3effc Добавлена кнопка offlineMode 2019-09-20 23:52:45 +07:00
Book Pauk
26747b7013 Небольшие поправки 2019-09-20 22:44:36 +07:00
Book Pauk
5198f8aa60 Merge tag '0.7.1b' into develop
0.7.1b
2019-09-20 22:18:09 +07:00
7 changed files with 77 additions and 56 deletions

View File

@@ -38,6 +38,9 @@
<el-tooltip v-show="showToolButton['recentBooks']" content="Открыть недавние" :open-delay="1000" effect="light">
<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 v-show="showToolButton['offlineMode']" content="Автономный режим (без интернета)" :open-delay="1000" effect="light">
<el-button ref="offlineMode" class="tool-button" :class="buttonActiveClass('offlineMode')" @click="buttonClick('offlineMode')"><i class="el-icon-connection"></i></el-button>
</el-tooltip>
</div>
<el-tooltip content="Настроить" :open-delay="1000" effect="light">
@@ -257,6 +260,7 @@ class Reader extends Vue {
searchActive = false;
copyTextActive = false;
recentBooksActive = false;
offlineModeActive = false;
settingsActive = false;
helpActive = false;
clickMapActive = false;
@@ -696,6 +700,11 @@ class Reader extends Vue {
}
}
offlineModeToggle() {
this.offlineModeActive = !this.offlineModeActive;
this.$refs.serverStorage.offlineModeActive = this.offlineModeActive;
}
settingsToggle() {
this.settingsActive = !this.settingsActive;
if (this.settingsActive) {
@@ -781,11 +790,14 @@ class Reader extends Vue {
case 'copyText':
this.copyTextToggle();
break;
case 'refresh':
this.refreshBook();
break;
case 'recentBooks':
this.recentBooksToggle();
break;
case 'refresh':
this.refreshBook();
case 'offlineMode':
this.offlineModeToggle();
break;
case 'settings':
this.settingsToggle();
@@ -806,6 +818,7 @@ class Reader extends Vue {
case 'search':
case 'copyText':
case 'recentBooks':
case 'offlineMode':
case 'settings':
if (this[`${button}Active`])
classResult = classActive;

View File

@@ -77,6 +77,7 @@ class ServerStorage extends Vue {
if (eventName == 'recent-changed') {
if (itemKey) {
if (!this.recentDeltaInited) {
await this.loadRecent();
this.warning('Функции сохранения на сервер пока недоступны');
return;
}
@@ -175,12 +176,12 @@ class ServerStorage extends Vue {
}
warning(message) {
if (this.showServerStorageMessages)
if (this.showServerStorageMessages && !this.offlineModeActive)
this.$notify.warning({message});
}
error(message) {
if (this.showServerStorageMessages)
if (this.showServerStorageMessages && !this.offlineModeActive)
this.$notify.error({message});
}
@@ -362,9 +363,11 @@ class ServerStorage extends Vue {
}
async loadRecent(skipRevCheck = false, doNotifySuccess = true) {
if (!this.keyInited || !this.serverSyncEnabled)
if (!this.keyInited || !this.serverSyncEnabled || this.loadingRecent)
return;
this.loadingRecent = true;
try {
const oldRecentRev = bookManager.recentRev;
const oldRecentDeltaRev = bookManager.recentDeltaRev;
//проверим ревизию на сервере
@@ -430,6 +433,9 @@ class ServerStorage extends Vue {
if (doNotifySuccess)
this.debouncedNotifySuccess();
} finally {
this.loadingRecent = false;
}
}
async saveRecent(itemKey, recurse) {

View File

@@ -6,6 +6,7 @@ export const versionHistory = [
`
<ul>
<li>исправления багов</li>
<li>на панель управления добавлена кнопка "Автономный режим"</li>
</ul>
`
},

View File

@@ -9,6 +9,7 @@ const toolButtons = [
{name: 'copyText', show: false, text: 'Скопировать текст со страницы'},
{name: 'refresh', show: true, text: 'Принудительно обновить книгу'},
{name: 'recentBooks', show: true, text: 'Открыть недавние'},
{name: 'offlineMode', show: false, text: 'Автономный режим (без интернета)'},
];
const fonts = [

Binary file not shown.

File diff suppressed because one or more lines are too long