diff --git a/web/apps/photos/src/components/FixCreationTime.tsx b/web/apps/photos/src/components/FixCreationTime.tsx index 3e64720f60..ca7292dd6b 100644 --- a/web/apps/photos/src/components/FixCreationTime.tsx +++ b/web/apps/photos/src/components/FixCreationTime.tsx @@ -10,9 +10,10 @@ import { FileType } from "@/media/file-type"; import { PhotoDateTimePicker } from "@/new/photos/components/PhotoDateTimePicker"; import downloadManager from "@/new/photos/services/download"; import { extractExifDates } from "@/new/photos/services/exif"; +import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton"; import { ensure } from "@/utils/ensure"; import { - Button, + Box, Dialog, DialogContent, DialogTitle, @@ -22,6 +23,7 @@ import { LinearProgress, Radio, RadioGroup, + Stack, Typography, } from "@mui/material"; import { useFormik } from "formik"; @@ -137,37 +139,21 @@ const messageForStatus = (step?: Status) => { } }; -const Progress: React.FC = ({ completed, total }) => { - const percent = Math.round((completed * 100) / total); - return ( - <> -
- - {completed} / {total} - - - {" "} - {t("CREATION_TIME_UPDATED")} - -
-
- -
- - ); -}; +const Progress: React.FC = ({ completed, total }) => ( + + + + {completed} / {total} + + {t("CREATION_TIME_UPDATED")} + -// export const ComfySpan = styled("span")` -// padding: 0 0.5rem; -// word-spacing: 1rem; -// color: #ddd; -// `; + + +); interface OptionsFormProps { step?: Status; @@ -236,46 +222,51 @@ const OptionsForm: React.FC = ({ step, onSubmit, hide }) => { ); }; -const Footer = ({ step, startFix, ...props }) => { - return ( - step != "running" && ( -
- {(!step || step == "completed-with-errors") && ( - - )} - {step == "completed" && ( - - )} - {(!step || step == "completed-with-errors") && ( - <> -
+const Footer = ({ step, startFix, ...props }) => + step != "running" && ( +
+ {(!step || step == "completed-with-errors") && ( + { + props.hide(); + }} + > + {t("cancel")} + + )} + {step == "completed" && ( + + {t("close")} + + )} + {(!step || step == "completed-with-errors") && ( + <> +
- - - )} -
- ) + + {t("FIX_CREATION_TIME")} + + + )} +
); -}; const updateFiles = async ( files: EnteFile[],