Now with a description and basic color scheme. Saving before making some more changes.
This commit is contained in:
@@ -113,16 +113,12 @@ if (browser) {
|
||||
|
||||
onclick={() => {
|
||||
// Confirm before clearing
|
||||
if (!confirm("Are you sure you want to clear all *local* app data and settings? This will also reload the page.")) {
|
||||
if (!confirm("Are you sure you want to clear IndexedDB databases and some caches? This will also reload the page.")) {
|
||||
return;
|
||||
}
|
||||
console.log("Clearing local and session storage, and reloading the page...");
|
||||
|
||||
// Clear the local and session storage. Clearing the localStorage will force it to be re-created.
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
|
||||
// Clear Indexed DB as well
|
||||
// Clear Indexed DB
|
||||
indexedDB.deleteDatabase('ae_core_db');
|
||||
indexedDB.deleteDatabase('ae_journals_db');
|
||||
|
||||
@@ -133,6 +129,26 @@ if (browser) {
|
||||
window.location.reload(true); // true only works with Firefox
|
||||
// alert('Local and Session Storage cleared and Indexed DBs deleted. You will probably want to refresh the page.');
|
||||
}}
|
||||
ondblclick={() => {
|
||||
// Confirm before clearing
|
||||
if (!confirm("Are you sure you want to clear all *local* app data and settings? This will also reload the page.")) {
|
||||
return;
|
||||
}
|
||||
console.log("Clearing IndexedDB, localStorage, sessionStorage, and reloading the page...");
|
||||
|
||||
// Clear Indexed DB
|
||||
indexedDB.deleteDatabase('ae_core_db');
|
||||
indexedDB.deleteDatabase('ae_journals_db');
|
||||
|
||||
// Clear localStorage and sessionStorage
|
||||
// Clearing the localStorage will force it to be re-created.
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
|
||||
goto('/', {invalidateAll: true});
|
||||
|
||||
window.location.reload(true);
|
||||
}}
|
||||
class="btn btn-sm variant-ghost-surface hover:variant-filled-warning"
|
||||
title="Clear App Data & Settings - Reload: Clear the browser storage for this site"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user