-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #220 from hampster2018/latest_branch
Merged latest UTD changes to Development Branch for Beta test
- Loading branch information
Showing
122 changed files
with
34,759 additions
and
17,599 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+20.6 KB
src/assets/AnalyticalDashboardWelcomePages/Analytical_Dashboard_Welcome1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.6 KB
src/assets/AnalyticalDashboardWelcomePages/Analytical_Dashboard_Welcome2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+17 KB
src/assets/AnalyticalDashboardWelcomePages/Analytical_Dashboard_Welcome3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+13.1 KB
src/assets/AnalyticalDashboardWelcomePages/Analytical_Dashboard_Welcome4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
export interface FlashcardStatistics { | ||
id: string; // Unique identifier for the flashcard | ||
question: string; // The flashcard question | ||
numberOfErrors: number; // Number of errors made with this flashcard | ||
numberOfOccurrences: number; // Number of times the flashcard has been encountered | ||
} | ||
|
||
export const createFlashcardStatistics = ( | ||
id: string, | ||
question: string, | ||
initialErrors = 0, | ||
initialOccurrences = 0, | ||
): FlashcardStatistics => { | ||
return { | ||
id, | ||
question, | ||
numberOfErrors: initialErrors, | ||
numberOfOccurrences: initialOccurrences, | ||
}; | ||
}; | ||
|
||
export const flashcardStats: FlashcardStatistics[] = [ | ||
{ | ||
id: '1', | ||
question: 'hello', | ||
numberOfErrors: 1, | ||
numberOfOccurrences: 2, | ||
// Other properties... | ||
}, | ||
|
||
{ | ||
id: '2', | ||
question: 'chicken?', | ||
numberOfErrors: 2, | ||
numberOfOccurrences: 2, | ||
// Other properties... | ||
}, | ||
|
||
{ | ||
id: '3', | ||
question: 'null?', | ||
numberOfErrors: 2, | ||
numberOfOccurrences: 2, | ||
// Other properties... | ||
}, | ||
// Other FlashcardStatistics objects... | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
import type { Action, Computed, Thunk } from 'easy-peasy'; | ||
|
||
export interface flashCard { | ||
type: 'text' | 'image' | 'translation'; | ||
question: string; | ||
answer: string; | ||
imageSrc: string; | ||
tags: string[]; | ||
url: string; | ||
image: string; | ||
ebbinghausValue: number; | ||
nextReinforcement: number; | ||
timesTyped: number; | ||
timesErrored: number; | ||
} | ||
|
||
export interface sessionTrainingData { | ||
flashCard: flashCard; | ||
numberOfTimesWritten: number; | ||
numberOfTimesWrittenFast: number; | ||
numberOfTimesWrittenWrong: number; | ||
lastTenTimesSpeed: number[]; | ||
} | ||
|
||
export interface generatedData { | ||
flashCard: flashCard; | ||
sessionTrainingIndex: number; | ||
} | ||
|
||
export interface tag { | ||
key: string; | ||
index: number | undefined; | ||
} | ||
|
||
export interface flashCardActionModel { | ||
setLoadedFromStorage: Action<flashCardStoreStateModel>; | ||
updateLocalStorage: Action<flashCardStoreStateModel>; | ||
|
||
// Actions to add and remove cards from the active flash card set | ||
addFlashCard: Action<flashCardStoreStateModel, flashCard>; | ||
addEmptyFlashCard: Action<flashCardStoreStateModel>; | ||
removeFlashCard: Action<flashCardStoreStateModel, number>; | ||
editFlashCard: Action< | ||
flashCardStoreStateModel, | ||
{ index: number; newFlashCard: flashCard } | ||
>; | ||
|
||
// Actions to add and remove tags from the tag set | ||
addTagFlashCard: Action<flashCardStoreStateModel, tag>; | ||
removeTagFlashCard: Action<flashCardStoreStateModel, tag>; | ||
|
||
// Actions to get and set the last daily training date of a set | ||
setNextDailyTraining: Action<flashCardStoreStateModel, Date>; | ||
|
||
setSessionTrainingData: Action<flashCardStoreStateModel>; | ||
addTimeSessionTrainingData: Action<flashCardStoreStateModel, number[]>; | ||
|
||
fetchUserData: Thunk<flashCardActionModel>; | ||
} | ||
|
||
export interface flashCardStoreStateModel { | ||
loadedFromStorage: boolean; | ||
|
||
// All current flash card sets | ||
flashCards: flashCard[]; | ||
tags: { [key: string]: number[] }; | ||
|
||
sessionTrainingData: sessionTrainingData[]; | ||
|
||
nextTrainingDate: Date; | ||
|
||
// Number of flash cards to practice daily | ||
numberOfDailyFlashCards: number; | ||
|
||
activeFlashCards: Computed<flashCardStoreStateModel, flashCard[]>; | ||
|
||
percentageCompleted: Computed<flashCardStoreStateModel, number>; | ||
} | ||
|
||
export type FlashCardStoreModel = flashCardStoreStateModel & | ||
flashCardActionModel; |
Oops, something went wrong.