feat: disable buttons on process

This commit is contained in:
not-nullptr 2024-11-15 23:26:08 +00:00
parent 9286f17a56
commit a78b5b2ea2
1 changed files with 2 additions and 4 deletions

View File

@ -16,7 +16,8 @@ class Files {
public ready = $derived( public ready = $derived(
this.files.length === 0 this.files.length === 0
? false ? false
: this.requiredConverters.every((f) => f?.ready), : this.requiredConverters.every((f) => f?.ready) &&
this.files.every((f) => !f.processing),
); );
public results = $derived( public results = $derived(
this.files.length === 0 ? false : this.files.every((f) => f.result), this.files.length === 0 ? false : this.files.every((f) => f.result),
@ -133,9 +134,6 @@ class Files {
public async downloadAll() { public async downloadAll() {
if (files.files.length === 0) return; if (files.files.length === 0) return;
if (files.files.length === 1) {
return await files.files[0].download();
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any // eslint-disable-next-line @typescript-eslint/no-explicit-any
const dlFiles: any[] = []; const dlFiles: any[] = [];
for (let i = 0; i < files.files.length; i++) { for (let i = 0; i < files.files.length; i++) {