Fix settings

This commit is contained in:
1ilit 2024-01-29 09:53:05 +02:00
parent 6f262185d0
commit e35ee8270c

View File

@ -1108,19 +1108,24 @@ export default function ControlPanel({
},
},
Settings: {
Autosave: () =>
Autosave: {
function: () =>
setSettings((prev) => {
Toast.success(
`Autosave is ${settings.autosave ? "off" : "on"}`
);
return { ...prev, autosave: !prev.autosave };
}),
Panning: () =>
},
Panning: {
function: () =>
setSettings((prev) => {
Toast.success(`Panning is ${settings.panning ? "off" : "on"}`);
return { ...prev, panning: !prev.panning };
}),
"Flush storage": async () => {
},
"Flush storage": {
function: async () => {
db.delete()
.then(() => {
Toast.success("Storage flushed");
@ -1131,6 +1136,7 @@ export default function ControlPanel({
});
},
},
},
Help: {
Shortcuts: {
function: () => window.open("/shortcuts", "_blank"),