fix: abstract and fix legacy fs (#4032)

This commit is contained in:
David Luzar 2021-10-07 13:19:40 +02:00 committed by GitHub
parent 75aeaa6c38
commit 54739cd2df
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 179 additions and 50 deletions

View file

@ -11,7 +11,7 @@ import { actionSaveFileToDisk } from "../actions/actionExport";
import { Card } from "./Card";
import "./ExportDialog.scss";
import { supported as fsSupported } from "browser-fs-access";
import { nativeFileSystemSupported } from "../data/filesystem";
export type ExportCB = (
elements: readonly NonDeletedExcalidrawElement[],
@ -42,7 +42,8 @@ const JSONExportModal = ({
<h2>{t("exportDialog.disk_title")}</h2>
<div className="Card-details">
{t("exportDialog.disk_details")}
{!fsSupported && actionManager.renderAction("changeProjectName")}
{!nativeFileSystemSupported &&
actionManager.renderAction("changeProjectName")}
</div>
<ToolButton
className="Card-button"