@@ -40,78 +40,63 @@ export function UploadProgressDialog() {
|
||||
return (
|
||||
<Dialog open={open} onClose={handleClose} maxWidth="xs" fullWidth>
|
||||
<UploadProgressHeader />
|
||||
{(uploadPhase == "extractingMetadata" ||
|
||||
uploadPhase == "uploading" ||
|
||||
uploadPhase == "done") && (
|
||||
{(uploadPhase == "uploading" || uploadPhase == "done") && (
|
||||
<DialogContent sx={{ "&&&": { px: 0 } }}>
|
||||
{(uploadPhase == "extractingMetadata" ||
|
||||
uploadPhase === "uploading") && <InProgressSection />}
|
||||
{(uploadPhase == "uploading" || uploadPhase == "done") && (
|
||||
<>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.UPLOADED}
|
||||
sectionTitle={t("SUCCESSFUL_UPLOADS")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={
|
||||
UPLOAD_RESULT.UPLOADED_WITH_STATIC_THUMBNAIL
|
||||
}
|
||||
sectionTitle={t(
|
||||
"THUMBNAIL_GENERATION_FAILED_UPLOADS",
|
||||
)}
|
||||
sectionInfo={t(
|
||||
"THUMBNAIL_GENERATION_FAILED_INFO",
|
||||
)}
|
||||
/>
|
||||
{uploadPhase == "done" && hasUnUploadedFiles && (
|
||||
<NotUploadSectionHeader>
|
||||
{t("FILE_NOT_UPLOADED_LIST")}
|
||||
</NotUploadSectionHeader>
|
||||
)}
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.BLOCKED}
|
||||
sectionTitle={t("BLOCKED_UPLOADS")}
|
||||
sectionInfo={
|
||||
<Trans i18nKey={"ETAGS_BLOCKED"} />
|
||||
}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.FAILED}
|
||||
sectionTitle={t("FAILED_UPLOADS")}
|
||||
sectionInfo={
|
||||
uploadPhase == "done"
|
||||
? undefined
|
||||
: t("failed_uploads_hint")
|
||||
}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.ALREADY_UPLOADED}
|
||||
sectionTitle={t("SKIPPED_FILES")}
|
||||
sectionInfo={t("SKIPPED_INFO")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={
|
||||
UPLOAD_RESULT.LARGER_THAN_AVAILABLE_STORAGE
|
||||
}
|
||||
sectionTitle={t(
|
||||
"LARGER_THAN_AVAILABLE_STORAGE_UPLOADS",
|
||||
)}
|
||||
sectionInfo={t(
|
||||
"LARGER_THAN_AVAILABLE_STORAGE_INFO",
|
||||
)}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.UNSUPPORTED}
|
||||
sectionTitle={t("UNSUPPORTED_FILES")}
|
||||
sectionInfo={t("UNSUPPORTED_INFO")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.TOO_LARGE}
|
||||
sectionTitle={t("TOO_LARGE_UPLOADS")}
|
||||
sectionInfo={t("TOO_LARGE_INFO")}
|
||||
/>
|
||||
</>
|
||||
{uploadPhase === "uploading" && <InProgressSection />}
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.UPLOADED}
|
||||
sectionTitle={t("SUCCESSFUL_UPLOADS")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={
|
||||
UPLOAD_RESULT.UPLOADED_WITH_STATIC_THUMBNAIL
|
||||
}
|
||||
sectionTitle={t("THUMBNAIL_GENERATION_FAILED_UPLOADS")}
|
||||
sectionInfo={t("THUMBNAIL_GENERATION_FAILED_INFO")}
|
||||
/>
|
||||
{uploadPhase == "done" && hasUnUploadedFiles && (
|
||||
<NotUploadSectionHeader>
|
||||
{t("FILE_NOT_UPLOADED_LIST")}
|
||||
</NotUploadSectionHeader>
|
||||
)}
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.BLOCKED}
|
||||
sectionTitle={t("BLOCKED_UPLOADS")}
|
||||
sectionInfo={<Trans i18nKey={"ETAGS_BLOCKED"} />}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.FAILED}
|
||||
sectionTitle={t("FAILED_UPLOADS")}
|
||||
sectionInfo={
|
||||
uploadPhase == "done"
|
||||
? undefined
|
||||
: t("failed_uploads_hint")
|
||||
}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.ALREADY_UPLOADED}
|
||||
sectionTitle={t("SKIPPED_FILES")}
|
||||
sectionInfo={t("SKIPPED_INFO")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={
|
||||
UPLOAD_RESULT.LARGER_THAN_AVAILABLE_STORAGE
|
||||
}
|
||||
sectionTitle={t(
|
||||
"LARGER_THAN_AVAILABLE_STORAGE_UPLOADS",
|
||||
)}
|
||||
sectionInfo={t("LARGER_THAN_AVAILABLE_STORAGE_INFO")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.UNSUPPORTED}
|
||||
sectionTitle={t("UNSUPPORTED_FILES")}
|
||||
sectionInfo={t("UNSUPPORTED_INFO")}
|
||||
/>
|
||||
<ResultSection
|
||||
uploadResult={UPLOAD_RESULT.TOO_LARGE}
|
||||
sectionTitle={t("TOO_LARGE_UPLOADS")}
|
||||
sectionInfo={t("TOO_LARGE_INFO")}
|
||||
/>
|
||||
</DialogContent>
|
||||
)}
|
||||
{uploadPhase == "done" && <UploadProgressFooter />}
|
||||
|
||||
@@ -45,11 +45,7 @@ export const InProgressSection = () => {
|
||||
<UploadProgressSection>
|
||||
<UploadProgressSectionTitle expandIcon={<ExpandMoreIcon />}>
|
||||
<CaptionedText
|
||||
mainText={
|
||||
uploadPhase == "extractingMetadata"
|
||||
? t("INPROGRESS_METADATA_EXTRACTION")
|
||||
: t("INPROGRESS_UPLOADS")
|
||||
}
|
||||
mainText={t("INPROGRESS_UPLOADS")}
|
||||
subText={String(inProgressUploads?.length ?? 0)}
|
||||
/>
|
||||
</UploadProgressSectionTitle>
|
||||
|
||||
@@ -7,7 +7,6 @@ export function UploadProgressBar() {
|
||||
return (
|
||||
<Box>
|
||||
{(uploadPhase == "readingMetadata" ||
|
||||
uploadPhase == "extractingMetadata" ||
|
||||
uploadPhase == "uploading") && (
|
||||
<>
|
||||
<LinearProgress
|
||||
|
||||
@@ -42,8 +42,6 @@ const subtitleText = (
|
||||
return t("UPLOAD_STAGE_MESSAGE.0");
|
||||
case "readingMetadata":
|
||||
return t("UPLOAD_STAGE_MESSAGE.1");
|
||||
case "extractingMetadata":
|
||||
return t("UPLOAD_STAGE_MESSAGE.2", { uploadCounter });
|
||||
case "uploading":
|
||||
return t("UPLOAD_STAGE_MESSAGE.3", { uploadCounter });
|
||||
case "cancelling":
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
"UPLOAD_STAGE_MESSAGE": {
|
||||
"0": "Preparing to upload",
|
||||
"1": "Reading google metadata files",
|
||||
"2": "{{uploadCounter.finished, number}} / {{uploadCounter.total, number}} files metadata extracted",
|
||||
"3": "{{uploadCounter.finished, number}} / {{uploadCounter.total, number}} files processed",
|
||||
"4": "Cancelling remaining uploads",
|
||||
"5": "Backup complete"
|
||||
@@ -307,7 +306,6 @@
|
||||
"SKIPPED_INFO": "Skipped these as there are files with matching name and content in the same album",
|
||||
"UNSUPPORTED_INFO": "Ente does not support these file formats yet",
|
||||
"BLOCKED_UPLOADS": "Blocked uploads",
|
||||
"INPROGRESS_METADATA_EXTRACTION": "In progress",
|
||||
"INPROGRESS_UPLOADS": "Uploads in progress",
|
||||
"TOO_LARGE_UPLOADS": "Large files",
|
||||
"LARGER_THAN_AVAILABLE_STORAGE_UPLOADS": "Insufficient storage",
|
||||
|
||||
@@ -61,7 +61,6 @@ export const RANDOM_PERCENTAGE_PROGRESS_FOR_PUT = () => 90 + 10 * Math.random();
|
||||
export type UploadPhase =
|
||||
| "preparing"
|
||||
| "readingMetadata"
|
||||
| "extractingMetadata"
|
||||
| "uploading"
|
||||
| "cancelling"
|
||||
| "done";
|
||||
|
||||
Reference in New Issue
Block a user