Virtual whiteboard for sketching hand-drawn like diagrams
improvement: Tweak error message on image import (#2619)
David Luzarb997e69ebcbd
diff --git a/src/components/ErrorDialog.tsx b/src/components/ErrorDialog.tsxindex 10dce46dd2..f10c718971 100644--- a/src/components/ErrorDialog.tsx+++ b/src/components/ErrorDialog.tsx@@ -28,7 +28,14 @@ export const ErrorDialog = ({onCloseRequest={handleClose}title={t("errorDialog.title")}>- <div>{message}</div>+ <div>+ {message.split("\n").map((line) => (+ <>+ {line}+ <br />+ </>+ ))}+ </div></Dialog>)}</>diff --git a/src/data/blob.ts b/src/data/blob.tsindex 73692879ea..e73b367b69 100644--- a/src/data/blob.ts+++ b/src/data/blob.ts@@ -9,7 +9,7 @@ import { AppState } from "../types";import { restore } from "./restore";import { ImportedDataState, LibraryData } from "./types";-export const parseFileContents = async (blob: Blob | File) => {+const parseFileContents = async (blob: Blob | File) => {let contents: string;if (blob.type === "image/png") {diff --git a/src/locales/en.json b/src/locales/en.jsonindex 70819cdd23..74c9d7b498 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -136,7 +136,7 @@"loadSceneOverridePrompt": "Loading external drawing will replace your existing content. Do you wish to continue?","errorLoadingLibrary": "There was an error loading the third party library.","confirmAddLibrary": "This will add {{numShapes}} shape(s) to your library. Are you sure?",- "imageDoesNotContainScene": "Image file doesn't contain scene data. Have you enabled this during export?",+ "imageDoesNotContainScene": "Importing images isn't supported at the moment.\n\nDid you want to import a scene? This image does not seem to contain any scene data. Have you enabled this during export?","cannotRestoreFromImage": "Scene couldn't be restored from this image file"},"toolBar": {diff --git a/src/packages/excalidraw/CHANGELOG.md b/src/packages/excalidraw/CHANGELOG.mdindex 24e4be6aa1..e5aec1ff31 100644--- a/src/packages/excalidraw/CHANGELOG.md+++ b/src/packages/excalidraw/CHANGELOG.md@@ -38,6 +38,7 @@ Please add the latest change on the top under the correct section.### Improvements+- Improve error message around importing images [#2619](https://github.com/excalidraw/excalidraw/pull/2619)- Add tooltip with icon for embedding scenes [#2532](https://github.com/excalidraw/excalidraw/pull/2532)- RTL support for the stats dialog [#2530](https://github.com/excalidraw/excalidraw/pull/2530)- Expand canvas padding based on zoom. [#2515](https://github.com/excalidraw/excalidraw/pull/2515)