add path to new inbox file in pinia store

Not ideal to have data in multiple store (pinia and PouchDB) but it work this way. May need a refactoring.
This commit is contained in:
Julien Calixte
2023-11-26 10:35:38 +01:00
parent 086f7664df
commit c7ea52c7f8
6 changed files with 33 additions and 6 deletions

View File

@@ -86,6 +86,9 @@ export const useUserRepoStore = defineStore({
}, 350)
})
},
addFile(file: RepoFile) {
this.files = [...this.files.filter((f) => f.sha !== file.sha), file]
},
resetUserRepo() {
this.user = ''
this.repo = ''