mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Warn on invalid JSON file (#1159)
* add error dialog * show error modal on file dnd * add locales * Update src/locales/en.json Co-Authored-By: Lipis <lipiridis@gmail.com> * Update src/data/blob.ts * Update src/data/blob.ts * fix titles, update snapshots * make modal smaller * fix dnd wrong file type * reset errorMessage Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com> Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
parent
2be34effd4
commit
0c9459e9e5
9 changed files with 108 additions and 7 deletions
|
@ -6,6 +6,7 @@ export const DEFAULT_FONT = "20px Virgil";
|
|||
export function getDefaultAppState(): AppState {
|
||||
return {
|
||||
isLoading: false,
|
||||
errorMessage: null,
|
||||
draggingElement: null,
|
||||
resizingElement: null,
|
||||
multiElement: null,
|
||||
|
@ -52,6 +53,7 @@ export function clearAppStateForLocalStorage(appState: AppState) {
|
|||
collaborators,
|
||||
isCollaborating,
|
||||
isLoading,
|
||||
errorMessage,
|
||||
...exportedState
|
||||
} = appState;
|
||||
return exportedState;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue