Compare commits

...

8 Commits

Author SHA1 Message Date
Book Pauk
f203384b00 Merge branch 'release/0.7.5a' 2019-10-23 23:57:51 +07:00
Book Pauk
9ac3be455c Поправки багов 2019-10-23 23:53:37 +07:00
Book Pauk
20b74a9dcd Небольшие поправки 2019-10-23 20:42:14 +07:00
Book Pauk
3b848a5a86 Исправления конфига nginx 2019-10-23 20:07:38 +07:00
Book Pauk
a9b5e865a5 Merge tag '0.7.5b' into develop
0.7.5b
2019-10-22 18:24:20 +07:00
Book Pauk
ab46a1b99d Merge branch 'release/0.7.5b' 2019-10-22 18:24:06 +07:00
Book Pauk
4a08465f5b Поправка бага 2019-10-22 18:23:17 +07:00
Book Pauk
a7960d6cd6 Merge tag '0.7.5' into develop
0.7.5
2019-10-22 17:59:15 +07:00
3 changed files with 30 additions and 15 deletions

View File

@@ -220,14 +220,19 @@ export default @Component({
bookPos: function(newValue) { bookPos: function(newValue) {
if (newValue !== undefined && this.activePage == 'TextPage') { if (newValue !== undefined && this.activePage == 'TextPage') {
const textPage = this.$refs.page; const textPage = this.$refs.page;
if (textPage.bookPos != newValue) { if (textPage.bookPos != newValue) {
textPage.bookPos = newValue; textPage.bookPos = newValue;
} }
this.debouncedSetRecentBook(newValue);
if (!this.scrollingActive)
this.debouncedSetRecentBook(newValue);
else
this.scrollingSetRecentBook(newValue);
} }
}, },
routeParamPos: function(newValue) { routeParamPos: function(newValue) {
if (newValue !== undefined && newValue != this.bookPos) { if (!this.paramPosIgnore && newValue !== undefined && newValue != this.bookPos) {
this.bookPos = newValue; this.bookPos = newValue;
} }
}, },
@@ -291,10 +296,6 @@ class Reader extends Vue {
this.lastActivePage = false; this.lastActivePage = false;
this.debouncedUpdateRoute = _.debounce(() => {
this.updateRoute();
}, 1000);
this.debouncedSetRecentBook = _.debounce(async(newValue) => { this.debouncedSetRecentBook = _.debounce(async(newValue) => {
const recent = this.mostRecentBook(); const recent = this.mostRecentBook();
if (recent && (recent.bookPos != newValue || recent.bookPosSeen !== this.bookPosSeen)) { if (recent && (recent.bookPos != newValue || recent.bookPosSeen !== this.bookPosSeen)) {
@@ -302,8 +303,17 @@ class Reader extends Vue {
if (this.actionCur < 0 || (this.actionCur >= 0 && this.actionList[this.actionCur] != newValue)) if (this.actionCur < 0 || (this.actionCur >= 0 && this.actionList[this.actionCur] != newValue))
this.addAction(newValue); this.addAction(newValue);
this.paramPosIgnore = true;
this.updateRoute();
await this.$nextTick();
this.paramPosIgnore = false;
} }
}, 500); }, 500, {'maxWait':5000});
this.scrollingSetRecentBook = _.debounce((newValue) => {
this.debouncedSetRecentBook(newValue);
}, 15000, {'maxWait':20000});
document.addEventListener('fullscreenchange', () => { document.addEventListener('fullscreenchange', () => {
this.fullScreenActive = (document.fullscreenElement !== null); this.fullScreenActive = (document.fullscreenElement !== null);
@@ -343,6 +353,8 @@ class Reader extends Vue {
await this.showWhatsNew(); await this.showWhatsNew();
await this.showMigration(); await this.showMigration();
this.updateRoute();
})(); })();
} }
@@ -507,7 +519,6 @@ class Reader extends Vue {
if (event.bookPosSeen !== undefined) if (event.bookPosSeen !== undefined)
this.bookPosSeen = event.bookPosSeen; this.bookPosSeen = event.bookPosSeen;
this.bookPos = event.bookPos; this.bookPos = event.bookPos;
this.debouncedUpdateRoute();
} }
async bookManagerEvent(eventName, value) { async bookManagerEvent(eventName, value) {
@@ -654,6 +665,10 @@ class Reader extends Vue {
page.stopTextScrolling(); page.stopTextScrolling();
} }
} }
if (!this.scrollingActive) {
this.scrollingSetRecentBook.flush();
}
} }
stopSearch() { stopSearch() {

View File

@@ -405,6 +405,11 @@ class ServerStorage extends Vue {
if (md.key && result[md.key]) if (md.key && result[md.key])
result[md.key] = utils.applyObjDiff(result[md.key], md.mod); result[md.key] = utils.applyObjDiff(result[md.key], md.mod);
if (!bookManager.loaded) {
this.warning('Ожидание загрузки списка книг перед синхронизацией');
while (!bookManager.loaded) await utils.sleep(100);
}
if (newRecent.rev != this.cachedRecent.rev) if (newRecent.rev != this.cachedRecent.rev)
await this.setCachedRecent(newRecent); await this.setCachedRecent(newRecent);
if (newRecentPatch.rev != this.cachedRecentPatch.rev) if (newRecentPatch.rev != this.cachedRecentPatch.rev)
@@ -412,11 +417,6 @@ class ServerStorage extends Vue {
if (newRecentMod.rev != this.cachedRecentMod.rev) if (newRecentMod.rev != this.cachedRecentMod.rev)
await this.setCachedRecentMod(newRecentMod); await this.setCachedRecentMod(newRecentMod);
if (!bookManager.loaded) {
this.warning('Ожидание загрузки списка книг перед синхронизацией');
while (!bookManager.loaded) await utils.sleep(100);
}
await bookManager.setRecent(result); await bookManager.setRecent(result);
} else { } else {
this.warning(`Неверный ответ сервера: ${recent.state}`); this.warning(`Неверный ответ сервера: ${recent.state}`);

View File

@@ -15,7 +15,7 @@ server {
gzip_types *; gzip_types *;
location /api { location /api {
proxy_pass http://localhost:44081; proxy_pass http://127.0.0.1:44081;
} }
location / { location / {
@@ -44,7 +44,7 @@ server {
gzip_types *; gzip_types *;
location /api { location /api {
proxy_pass http://localhost:44081; proxy_pass http://127.0.0.1:44081;
} }
location /tmp { location /tmp {