mirror of
https://github.com/drawdb-io/drawdb.git
synced 2025-10-16 15:34:00 +00:00
Flush storage
This commit is contained in:
@@ -754,6 +754,18 @@ export default function ControlPanel({
|
||||
.catch((e) => Toast.error("Oops! Something went wrong."));
|
||||
},
|
||||
},
|
||||
"Flush storage": {
|
||||
function: async () => {
|
||||
db.delete()
|
||||
.then(() => {
|
||||
Toast.success("Storage flushed");
|
||||
window.location.reload(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
Toast.error("Oops! Something went wrong.");
|
||||
});
|
||||
},
|
||||
},
|
||||
Import: {
|
||||
function: fileImport,
|
||||
shortcut: "Ctrl+I",
|
||||
@@ -1665,7 +1677,7 @@ export default function ControlPanel({
|
||||
function getState() {
|
||||
switch (state) {
|
||||
case State.NONE:
|
||||
return "No changes"
|
||||
return "No changes";
|
||||
case State.LOADING:
|
||||
return "Loading . . .";
|
||||
case State.SAVED:
|
||||
|
Reference in New Issue
Block a user