mirror of https://github.com/VERT-sh/VERT.git
Add success toast after file conversion
This commit is contained in:
parent
a9de9dba70
commit
c32d447a07
|
|
@ -112,6 +112,7 @@ export class VertFile {
|
|||
? await this.convertZip(converter)
|
||||
: await converter.convert(this, this.to, ...args);
|
||||
this.result = res;
|
||||
this.toastSuccess();
|
||||
} catch (err) {
|
||||
if (!this.cancelled) this.toastErr(err);
|
||||
this.result = null;
|
||||
|
|
@ -120,6 +121,14 @@ export class VertFile {
|
|||
return res;
|
||||
}
|
||||
|
||||
private toastSuccess() {
|
||||
ToastManager.add({
|
||||
type: "success",
|
||||
message: `✅ ${this.file.name} converted to ${this.to.toUpperCase()} and ready to download`,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
private async convertZip(converter: Converter): Promise<VertFile> {
|
||||
const { extractZip, createZip } = await import("$lib/util/zip");
|
||||
const { default: PQueue } = await import("p-queue");
|
||||
|
|
|
|||
Loading…
Reference in New Issue