Skip to content

Free, simple, and intuitive online database diagram editor and SQL generator.

Add settings to header

1ilitc4f73ba178ec
diff --git a/src/components/ControlPanel.jsx b/src/components/ControlPanel.jsx
index b59e9e1d..86d647a0 100644
--- a/src/components/ControlPanel.jsx
+++ b/src/components/ControlPanel.jsx
@@ -972,38 +972,7 @@ export default function ControlPanel({
],
function: () => { },
},
- Settings: {
- children: [
- {
- Autosave: () =>
- setSettings((prev) => {
- Toast.success(
- `Autosave is ${settings.autosave ? "off" : "on"}`
- );
- return { ...prev, autosave: !prev.autosave };
- }),
- },
- {
- Panning: () =>
- setSettings((prev) => {
- Toast.success(`Panning is ${settings.panning ? "off" : "on"}`);
- return { ...prev, panning: !prev.panning };
- }),
- },
- {
- "Flush storage": async () => {
- db.delete()
- .then(() => {
- Toast.success("Storage flushed");
- window.location.reload(false);
- })
- .catch(() => {
- Toast.error("Oops! Something went wrong.");
- });
- },
- },
- ],
- },
+
Exit: {
function: () => { },
},
@@ -1129,6 +1098,30 @@ export default function ControlPanel({
function: enterFullscreen,
},
},
+ Settings: {
+ Autosave: () =>
+ setSettings((prev) => {
+ Toast.success(
+ `Autosave is ${settings.autosave ? "off" : "on"}`
+ );
+ return { ...prev, autosave: !prev.autosave };
+ }),
+ Panning: () =>
+ setSettings((prev) => {
+ Toast.success(`Panning is ${settings.panning ? "off" : "on"}`);
+ return { ...prev, panning: !prev.panning };
+ }),
+ "Flush storage": async () => {
+ db.delete()
+ .then(() => {
+ Toast.success("Storage flushed");
+ window.location.reload(false);
+ })
+ .catch(() => {
+ Toast.error("Oops! Something went wrong.");
+ });
+ },
+ },
Help: {
Shortcuts: {
function: () => window.open("/shortcuts", "_blank"),
@@ -1137,9 +1130,6 @@ export default function ControlPanel({
"Ask us on discord": {
function: () => { },
},
- "Tweet us": {
- function: () => { },
- },
"Report a bug": {
function: () => window.open("/bug_report", "_blank"),
},