From 49b74cddb98262b48e67492fcf5004841c4e643b Mon Sep 17 00:00:00 2001 From: zsviczian Date: Tue, 1 Nov 2022 21:45:31 +0100 Subject: [PATCH] hide export menu and save file based on UIOptions --- src/components/LayerUI.tsx | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx index a447ed2ab..9057df24f 100644 --- a/src/components/LayerUI.tsx +++ b/src/components/LayerUI.tsx @@ -216,16 +216,19 @@ const LayerUI = ({ {actionManager.renderAction("loadScene")} {/* // TODO barnabasmolnar/editor-redesign */} {/* is this fine here? */} - {appState.fileHandle && + {UIOptions.canvasActions.saveToActiveFile && + appState.fileHandle && actionManager.renderAction("saveToActiveFile")} {renderJSONExportDialog()} - setAppState({ openDialog: "imageExport" })} - shortcut={getShortcutFromShortcutName("imageExport")} - /> + {UIOptions.canvasActions.export && ( + setAppState({ openDialog: "imageExport" })} + shortcut={getShortcutFromShortcutName("imageExport")} + /> + )} {onCollabButtonClick && (