π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Prune unused phase
Manav Rathi67cd42fd23ba
diff --git a/web/apps/photos/src/components/Upload/UploadProgress/dialog.tsx b/web/apps/photos/src/components/Upload/UploadProgress/dialog.tsxindex acce268002..5971a570c1 100644--- a/web/apps/photos/src/components/Upload/UploadProgress/dialog.tsx+++ b/web/apps/photos/src/components/Upload/UploadProgress/dialog.tsx@@ -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 />}diff --git a/web/apps/photos/src/components/Upload/UploadProgress/inProgressSection.tsx b/web/apps/photos/src/components/Upload/UploadProgress/inProgressSection.tsxindex 561a13ac42..dcdc2178e8 100644--- a/web/apps/photos/src/components/Upload/UploadProgress/inProgressSection.tsx+++ b/web/apps/photos/src/components/Upload/UploadProgress/inProgressSection.tsx@@ -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>diff --git a/web/apps/photos/src/components/Upload/UploadProgress/progressBar.tsx b/web/apps/photos/src/components/Upload/UploadProgress/progressBar.tsxindex 4a71c2779d..73b78d6538 100644--- a/web/apps/photos/src/components/Upload/UploadProgress/progressBar.tsx+++ b/web/apps/photos/src/components/Upload/UploadProgress/progressBar.tsx@@ -7,7 +7,6 @@ export function UploadProgressBar() {return (<Box>{(uploadPhase == "readingMetadata" ||- uploadPhase == "extractingMetadata" ||uploadPhase == "uploading") && (<><LinearProgressdiff --git a/web/apps/photos/src/components/Upload/UploadProgress/title.tsx b/web/apps/photos/src/components/Upload/UploadProgress/title.tsxindex fdeddf7fa6..fa1bf1f1a6 100644--- a/web/apps/photos/src/components/Upload/UploadProgress/title.tsx+++ b/web/apps/photos/src/components/Upload/UploadProgress/title.tsx@@ -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":diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.jsonindex ad3f8e18f5..559001a8a3 100644--- a/web/packages/base/locales/en-US/translation.json+++ b/web/packages/base/locales/en-US/translation.json@@ -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",diff --git a/web/packages/new/photos/services/upload/types.ts b/web/packages/new/photos/services/upload/types.tsindex 226d34bdf1..8055bd9dfd 100644--- a/web/packages/new/photos/services/upload/types.ts+++ b/web/packages/new/photos/services/upload/types.ts@@ -61,7 +61,6 @@ export const RANDOM_PERCENTAGE_PROGRESS_FOR_PUT = () => 90 + 10 * Math.random();export type UploadPhase =| "preparing"| "readingMetadata"- | "extractingMetadata"| "uploading"| "cancelling"| "done";