Skip to content

armgit / ente

Public Imported from GitHub
0

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

Fix MUI deprecations

Manav Rathi369999e0aa92
diff --git a/web/apps/photos/src/components/Collections/CollectionShare.tsx b/web/apps/photos/src/components/Collections/CollectionShare.tsx
index 3e0754d3df..9cf7e918c6 100644
--- a/web/apps/photos/src/components/Collections/CollectionShare.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionShare.tsx
@@ -1876,9 +1876,18 @@ function PublicLinkSetPassword({
open={open}
onClose={onClose}
disablePortal
- slotProps={{ backdrop: { sx: { position: "absolute" } } }}
+ slotProps={{
+ // We're being shown within the sidebar drawer, so limit the
+ // backdrop to only cover the drawer.
+ backdrop: { sx: { position: "absolute" } },
+ // We're being shown within the sidebar drawer, and also the
+ // content of this dialog is lesser than what a normal dialog
+ // contains. Use a bespoke padding.
+ paper: {
+ sx: { "&&": { padding: "4px" } },
+ },
+ }}
sx={{ position: "absolute" }}
- PaperProps={{ sx: { p: 1 } }}
maxWidth={"sm"}
fullWidth
>
@@ -1892,7 +1901,7 @@ function PublicLinkSetPassword({
buttonText={t("lock")}
fieldType="password"
secondaryButtonAction={onClose}
- submitButtonProps={{ sx: { mt: 1, mb: 2 } }}
+ submitButtonProps={{ sx: { mt: 1, mb: 0 } }}
/>
</Stack>
</Dialog>
diff --git a/web/apps/photos/src/components/ExportPendingList.tsx b/web/apps/photos/src/components/ExportPendingList.tsx
index 69ce3011d9..6e52223d06 100644
--- a/web/apps/photos/src/components/ExportPendingList.tsx
+++ b/web/apps/photos/src/components/ExportPendingList.tsx
@@ -58,9 +58,7 @@ const ExportPendingList = (props: Iprops) => {
<TitledMiniDialog
open={props.isOpen}
onClose={props.onClose}
- PaperProps={{
- sx: { maxWidth: "444px" },
- }}
+ slotProps={{ paper: { sx: { maxWidth: "444px" } } }}
title={t("PENDING_ITEMS")}
>
<ItemList
diff --git a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
index 573253f865..02e818e50c 100644
--- a/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
+++ b/web/apps/photos/src/components/Upload/UploadTypeSelector.tsx
@@ -87,12 +87,14 @@ export const UploadTypeSelector: React.FC<UploadTypeSelectorProps> = ({
<Dialog
open={open}
fullWidth
- PaperProps={{
- sx: (theme) => ({
- maxWidth: "375px",
- p: 1,
- [theme.breakpoints.down(360)]: { p: 0 },
- }),
+ slotProps={{
+ paper: {
+ sx: (theme) => ({
+ maxWidth: "375px",
+ p: 1,
+ [theme.breakpoints.down(360)]: { p: 0 },
+ }),
+ },
}}
onClose={onClose}
>
diff --git a/web/apps/photos/src/components/WatchFolder.tsx b/web/apps/photos/src/components/WatchFolder.tsx
index 7ae61db19e..6555642da2 100644
--- a/web/apps/photos/src/components/WatchFolder.tsx
+++ b/web/apps/photos/src/components/WatchFolder.tsx
@@ -122,7 +122,9 @@ export const WatchFolder: React.FC<ModalVisibilityProps> = ({
open={open}
onClose={onClose}
fullWidth
- PaperProps={{ sx: { height: "448px", maxWidth: "414px" } }}
+ slotProps={{
+ paper: { sx: { height: "448px", maxWidth: "414px" } },
+ }}
>
<SpaceBetweenFlex sx={{ p: "16px 8px 8px 8px" }}>
<DialogTitle variant="h3">
diff --git a/web/packages/accounts/components/SecondFactorChoice.tsx b/web/packages/accounts/components/SecondFactorChoice.tsx
index 5f5bb35dea..aa91386eb0 100644
--- a/web/packages/accounts/components/SecondFactorChoice.tsx
+++ b/web/packages/accounts/components/SecondFactorChoice.tsx
@@ -30,7 +30,7 @@ export const SecondFactorChoice: React.FC<SecondFactorChoiceProps> = ({
if (reason != "backdropClick") onClose();
}}
fullWidth
- PaperProps={{ sx: { maxWidth: "360px", padding: "12px" } }}
+ slotProps={{ paper: { sx: { maxWidth: "360px", padding: "12px" } } }}
>
<DialogTitle>{t("two_factor")}</DialogTitle>
<DialogContent>
diff --git a/web/packages/base/components/SingleInputDialog.tsx b/web/packages/base/components/SingleInputDialog.tsx
index 7988c77cc8..d769d3427c 100644
--- a/web/packages/base/components/SingleInputDialog.tsx
+++ b/web/packages/base/components/SingleInputDialog.tsx
@@ -36,7 +36,7 @@ export const SingleInputDialog: React.FC<SingleInputDialogProps> = ({
onClose={onClose}
maxWidth="xs"
fullWidth
- PaperProps={{ sx: { padding: "8px 4px 4px 4px" } }}
+ slotProps={{ paper: { sx: { padding: "8px 4px 4px 4px" } } }}
>
<DialogTitle>{title}</DialogTitle>
<DialogContent sx={{ "&&&": { paddingBlockStart: 0 } }}>
diff --git a/web/packages/new/albums/components/UploaderNameInput.tsx b/web/packages/new/albums/components/UploaderNameInput.tsx
index 18a410dd6f..7d63ef40f9 100644
--- a/web/packages/new/albums/components/UploaderNameInput.tsx
+++ b/web/packages/new/albums/components/UploaderNameInput.tsx
@@ -47,10 +47,10 @@ export const UploaderNameInput: React.FC<UploaderNameInput> = ({
return (
<Dialog
- open={open}
- onClose={onClose}
- PaperProps={{ sx: fullScreen ? {} : { maxWidth: "346px" } }}
- fullScreen={fullScreen}
+ {...{ open, onClose, fullScreen }}
+ slotProps={{
+ paper: { sx: fullScreen ? {} : { maxWidth: "346px" } },
+ }}
fullWidth
>
<Box
diff --git a/web/packages/new/photos/components/CollectionMappingChoice.tsx b/web/packages/new/photos/components/CollectionMappingChoice.tsx
index fb7ec4e8d2..c18c8e1f75 100644
--- a/web/packages/new/photos/components/CollectionMappingChoice.tsx
+++ b/web/packages/new/photos/components/CollectionMappingChoice.tsx
@@ -34,7 +34,7 @@ export const CollectionMappingChoice: React.FC<
open={open}
onClose={onClose}
fullWidth
- PaperProps={{ sx: { maxWidth: "360px", padding: "12px" } }}
+ slotProps={{ paper: { sx: { maxWidth: "360px", padding: "12px" } } }}
>
<SpaceBetweenFlex sx={{ paddingInlineEnd: "4px" }}>
<DialogTitle>{t("multi_folder_upload")}</DialogTitle>
diff --git a/web/packages/new/photos/components/CollectionSelector.tsx b/web/packages/new/photos/components/CollectionSelector.tsx
index 73e3249aa0..d06cda052f 100644
--- a/web/packages/new/photos/components/CollectionSelector.tsx
+++ b/web/packages/new/photos/components/CollectionSelector.tsx
@@ -165,7 +165,7 @@ export const CollectionSelector: React.FC<CollectionSelectorProps> = ({
onClose={handleClose}
fullWidth
fullScreen={isFullScreen}
- PaperProps={{ sx: { maxWidth: "490px" } }}
+ slotProps={{ paper: { sx: { maxWidth: "490px" } } }}
>
<SpaceBetweenFlex sx={{ padding: "10px 8px 6px 0" }}>
<DialogTitle variant="h3">{titleForAction(action)}</DialogTitle>
diff --git a/web/packages/new/photos/components/DropdownInput.tsx b/web/packages/new/photos/components/DropdownInput.tsx
index 8a88734005..af095dfcfb 100644
--- a/web/packages/new/photos/components/DropdownInput.tsx
+++ b/web/packages/new/photos/components/DropdownInput.tsx
@@ -66,12 +66,12 @@ export const DropdownInput = <T extends string>({
);
}}
MenuProps={{
- PaperProps: {
- sx: {
+ slotProps: {
+ paper: {
// Select component sets the min width of each element to
// the width of the select input's width, so setting the
// maxWidth to 0 forces element widths to equal minWidth.
- maxWidth: 0,
+ sx: { maxWidth: 0 },
},
},
MenuListProps: {
diff --git a/web/packages/new/photos/components/PlanSelector.tsx b/web/packages/new/photos/components/PlanSelector.tsx
index 2e9d9f6945..4588d8f4ed 100644
--- a/web/packages/new/photos/components/PlanSelector.tsx
+++ b/web/packages/new/photos/components/PlanSelector.tsx
@@ -79,12 +79,14 @@ export const PlanSelector: React.FC<PlanSelectorProps> = ({
return (
<Dialog
{...{ open, onClose, fullScreen }}
- PaperProps={{
- sx: (theme) => ({
- width: { sm: "391px" },
- p: 1,
- [theme.breakpoints.down(360)]: { p: 0 },
- }),
+ slotProps={{
+ paper: {
+ sx: (theme) => ({
+ width: { sm: "391px" },
+ p: 1,
+ [theme.breakpoints.down(360)]: { p: 0 },
+ }),
+ },
}}
>
<PlanSelectorCard {...{ onClose, setLoading }} />
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index 4931eb25dc..cb8546d178 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -350,7 +350,7 @@ const AddPersonDialog: React.FC<AddPersonDialogProps> = ({
{...{ open, onClose }}
fullWidth
fullScreen={isFullScreen}
- PaperProps={{ sx: { maxWidth: "490px" } }}
+ slotProps={{ paper: { sx: { maxWidth: "490px" } } }}
>
<SpaceBetweenFlex sx={{ padding: "10px 8px 6px 0" }}>
<DialogTitle variant="h3">{t("add_name")}</DialogTitle>
@@ -630,7 +630,7 @@ const SuggestionsDialog: React.FC<SuggestionsDialogProps> = ({
maxWidth="sm"
fullWidth
fullScreen={isSmallWidth}
- PaperProps={{ sx: { minHeight: "80svh" } }}
+ slotProps={{ paper: { sx: { minHeight: "80svh" } } }}
>
<SpaceBetweenFlex
sx={[