mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
* fix(web): show warning on duplicate uploads #2557 * Prettier fix * color --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
57a7103d75
commit
66b2ad7939
5 changed files with 33 additions and 1 deletions
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
let showDetail = true;
|
||||
let uploadLength = 0;
|
||||
let duplicateCount = 0;
|
||||
let isUploading = false;
|
||||
|
||||
// Reactive action to update asset uploadLength whenever there is a new one added to the list
|
||||
|
|
@ -21,6 +22,10 @@
|
|||
uploadAssetsStore.isUploading.subscribe((value) => {
|
||||
isUploading = value;
|
||||
});
|
||||
|
||||
uploadAssetsStore.duplicateCounter.subscribe((value) => {
|
||||
duplicateCount = value;
|
||||
});
|
||||
</script>
|
||||
|
||||
{#if isUploading}
|
||||
|
|
@ -32,6 +37,13 @@
|
|||
message: 'Upload success, refresh the page to see new upload assets',
|
||||
type: NotificationType.Info,
|
||||
});
|
||||
if (duplicateCount > 0) {
|
||||
notificationController.show({
|
||||
message: `Skipped ${duplicateCount} duplicate picture${duplicateCount > 1 ? 's' : ''}`,
|
||||
type: NotificationType.Warning,
|
||||
});
|
||||
uploadAssetsStore.duplicateCounter.set(0);
|
||||
}
|
||||
}}
|
||||
class="absolute bottom-6 right-6 z-[10000]"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue