Slugify filenames & update notifications
This commit is contained in:
parent
b2ffd28e8e
commit
7860d69747
3 changed files with 40 additions and 8 deletions
|
@ -143,11 +143,24 @@
|
|||
Promise.allSettled(uploadPromises).then(() => {
|
||||
selectedFiles = newFiles;
|
||||
renderFileList();
|
||||
UIkit.notification({
|
||||
message: `Upload completed - ${total - newFiles.length} succeeded, ${newFiles.length} failed`,
|
||||
status: newFiles.length > 0 ? 'warning' : 'success',
|
||||
pos: 'top-center'
|
||||
});
|
||||
const successCount = total - newFiles.length;
|
||||
const failCount = newFiles.length;
|
||||
|
||||
if (successCount > 0) {
|
||||
UIkit.notification({
|
||||
message: `${successCount} file${successCount > 1 ? 's were' : ' was'} uploaded successfully.`,
|
||||
status: 'success',
|
||||
pos: 'top-center'
|
||||
});
|
||||
}
|
||||
|
||||
if (failCount > 0) {
|
||||
UIkit.notification({
|
||||
message: `${failCount} file${failCount > 1 ? 's failed' : ' failed'} to upload.`,
|
||||
status: 'danger',
|
||||
pos: 'top-center'
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue