Skip to content

Commit

Permalink
Review fix for words without example sentence
Browse files Browse the repository at this point in the history
  • Loading branch information
simjanos-dev committed Sep 2, 2024
1 parent e44e64d commit 4c7c820
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/Services/VocabularyService.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public function getExampleSentence($userId, $targetType, $targetId) {
->first();

if (!$exampleSentence) {
throw new \Exception('Example sentence does not exist, or it belongs to a different user.');
return null;
}

$textBlock = new TextBlockService();
Expand Down
2 changes: 1 addition & 1 deletion resources/js/components/Home/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<v-card outlined class="rounded-lg pt-0 mr-4 mb-4" width="290px">
<v-card-title>Version</v-card-title>
<v-card-text>
The current LinguaCafe version is v0.13.
The current LinguaCafe version is v0.13.3
<div class="footer-link-box mb-1 mt-4">
<router-link to="/patch-notes"><v-icon class="mr-2">mdi-update</v-icon>Patch notes</router-link>
</div>
Expand Down
30 changes: 30 additions & 0 deletions resources/js/components/Home/PatchNotes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,36 @@
Patch notes
</div>

<v-card outlined class="rounded-lg mb-8">
<v-card-title>v0.13.3<v-spacer /> 2024.09.02.</v-card-title>
<v-card-text>
<b>Bug fixes:</b>
<ul>
<li>Fixed a bug on the review page that prevented reviewing words and phrases that had no example sentences.</li>
</ul>
</v-card-text>
</v-card>

<v-card outlined class="rounded-lg mb-8">
<v-card-title>v0.13.2<v-spacer /> 2024.08.30.</v-card-title>
<v-card-text>
<b>Bug fixes:</b>
<ul>
<li>Fixed website import.</li>
</ul>
</v-card-text>
</v-card>

<v-card outlined class="rounded-lg mb-8">
<v-card-title>v0.13.1<v-spacer /> 2024.08.29.</v-card-title>
<v-card-text>
<b>Bug fixes:</b>
<ul>
<li>Turkish temporary fix.</li>
</ul>
</v-card-text>
</v-card>

<v-card outlined class="rounded-lg mb-8">
<v-card-title>v0.13<v-spacer /> 2024.06.24.</v-card-title>
<v-card-text>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/Review/Review.vue
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@
'', '','', '', '', '', '', '', '', '', '', '?', '(', ')', ' ', ' NEWLINE ', '.', '%', '-',
'«', '»', "'", '', '', 'NEWLINE'];
if (this.settings.reviewSentenceMode === 'disabled') {
if (this.settings.reviewSentenceMode === 'disabled' || this.exampleSentence === null) {
if (this.reviews[this.currentReviewIndex].type == 'word') {
this.readWords ++;
} else {
Expand Down Expand Up @@ -662,7 +662,7 @@
this.exampleSentence = null;
axios.get('/vocabulary/example-sentence/' + this.reviews[this.currentReviewIndex].type + '/' + this.reviews[this.currentReviewIndex].id).then((response) => {
if (response.data !== 'no example sentence') {
if (response.data.words !== undefined) {
this.exampleSentence = {
id: 0,
words: response.data.words,
Expand Down

0 comments on commit 4c7c820

Please sign in to comment.