Merge branch 'master' into kb/auto-save-support

This commit is contained in:
kbariotis
2021-03-22 21:56:30 +02:00
31 changed files with 1359 additions and 976 deletions
+5 -4
View File
@@ -11,6 +11,7 @@ import { t } from "../i18n";
import useIsMobile from "../is-mobile";
import { KEYS } from "../keys";
import { register } from "./register";
import { supported } from "browser-fs-access";
export const actionChangeProjectName = register({
name: "changeProjectName",
@@ -23,7 +24,9 @@ export const actionChangeProjectName = register({
label={t("labels.fileTitle")}
value={appState.name || "Unnamed"}
onChange={(name: string) => updateData(name)}
isNameEditable={typeof appProps.name === "undefined"}
isNameEditable={
typeof appProps.name === "undefined" && !appState.viewModeEnabled
}
/>
),
});
@@ -162,9 +165,7 @@ export const actionSaveAsScene = register({
title={t("buttons.saveAs")}
aria-label={t("buttons.saveAs")}
showAriaLabel={useIsMobile()}
hidden={
!("chooseFileSystemEntries" in window || "showOpenFilePicker" in window)
}
hidden={!supported}
onClick={() => updateData(null)}
/>
),