Поправки багов
This commit is contained in:
@@ -200,7 +200,10 @@ class HistoryPage extends Vue {
|
|||||||
const newRecent = bookManager.mostRecentBook();
|
const newRecent = bookManager.mostRecentBook();
|
||||||
if (this.mostRecentBook != newRecent)
|
if (this.mostRecentBook != newRecent)
|
||||||
this.$emit('load-book', newRecent);
|
this.$emit('load-book', newRecent);
|
||||||
|
|
||||||
this.mostRecentBook = newRecent;
|
this.mostRecentBook = newRecent;
|
||||||
|
if (!this.mostRecentBook)
|
||||||
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
loadBook(url) {
|
loadBook(url) {
|
||||||
|
|||||||
@@ -203,8 +203,9 @@ class Reader extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateRoute(isNewRoute) {
|
updateRoute(isNewRoute) {
|
||||||
const pos = (this.bookPos != undefined && this.allowUrlParamBookPos ? `__p=${this.bookPos}&` : '');
|
const recent = this.mostRecentBook();
|
||||||
const url = (this.mostRecentBook() ? `url=${this.mostRecentBook().url}` : '');
|
const pos = (recent && recent.bookPos && this.allowUrlParamBookPos ? `__p=${recent.bookPos}&` : '');
|
||||||
|
const url = (recent ? `url=${recent.url}` : '');
|
||||||
if (isNewRoute)
|
if (isNewRoute)
|
||||||
this.$router.push(`/reader?${pos}${url}`);
|
this.$router.push(`/reader?${pos}${url}`);
|
||||||
else
|
else
|
||||||
@@ -236,8 +237,6 @@ class Reader extends Vue {
|
|||||||
|
|
||||||
mostRecentBook() {
|
mostRecentBook() {
|
||||||
const result = bookManager.mostRecentBook();
|
const result = bookManager.mostRecentBook();
|
||||||
if (!result)
|
|
||||||
this.closeAllTextPages();
|
|
||||||
this.mostRecentBookReactive = result;
|
this.mostRecentBookReactive = result;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -363,7 +362,7 @@ class Reader extends Vue {
|
|||||||
this.$refs.copyTextPage.init(this.mostRecentBook().bookPos, page.parsed, this.copyFullText);
|
this.$refs.copyTextPage.init(this.mostRecentBook().bookPos, page.parsed, this.copyFullText);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.searchActive = false;
|
this.copyTextActive = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -511,7 +510,7 @@ class Reader extends Vue {
|
|||||||
this.mostRecentBook();
|
this.mostRecentBook();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.progressActive = true;
|
this.progressActive = true;
|
||||||
this.$nextTick(async() => {
|
this.$nextTick(async() => {
|
||||||
const progress = this.$refs.page;
|
const progress = this.$refs.page;
|
||||||
|
|||||||
Reference in New Issue
Block a user