💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[web][photos] Reuse Fix time labels and Hugeicons
AswinAsok638be949edf7
diff --git a/web/apps/photos/public/images/fix-time/close.svg b/web/apps/photos/public/images/fix-time/close.svgdeleted file mode 100644index 784fa6713e..0000000000--- a/web/apps/photos/public/images/fix-time/close.svg+++ /dev/null@@ -1,5 +0,0 @@-<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">-<g id="elements">-<path id="Vector" d="M11.25 0.75L6 6M6 6L0.75 11.25M6 6L0.75 0.75M6 6L11.25 11.25" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="black" style="stroke:black;stroke-opacity:1;"/>-</g>-</svg>diff --git a/web/apps/photos/public/images/fix-time/selected.svg b/web/apps/photos/public/images/fix-time/selected.svgdeleted file mode 100644index 7b3feecb64..0000000000--- a/web/apps/photos/public/images/fix-time/selected.svg+++ /dev/null@@ -1,6 +0,0 @@-<svg preserveAspectRatio="none" overflow="visible" style="display: block;" width="16.5" height="16.5" viewBox="0 0 16.5 16.5" fill="none" xmlns="http://www.w3.org/2000/svg">-<g id="elements">-<path id="Vector" d="M15.75 8.25C15.75 4.10786 12.3921 0.75 8.25 0.75C4.10786 0.75 0.75 4.10786 0.75 8.25C0.75 12.3921 4.10786 15.75 8.25 15.75C12.3921 15.75 15.75 12.3921 15.75 8.25Z" fill="#08C225" style="fill:#08C225;fill:color(display-p3 0.0314 0.7608 0.1451);fill-opacity:1;stroke:#08C225;stroke:color(display-p3 0.0314 0.7608 0.1451);stroke-opacity:1;" stroke-width="1.5" stroke="#08C225"/>-<path id="Vector_2" d="M11.25 6L7.125 10.5L5.25 8.625" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="white" style="stroke:white;stroke-opacity:1;"/>-</g>-</svg>diff --git a/web/apps/photos/src/components/FixCreationTime.tsx b/web/apps/photos/src/components/FixCreationTime.tsxindex 27b4cfad79..cc8b792185 100644--- a/web/apps/photos/src/components/FixCreationTime.tsx+++ b/web/apps/photos/src/components/FixCreationTime.tsx@@ -1,3 +1,5 @@+import { Cancel01Icon, Tick02Icon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import {Box,Dialog,@@ -12,7 +14,6 @@ import {} from "@mui/material";import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";import type { ModalVisibilityProps } from "ente-base/components/utils/modal";-import { formattedDateTime } from "ente-base/i18n-date";import log from "ente-base/log";import { downloadManager } from "ente-gallery/services/download";import { extractExifDates } from "ente-gallery/services/exif";@@ -114,7 +115,7 @@ export const FixCreationTime: React.FC<FixCreationTimeProps> = ({>{step == "running"? t("fix_creation_time_in_progress")- : t("fix_date_time_title")}+ : t("fix_creation_time")}</Typography><IconButtonaria-label={t("close")}@@ -122,16 +123,7 @@ export const FixCreationTime: React.FC<FixCreationTimeProps> = ({disabled={step == "running"}sx={collectionDialogIconButtonSx}>- <Box- component="img"- src="/images/fix-time/close.svg"- alt=""- sx={(theme) => ({- ...theme.applyStyles("dark", {- filter: "invert(1)",- }),- })}- />+ <HugeiconsIcon icon={Cancel01Icon} size={18} /></IconButton></Stack><Typography@@ -147,9 +139,7 @@ export const FixCreationTime: React.FC<FixCreationTimeProps> = ({{message ??(step == "running"? t("fix_creation_time_in_progress")- : t("fix_date_time_selection", {- count: files.length,- }))}+ : t("fix_creation_time_options"))}</Typography>{step == "running" && <Progress {...progress} />}<OptionsForm {...{ step, files, onSubmit, onClose }} />@@ -225,38 +215,13 @@ const OptionsForm: React.FC<OptionsFormProps> = ({onSubmit,});- const options: { value: FixOption; label: string; description: string }[] =- [- {- value: "date-time-original",- label: t("exif_date_time_original"),- description: t("fix_date_time_original_description"),- },- {- value: "date-time-digitized",- label: t("exif_date_time_digitized"),- description: t("fix_date_time_digitized_description"),- },- {- value: "metadata-date",- label: t("exif_metadata_date"),- description: t("fix_date_time_metadata_description"),- },- {- value: "file-name",- label: t("fix_date_time_from_name"),- description: t("fix_date_time_name_example"),- },- {- value: "custom",- label: t("fix_date_time_custom"),- description: values.customDate- ? formattedDateTime(values.customDate.timestamp)- : t("fix_date_time_custom_description", {- count: files.length,- }),- },- ];+ const options: { value: FixOption; label: string }[] = [+ { value: "date-time-original", label: t("exif_date_time_original") },+ { value: "date-time-digitized", label: t("exif_date_time_digitized") },+ { value: "metadata-date", label: t("exif_metadata_date") },+ { value: "file-name", label: t("file_name") },+ { value: "custom", label: t("custom_time") },+ ];if (step == "running") return null;if (step == "completed")@@ -275,7 +240,7 @@ const OptionsForm: React.FC<OptionsFormProps> = ({aria-labelledby="fix-date-time-description"sx={{ gap: "8px" }}>- {options.map(({ value, label, description }) => (+ {options.map(({ value, label }) => (<FormControlLabelkey={value}value={value}@@ -299,10 +264,21 @@ const OptionsForm: React.FC<OptionsFormProps> = ({}}><Box- component="img"- src="/images/fix-time/selected.svg"- alt=""- />+ sx={{+ width: 18,+ height: 18,+ borderRadius: "50%",+ bgcolor: "accent.main",+ color: "white",+ display: "grid",+ placeItems: "center",+ }}+ >+ <HugeiconsIcon+ icon={Tick02Icon}+ size={12}+ />+ </Box></Box>}sx={{@@ -317,28 +293,15 @@ const OptionsForm: React.FC<OptionsFormProps> = ({/>}label={- <Stack sx={{ gap: "4px" }}>- <Typography- sx={{- fontSize: 14,- lineHeight: "20px",- fontWeight: 500,- }}- >- {label}- </Typography>- <Typography- sx={{- fontSize: 12,- lineHeight: "16px",- fontWeight: 500,- color: "text.muted",- overflowWrap: "anywhere",- }}- >- {description}- </Typography>- </Stack>+ <Typography+ sx={{+ fontSize: 14,+ lineHeight: "20px",+ fontWeight: 500,+ }}+ >+ {label}+ </Typography>}sx={(theme) => ({m: 0,@@ -398,7 +361,7 @@ const OptionsForm: React.FC<OptionsFormProps> = ({}sx={submitButtonSx}>- {t("fix_date_time_submit")}+ {t("fix_creation_time")}</FocusVisibleButton><Linkhref="https://ente.com/help/photos/faq/metadata-and-editing#fix-time-options"diff --git a/web/packages/base/locales/en-US/translation.json b/web/packages/base/locales/en-US/translation.jsonindex ca0cc5ca7e..f9a730fd7a 100644--- a/web/packages/base/locales/en-US/translation.json+++ b/web/packages/base/locales/en-US/translation.json@@ -685,18 +685,6 @@"sort_asc_indicator": "A-Z","sort_desc_indicator": "Z-A","fix_creation_time": "Fix time",- "fix_date_time_title": "Fix date & time",- "fix_date_time_selection_one": "{{count, number}} photo selected. Choose where the date comes from.",- "fix_date_time_selection_other": "{{count, number}} photos selected. Choose where the date comes from.",- "fix_date_time_original_description": "The original capture date embedded in the file.",- "fix_date_time_digitized_description": "When the image was converted to a digital file.",- "fix_date_time_metadata_description": "When the file’s embedded metadata was last updated.",- "fix_date_time_from_name": "From the file name",- "fix_date_time_name_example": "IMG_20190714_1030.jpg → 14 July 2019, 10:30",- "fix_date_time_custom": "Pick a date and time",- "fix_date_time_custom_description_one": "Set the same moment for this photo.",- "fix_date_time_custom_description_other": "Set the same moment for all {{count, number}} photos.",- "fix_date_time_submit": "Fix date and time","fix_creation_time_options_help": "What do these options mean?","fix_creation_time_in_progress": "Fixing time","fix_creation_time_file_updated": "File time updated",