Skip to content

Commit a6ba66b

Browse files
committed
fix some stuff
1 parent bf4b030 commit a6ba66b

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

electron/dist/latest.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
version: 1.0.1
1+
version: 1.0.4
22
files:
3-
- url: learnify2-Setup-1.0.1.exe
4-
sha512: 2gMUlrYn1yXqRLZj+7OYogEXXxtd1A9ewjfbPCxGFINcFIVwrao+4Qmulx+hm7Nz3iQF2DUiRIunijRRzMBoGA==
5-
size: 74317283
6-
path: learnify2-Setup-1.0.1.exe
7-
sha512: 2gMUlrYn1yXqRLZj+7OYogEXXxtd1A9ewjfbPCxGFINcFIVwrao+4Qmulx+hm7Nz3iQF2DUiRIunijRRzMBoGA==
8-
releaseDate: '2023-01-22T18:08:29.532Z'
3+
- url: learnify2-Setup-1.0.4.exe
4+
sha512: +72JN+T4KziORyIMfRLU8NLsg9HHvzT+8uoeuL1vI5ZDHUcUYJ/6Ud8gD9QdC8Y6PW1FWJwPPe2v3EQVT/3VVw==
5+
size: 74316023
6+
path: learnify2-Setup-1.0.4.exe
7+
sha512: +72JN+T4KziORyIMfRLU8NLsg9HHvzT+8uoeuL1vI5ZDHUcUYJ/6Ud8gD9QdC8Y6PW1FWJwPPe2v3EQVT/3VVw==
8+
releaseDate: '2023-01-24T16:06:49.932Z'

electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "learnify2",
3-
"version": "1.0.1",
3+
"version": "1.0.5",
44
"description": "An amazing learning App",
55
"author": {
66
"name": "Lukas Datler",

src/app/home/home.page.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,18 @@
5454
target="_blank">Patreon</a>.
5555
</ion-card-subtitle>
5656
</ion-item>
57+
<ion-item>
58+
<ion-card-title>
59+
How to contribute Learnify?
60+
</ion-card-title>
61+
</ion-item>
62+
<ion-item>
63+
<ion-card-subtitle>
64+
You can contribute Learnify by creating an issue or pull request on <a href="https://github.com/LDprg/learnify2"
65+
rel="noopener noreferrer"
66+
target="_blank">Github</a>.
67+
</ion-card-subtitle>
68+
</ion-item>
5769
</ion-card-content>
5870
</ion-card>
5971
</ion-col>

src/app/learning/learning.page.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
-
2222
</ion-label>
2323
<ion-label>
24-
{{(this.index / this.data?.length) * 100}}%
24+
{{this.floor((this.index / this.data?.length) * 100)}}%
2525
</ion-label>
2626
<ion-label></ion-label>
2727
<ion-label></ion-label>
@@ -117,17 +117,17 @@
117117
<ion-row>
118118
<ion-col>
119119
<ion-item class="ion-text-center ion-text-wrap" color="success">
120-
<ion-label>{{this.correctCount}} - {{100 * this.correctCount/this.index}}% Correct</ion-label>
120+
<ion-label>{{this.correctCount}} - {{this.floor(100 * this.correctCount/this.index)}}% Correct</ion-label>
121121
</ion-item>
122122
</ion-col>
123123
<ion-col>
124124
<ion-item class="ion-text-center ion-text-wrap" color="warning">
125-
<ion-label>{{this.skippedCount}} - {{100 * this.skippedCount/this.index}}% Skipped</ion-label>
125+
<ion-label>{{this.skippedCount}} - {{this.floor(100 * this.skippedCount/this.index)}}% Skipped</ion-label>
126126
</ion-item>
127127
</ion-col>
128128
<ion-col>
129129
<ion-item class="ion-text-center ion-text-wrap" color="danger">
130-
<ion-label>{{this.index - this.correctCount - this.skippedCount}} - {{100 * (this.index - this.correctCount - this.skippedCount)/this.index}}% Wrong</ion-label>
130+
<ion-label>{{this.index - this.correctCount - this.skippedCount}} - {{this.floor(100 * (this.index - this.correctCount - this.skippedCount)/this.index)}}% Wrong</ion-label>
131131
</ion-item>
132132
</ion-col>
133133
</ion-row>

src/app/learning/learning.page.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ export class LearningPage implements OnInit, ViewWillEnter {
8181
this.setFocus();
8282
}
8383

84+
floor(value: number) {
85+
return Math.round(value);
86+
}
87+
8488
getQuestion() {
8589
if (this.data !== undefined) {
8690
return this.data[this.index].first;
@@ -143,6 +147,8 @@ export class LearningPage implements OnInit, ViewWillEnter {
143147
}
144148

145149
checkAnswer() {
150+
if (this.tempReadonly) return;
151+
146152
let answer = this.getAnswerText().trim();
147153
let correct = this.getAnswer().trim();
148154

@@ -166,6 +172,8 @@ export class LearningPage implements OnInit, ViewWillEnter {
166172
}
167173

168174
enterAnswer() {
175+
if (this.tempReadonly) return;
176+
169177
let answer = this.getAnswerText().trim();
170178
let correct = this.getAnswer().trim();
171179

@@ -186,6 +194,8 @@ export class LearningPage implements OnInit, ViewWillEnter {
186194
}
187195

188196
skip() {
197+
if (this.tempReadonly) return;
198+
189199
this.status = Status.Ask;
190200
this.skippedCount++;
191201
this.apiService.updateUserStats(this.id, this.data[this.index]._id, "skip");
@@ -194,6 +204,8 @@ export class LearningPage implements OnInit, ViewWillEnter {
194204
}
195205

196206
changeWrong() {
207+
if (this.tempReadonly) return;
208+
197209
this.status = Status.Ask;
198210
this.correctCount++;
199211
this.data[this.index].changed = true;
@@ -204,6 +216,8 @@ export class LearningPage implements OnInit, ViewWillEnter {
204216
}
205217

206218
nextItem() {
219+
if (this.tempReadonly) return;
220+
207221
this.answerText = "";
208222

209223
this.index++;

0 commit comments

Comments
 (0)