From 066e9d3c38b2fe44a7c0e882fc6ca4d37818f2e5 Mon Sep 17 00:00:00 2001 From: Rene Fischer Date: Fri, 26 Jun 2020 20:09:17 +0200 Subject: [PATCH] refactor code Co-authored-by: Niko Lockenvitz --- src/App.vue | 106 +++++++++--------------- src/components/layout/NavigationBar.vue | 16 ++-- src/components/layout/navbar.json | 22 +++++ src/helpers/addDecksHelper.ts | 6 +- src/helpers/cardSelectionHelper.ts | 49 +++++++++++ src/helpers/eventListener.ts | 42 ++++++++++ src/helpers/localStorageHelper.ts | 4 +- src/helpers/quitLearningDialogHelper.ts | 23 +++++ src/helpers/selectedDeckDialogHelper.ts | 23 ----- src/helpers/snackbarHelper.ts | 13 +++ src/types/index.ts | 39 ++++++++- src/views/Learn.vue | 2 + tsconfig.json | 1 + 13 files changed, 240 insertions(+), 106 deletions(-) create mode 100644 src/components/layout/navbar.json create mode 100644 src/helpers/cardSelectionHelper.ts create mode 100644 src/helpers/eventListener.ts create mode 100644 src/helpers/quitLearningDialogHelper.ts create mode 100644 src/helpers/snackbarHelper.ts diff --git a/src/App.vue b/src/App.vue index 8a8dc23..b7acef0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,23 +3,26 @@ - + - + {{ snackbar.text }} - @@ -14,6 +15,7 @@ export default { name: "Learn", props: { decks: Array, + learningSession: Object, numberOfSelectedDecks: Number, }, components: { diff --git a/tsconfig.json b/tsconfig.json index b8b190a..9f04721 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "jsx": "preserve", "importHelpers": true, "moduleResolution": "node", + "resolveJsonModule": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "sourceMap": true,