hide export menu and save file based on UIOptions

This commit is contained in:
zsviczian 2022-11-01 21:45:31 +01:00 committed by GitHub
parent 377b9fbdff
commit 49b74cddb9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -216,9 +216,11 @@ const LayerUI = ({
{actionManager.renderAction("loadScene")} {actionManager.renderAction("loadScene")}
{/* // TODO barnabasmolnar/editor-redesign */} {/* // TODO barnabasmolnar/editor-redesign */}
{/* is this fine here? */} {/* is this fine here? */}
{appState.fileHandle && {UIOptions.canvasActions.saveToActiveFile &&
appState.fileHandle &&
actionManager.renderAction("saveToActiveFile")} actionManager.renderAction("saveToActiveFile")}
{renderJSONExportDialog()} {renderJSONExportDialog()}
{UIOptions.canvasActions.export && (
<MenuItem <MenuItem
label={t("buttons.exportImage")} label={t("buttons.exportImage")}
icon={ExportImageIcon} icon={ExportImageIcon}
@ -226,6 +228,7 @@ const LayerUI = ({
onClick={() => setAppState({ openDialog: "imageExport" })} onClick={() => setAppState({ openDialog: "imageExport" })}
shortcut={getShortcutFromShortcutName("imageExport")} shortcut={getShortcutFromShortcutName("imageExport")}
/> />
)}
{onCollabButtonClick && ( {onCollabButtonClick && (
<CollabButton <CollabButton
isCollaborating={isCollaborating} isCollaborating={isCollaborating}