BugFix: Anzeige words to review, new packages
This commit is contained in:
parent
2f16c30dad
commit
308e40ee9c
|
|
@ -130,5 +130,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"cli": {
|
||||||
|
"analytics": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -33,6 +33,7 @@
|
||||||
"@angular/cli": "^19.1.7",
|
"@angular/cli": "^19.1.7",
|
||||||
"@angular/compiler-cli": "^19.1.0",
|
"@angular/compiler-cli": "^19.1.0",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
|
"concurrently": "^9.1.2",
|
||||||
"jasmine-core": "~5.5.0",
|
"jasmine-core": "~5.5.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
|
|
@ -7981,6 +7982,48 @@
|
||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/concurrently": {
|
||||||
|
"version": "9.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.1.2.tgz",
|
||||||
|
"integrity": "sha512-H9MWcoPsYddwbOGM6difjVwVZHl63nwMEwDJG/L7VGtuaJhb12h2caPG2tVPWs7emuYix252iGfqOyrz1GczTQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"chalk": "^4.1.2",
|
||||||
|
"lodash": "^4.17.21",
|
||||||
|
"rxjs": "^7.8.1",
|
||||||
|
"shell-quote": "^1.8.1",
|
||||||
|
"supports-color": "^8.1.1",
|
||||||
|
"tree-kill": "^1.2.2",
|
||||||
|
"yargs": "^17.7.2"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"conc": "dist/bin/concurrently.js",
|
||||||
|
"concurrently": "dist/bin/concurrently.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/open-cli-tools/concurrently?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/concurrently/node_modules/supports-color": {
|
||||||
|
"version": "8.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz",
|
||||||
|
"integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"has-flag": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/connect": {
|
"node_modules/connect": {
|
||||||
"version": "3.7.0",
|
"version": "3.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz",
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve --port=4202",
|
"start": "ng serve --port=4202",
|
||||||
|
"start-all": "concurrently 'ng serve --port=4202' 'http-server ../vocab-backend'",
|
||||||
"build": "ng build",
|
"build": "ng build",
|
||||||
"watch": "ng build --watch --configuration development",
|
"watch": "ng build --watch --configuration development",
|
||||||
"test": "ng test"
|
"test": "ng test"
|
||||||
|
|
@ -35,6 +36,7 @@
|
||||||
"@angular/cli": "^19.1.7",
|
"@angular/cli": "^19.1.7",
|
||||||
"@angular/compiler-cli": "^19.1.0",
|
"@angular/compiler-cli": "^19.1.0",
|
||||||
"@types/jasmine": "~5.1.0",
|
"@types/jasmine": "~5.1.0",
|
||||||
|
"concurrently": "^9.1.2",
|
||||||
"jasmine-core": "~5.5.0",
|
"jasmine-core": "~5.5.0",
|
||||||
"karma": "~6.4.0",
|
"karma": "~6.4.0",
|
||||||
"karma-chrome-launcher": "~3.2.0",
|
"karma-chrome-launcher": "~3.2.0",
|
||||||
|
|
|
||||||
|
|
@ -518,11 +518,9 @@ export class DeckListComponent implements OnInit {
|
||||||
}
|
}
|
||||||
// Methode zur Berechnung der Anzahl der zu bearbeitenden Wörter
|
// Methode zur Berechnung der Anzahl der zu bearbeitenden Wörter
|
||||||
getWordsToReview(deck: Deck): number {
|
getWordsToReview(deck: Deck): number {
|
||||||
// const nextTraining = this.getNextTrainingDate(deck);
|
const nextTraining = this.getNextTrainingDate(deck);
|
||||||
// return deck.images.flatMap(image => image.boxes.filter(box => (box.due && new Date(box.due * 86400000) <= new Date(nextTraining)) || !box.due)).length;
|
|
||||||
const today = this.getTodayInDays();
|
const today = this.getTodayInDays();
|
||||||
return deck.images.flatMap(image => image.boxes.filter(box => (box.due && box.due <= today) || !box.due)).length;
|
return deck.images.flatMap(image => image.boxes.map(box => (box.due ? box.due : null))).filter(e=>e===nextTraining).length;
|
||||||
// this.currentImageData.boxes.filter(box => box.due === undefined || box.due <= today);
|
|
||||||
}
|
}
|
||||||
getTodayInDays(): number {
|
getTodayInDays(): number {
|
||||||
const epoch = new Date(1970, 0, 1); // Anki uses UNIX epoch
|
const epoch = new Date(1970, 0, 1); // Anki uses UNIX epoch
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue