diff --git a/src/_ref/cmdk.ref/Jumpstart.csv b/src/_ref/cmdk.ref/Jumpstart.csv index e2f698b8..988e61b2 100644 --- a/src/_ref/cmdk.ref/Jumpstart.csv +++ b/src/_ref/cmdk.ref/Jumpstart.csv @@ -4,4 +4,5 @@ Open,folder,Open a folder,o,Projects Guide,help,Learn something,g,Help Support,person,Get some help,,Help Community,people,Talk with people,,Help -Theme,,Switch themes,m,Settings \ No newline at end of file +Theme,,Switch themes,m,Settings +Autosave,,Switch autosave,,Settings \ No newline at end of file diff --git a/src/pages/main/MainPage.tsx b/src/pages/main/MainPage.tsx index 545d3cbc..f22697c5 100644 --- a/src/pages/main/MainPage.tsx +++ b/src/pages/main/MainPage.tsx @@ -804,6 +804,9 @@ export default function MainPage() { case "Turn into": onTurnInto(); break; + case "Autosave": + onToggleAutoSave(); + break; default: return; } @@ -1174,6 +1177,11 @@ export default function MainPage() { } }, [theme]); + const [autoSave, setAutoSave] = useState(false); + const onToggleAutoSave = () => { + setAutoSave(!autoSave); + }; + // web-tab close event handler useEffect(() => { let changed = false; @@ -1539,6 +1547,7 @@ export default function MainPage() { // keep modal open when toogling theme or go "Add" menu from "Actions" menu command.Name !== "Theme" && + command.Name !== "Autosave" && command.Name !== "Add" && command.Name !== "Turn into" && dispatch(setCmdkOpen(false)); @@ -1617,6 +1626,23 @@ export default function MainPage() { {theme} > + ) : command.Name === "Autosave" ? ( + <> +