mirror of
https://github.com/filebrowser/filebrowser.git
synced 2026-01-23 02:35:10 +00:00
parent
78e0395960
commit
701522a060
1 changed files with 6 additions and 3 deletions
|
|
@ -186,7 +186,7 @@ const handlePageChange = (event: BeforeUnloadEvent) => {
|
|||
}
|
||||
};
|
||||
|
||||
const save = async () => {
|
||||
const save = async (throwError?: boolean) => {
|
||||
const button = "save";
|
||||
buttons.loading("save");
|
||||
|
||||
|
|
@ -197,6 +197,7 @@ const save = async () => {
|
|||
} catch (e: any) {
|
||||
buttons.done(button);
|
||||
$showError(e);
|
||||
if (throwError) throw e;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -223,8 +224,10 @@ const close = () => {
|
|||
finishClose();
|
||||
},
|
||||
saveAction: async () => {
|
||||
await save();
|
||||
finishClose();
|
||||
try {
|
||||
await save(true);
|
||||
finishClose();
|
||||
} catch {}
|
||||
},
|
||||
});
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue