Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion web/apps/photos/src/components/DownloadStatusNotifications.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,16 @@ export const DownloadStatusNotifications: React.FC<
return saveGroups.map((group, index) => {
const hasErrors = isSaveCompleteWithErrors(group);
const canRetry = hasErrors && !!group.retry;
const failedTitle = `${t("download_failed")} (${group.failed}/${group.total})`;

// Show specific error message based on failure reason
let failedTitle: string;
if (group.failureReason === "network_offline") {
failedTitle = `${t("download_failed_network_offline")} (${group.failed}/${group.total})`;
} else if (group.failureReason === "file_error") {
failedTitle = `${t("download_failed_file_error")} (${group.failed}/${group.total})`;
} else {
failedTitle = `${t("download_failed")} (${group.failed}/${group.total})`;
}

return (
<Notification
Expand Down
3 changes: 3 additions & 0 deletions web/packages/base/locales/en-US/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,9 @@
"download_complete": "Download complete",
"downloading_album": "Downloading {{name}}",
"download_failed": "Download failed",
"download_failed_network_offline": "Connection lost",
"download_failed_file_error": "Some files failed",
"retry": "Retry",
"download_progress": "{{count, number}} / {{total, number}} files",
"christmas": "Christmas",
"christmas_eve": "Christmas Eve",
Expand Down
9 changes: 9 additions & 0 deletions web/packages/gallery/components/utils/save-groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,15 @@ export interface SaveGroup {
* An {@link AbortController} that can be used to cancel the save.
*/
canceller: AbortController;
/**
* The reason for the failure, if any.
*
* This is used to show a more specific error message to the user.
* - "network_offline": The network went offline during download
* - "file_error": One or more individual files failed to download
* - undefined: No specific reason (generic error)
*/
failureReason?: "network_offline" | "file_error";
}

/**
Expand Down
1 change: 1 addition & 0 deletions web/packages/gallery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ente-utils": "*",
"exifreader": "^4.32.0",
"hls-video-element": "^1.5.8",
"jszip": "^3.10.1",
"leaflet": "^1.9.4",
"leaflet-defaulticon-compatibility": "^0.1.2",
"localforage": "^1.10.0",
Expand Down
Loading
Loading