Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

update(upload-confirmation):mobile-responsive

Aswin Asok1f80c5757ce2
diff --git a/web/apps/photos/src/components/UploadConfirmationDialog.tsx b/web/apps/photos/src/components/UploadConfirmationDialog.tsx
index 714056a5e5..0a45bccfbd 100644
--- a/web/apps/photos/src/components/UploadConfirmationDialog.tsx
+++ b/web/apps/photos/src/components/UploadConfirmationDialog.tsx
@@ -16,6 +16,12 @@ import {
} from "@mui/material";
import { EnteSwitch } from "ente-base/components/EnteSwitch";
import { FocusVisibleButton } from "ente-base/components/mui/FocusVisibleButton";
+import {
+ uploadSheetMediaQuery,
+ uploadSheetPaperSx,
+ useIsUploadSheet,
+} from "ente-gallery/components/upload-progress/bottom-sheet";
+import { SlideUpTransition } from "ente-new/photos/components/mui/SlideUpTransition";
import { t } from "i18next";
import type { ChangeEvent, ReactElement } from "react";
@@ -52,6 +58,8 @@ export function UploadConfirmationDialog({
onConfirm,
onCancel,
}: UploadConfirmationDialogProps): ReactElement {
+ const isSheet = useIsUploadSheet();
+
return (
<Dialog
open={open}
@@ -59,13 +67,18 @@ export function UploadConfirmationDialog({
maxWidth={false}
aria-labelledby="upload-confirmation-title"
aria-busy={loading}
- slotProps={{ paper: { sx: paperSx } }}
+ slots={isSheet ? { transition: SlideUpTransition } : undefined}
+ slotProps={{ paper: { sx: [paperSx, uploadSheetPaperSx] } }}
>
<Stack sx={contentSx}>
<Stack direction="row" sx={headerSx}>
<Typography sx={displayTitleSx}>
{isTakeout
- ? t("import_from_google_photos")
+ ? t(
+ isSheet
+ ? "google_takeout"
+ : "import_from_google_photos",
+ )
: t("upload_to_ente")}
</Typography>
<Stack direction="row" sx={headerActionsSx}>
@@ -271,7 +284,16 @@ const paperSx = (theme: Theme) => ({
}),
});
-const contentSx = { p: "20px", gap: "36px", color: "text.base" };
+const contentSx = {
+ p: "20px",
+ gap: "36px",
+ color: "text.base",
+ [uploadSheetMediaQuery]: {
+ p: "12px 16px",
+ pb: "calc(20px + env(safe-area-inset-bottom, 0px))",
+ overflowY: "auto",
+ },
+};
const headerSx = {
alignItems: "center",