diff --git a/resources/js/app.js b/resources/js/app.js
index 9f52a119..6856b951 100755
--- a/resources/js/app.js
+++ b/resources/js/app.js
@@ -145,7 +145,7 @@ const router = new VueRouter({
{ path: '/login', component: LoginForm },
{ path: '/admin', component: AdminLayout },
{ path: '/media-player', component: MediaPlayer },
- { path: '/books', component: Books },
+ { path: '/books/:bookId?', component: Books },
{ path: '/chapters/read/:chapterId', component: TextReader },
{ path: '/flashcards', component: FlashcardCollectionList },
{ path: '/flashcards/edit/:flashcardCollectionId?', component: FlashcardCollection },
diff --git a/resources/js/components/Home/PatchNotes.vue b/resources/js/components/Home/PatchNotes.vue
index c878d0aa..abb1be25 100644
--- a/resources/js/components/Home/PatchNotes.vue
+++ b/resources/js/components/Home/PatchNotes.vue
@@ -15,16 +15,27 @@
Added hotkeys for the text reader and review pages.
+
+ Added proper finish reading screen.
+
+
Bug fixes:
-
- Users clicking anywhere outside of the vocabulary box will close the vocabulary box. Previously it only worked if the user clicked on empty space inside the text box.
+ Users clicking anywhere outside of the vocabulary box will close the vocabulary box. Previously it only worked if the user clicked on an empty space inside the text box.
-
Increased maximum execution time for importing dictionaries. If your dictionary import did not end with a success message but still functional, I recommend importing it again, because it probably did not import all the records from the dictionary file.
+
+ Other changes:
+
+ -
+ Updated node.js to v20.11.0.
+
+
diff --git a/resources/js/components/Library/Books.vue b/resources/js/components/Library/Books.vue
index 548f9aa1..aaeef8db 100644
--- a/resources/js/components/Library/Books.vue
+++ b/resources/js/components/Library/Books.vue
@@ -320,14 +320,24 @@
for (let bookIndex = 0; bookIndex < this.books.length; bookIndex ++) {
if (bookId !== this.books[bookIndex].id) {
this.books[bookIndex].chaptersVisible = false;
+
} else {
this.anyChapterVisible = !this.books[bookIndex].chaptersVisible;
this.books[bookIndex].chaptersVisible = !this.books[bookIndex].chaptersVisible;
+
setTimeout(() => {
document.getElementById('book-' + bookId).scrollIntoView();
}, 500);
}
}
+
+ if (this.anyChapterVisible && this.$router.currentRoute.fullPath !== ('/books/' + bookId)) {
+ this.$router.push('/books/' + bookId);
+ }
+
+ if (!this.anyChapterVisible && this.$router.currentRoute.fullPath !== ('/books')) {
+ this.$router.push('/books');
+ }
},
showStartReviewDialog(bookId, bookName) {
this.startReviewDialog.bookName = bookName;
@@ -347,6 +357,10 @@
}
this.books = response.data;
+
+ if (this.$route.params.bookId !== undefined) {
+ this.toggleChapters(parseInt(this.$route.params.bookId));
+ }
});
},
formatNumber: formatNumber
diff --git a/resources/js/components/Text/TextBlockGroup.vue b/resources/js/components/Text/TextBlockGroup.vue
index 9e991d9c..bb07c7ef 100644
--- a/resources/js/components/Text/TextBlockGroup.vue
+++ b/resources/js/components/Text/TextBlockGroup.vue
@@ -107,7 +107,7 @@
@@ -211,6 +212,7 @@
rounded
v-model="baseWord"
@change="inputChanged"
+ @keydown.stop=";"
>
@@ -236,6 +239,7 @@
rounded
v-model="baseWordReading"
@change="inputChanged"
+ @keydown.stop=";"
>
@@ -262,6 +267,7 @@
height="100"
v-model="reading"
@change="inputChanged"
+ @keydown.stop=";"
>
diff --git a/resources/js/components/Text/VocabularySearchBox.vue b/resources/js/components/Text/VocabularySearchBox.vue
index 268d3d99..8fef3b55 100644
--- a/resources/js/components/Text/VocabularySearchBox.vue
+++ b/resources/js/components/Text/VocabularySearchBox.vue
@@ -10,6 +10,7 @@
hide-details
v-model="searchField"
@change="makeSearchRequest"
+ @keydown.stop=";"
>
diff --git a/resources/js/components/Text/VocabularySideBox.vue b/resources/js/components/Text/VocabularySideBox.vue
index e0b190c2..ff28a233 100644
--- a/resources/js/components/Text/VocabularySideBox.vue
+++ b/resources/js/components/Text/VocabularySideBox.vue
@@ -58,6 +58,7 @@
rounded
v-model="baseWord"
@change="inputChanged"
+ @keydown.stop=";"
>
mdi-arrow-right
@@ -84,6 +86,7 @@
rounded
v-model="baseWordReading"
@change="inputChanged"
+ @keydown.stop=";"
>
mdi-arrow-right
@@ -111,6 +115,7 @@
height="80"
disabled
:value="phraseText"
+ @keydown.stop=";"
>
@@ -126,6 +131,7 @@
height="80"
v-model="reading"
@change="inputChanged"
+ @keydown.stop=";"
>
@@ -190,6 +196,7 @@
height="100"
v-model="translationText"
@change="inputChanged"
+ @keydown.stop=";"
>
@@ -316,7 +323,6 @@
this.$emit('unselectAllWords');
},
addSelectedWordToAnki() {
- console.log('sending to anki');
this.$emit('addSelectedWordToAnki');
},
close() {
diff --git a/resources/js/components/TextReader/TextReader.vue b/resources/js/components/TextReader/TextReader.vue
index 93055499..6c090cb9 100644
--- a/resources/js/components/TextReader/TextReader.vue
+++ b/resources/js/components/TextReader/TextReader.vue
@@ -124,46 +124,58 @@
-
-
-
Congratulations! You have finished {{ lessonName }}!
+
+
+
+ mdi-bookmark-checkCongratulations!
+
+
+
+ You have finished reading this chapter: {{ lessonName }}, and you have read {{ formatNumber(wordCount) }} words. Keep up the good work, and your
+ {{ language }} skills will improve steadily. Consistency is key!
-
-
-
- Word type |
- Amount |
-
-
-
-
- Read words: |
- {{ wordCount }} |
-
-
- Newly saved words: |
- {{ newlySavedWords }} |
-
-
- Learned words: |
- {{ learnedWords }} |
-
-
- Progressed words: |
- {{ progressedWords }} |
-
-
-
-
- Go to lessons
- Go to next lesson
-
-
+
+
+ This was the last chapter in this book.
+
+
+
+
+
+
+
+ mdi-book-open-variant
+ Library
+
+
+ mdi-page-next-outline
+ Next chapter
+
+
+
diff --git a/resources/js/components/TextReader/TextReaderHotkeyInformationDialog.vue b/resources/js/components/TextReader/TextReaderHotkeyInformationDialog.vue
index e270336c..e8becee9 100644
--- a/resources/js/components/TextReader/TextReaderHotkeyInformationDialog.vue
+++ b/resources/js/components/TextReader/TextReaderHotkeyInformationDialog.vue
@@ -52,7 +52,7 @@
sDecrease font size
- rSend word or phrase to anki
+ fSend word or phrase to anki
EscUnselect word or phrase
diff --git a/resources/sass/TextReader/TextReader.scss b/resources/sass/TextReader/TextReader.scss
index c223bbd1..012932ae 100644
--- a/resources/sass/TextReader/TextReader.scss
+++ b/resources/sass/TextReader/TextReader.scss
@@ -105,8 +105,6 @@
}
#finished-box {
- display: block;
- height: calc(100% - 53px);
#lesson-finished-text {
width: 100%;
diff --git a/routes/web.php b/routes/web.php
index 2f448a71..94b419dd 100755
--- a/routes/web.php
+++ b/routes/web.php
@@ -41,7 +41,7 @@
Route::get('/patch-notes', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/admin', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/media-player', [App\Http\Controllers\HomeController::class, 'index']);
- Route::get('/books', [App\Http\Controllers\HomeController::class, 'index']);
+ Route::get('/books/{bookId?}', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/book/create', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/chapters/{id}', [App\Http\Controllers\HomeController::class, 'index']);
Route::get('/chapters/read/{id}', [App\Http\Controllers\HomeController::class, 'index']);