mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: close dialog and show toast for Export image
Save to feature closes dialog and showed toast message after exporting successful. Export image feature better follow the same flow.
This commit is contained in:
parent
273ba803d9
commit
6d510b888c
1 changed files with 13 additions and 6 deletions
|
@ -1777,12 +1777,19 @@ class App extends React.Component<AppProps, AppState> {
|
|||
this.setState({ errorMessage: error.message });
|
||||
});
|
||||
|
||||
if (
|
||||
this.state.exportEmbedScene &&
|
||||
fileHandle &&
|
||||
isImageFileHandle(fileHandle)
|
||||
) {
|
||||
this.setState({ fileHandle });
|
||||
if (fileHandle && isImageFileHandle(fileHandle)) {
|
||||
this.setState({
|
||||
fileHandle: this.state.exportEmbedScene ? fileHandle : null,
|
||||
openDialog: null,
|
||||
toast: {
|
||||
message: fileHandle?.name
|
||||
? t("toast.fileSavedToFilename").replace(
|
||||
"{filename}",
|
||||
`"${fileHandle.name}"`,
|
||||
)
|
||||
: t("toast.fileSaved"),
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue