Rebuild commond bar component

This commit is contained in:
2022-04-26 16:42:02 +08:00
parent ec3aaa5e3a
commit 23ebbeb120
6 changed files with 133 additions and 90 deletions
+12 -10
View File
@@ -29,7 +29,7 @@ const ArchiveSaveDownloadView: FunctionComponent<IFileInfo & ICallBackProps> = f
setTimeout(() => {
download(file, props.fileName, "text/json");
props.then();
}, 10);
}, 100);
}
useEffect(() => { runner() }, []);
@@ -44,15 +44,17 @@ function ArchiveSaveFsView(props) {
const runner = async () => {
const file = await props.fileData();
if (props.electron) {
props.electron.fileSave(
file,
I18N(props, "Popup.Load.Save.Select.File.Name"),
I18N(props, "Popup.Load.Save.Select.Path.Title"),
I18N(props, "Popup.Load.Save.Select.Path.Button"),
props.fileUrl
);
}
setTimeout(() => {
if (props.electron) {
props.electron.fileSave(
file,
I18N(props, "Popup.Load.Save.Select.File.Name"),
I18N(props, "Popup.Load.Save.Select.Path.Title"),
I18N(props, "Popup.Load.Save.Select.Path.Button"),
props.fileUrl
);
}
}, 100);
}
const saveEvent = ({name, url, success} : {name: string, url: string, success: boolean}) => {