Startup dialog on first run

This commit is contained in:
2024-11-06 16:45:36 +01:00
parent b7eca62403
commit 80dd2a0ae8
4 changed files with 49 additions and 3 deletions

View File

@@ -28,7 +28,11 @@ export const usePreferencesStore = defineStore('preferencesStore', {
/** Show the "Delete Exercise progress?" confirm dialog */
showDeleteExerciseDialog: ref(false),
staticFiles: ref([])
/** List of files on the server */
staticFiles: ref([]),
/** Marks the first run of the app */
firstStartup: useLocalStorage<Boolean>("hackmycart/preferencesStore/firstStartup", true)
}),
actions: {
@@ -102,6 +106,13 @@ export const usePreferencesStore = defineStore('preferencesStore', {
this.staticFiles = res.data
this.fetchInProgress = false
})
},
async firstStartupRoutine() {
await this.resetDb()
await this.resetExerciseProg()
this.firstStartup = false
}
}
})