Skip to content

Commit

Permalink
feat(settings): reset indexedDB too
Browse files Browse the repository at this point in the history
  • Loading branch information
AlejandroAkbal committed Jun 16, 2023
1 parent 4673365 commit 6b81259
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pages/legal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
href: '/privacy-policy#opt-out'
}
]"
text="Self hosted Matomo analytics are used, configured to NOT gather or store any personal info
text="Self hosted Matomo analytics are used, configured to NOT gather, or store, any personal info
Feel free to opt out on the next link"
title="Analytics"
Expand Down
8 changes: 7 additions & 1 deletion pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,19 @@
const userSettings = useUserSettings()
function removeAllData() {
async function removeAllData() {
if (!confirm('Are you sure you want to reset all data?')) {
return
}
localStorage.clear()
const indexedDBDatabaseNames = await indexedDB.databases()
for (const { name } of indexedDBDatabaseNames) {
indexedDB.deleteDatabase(name)
}
location.reload()
}
</script>
Expand Down

0 comments on commit 6b81259

Please sign in to comment.