This commit is contained in:
Manav Rathi 2024-11-04 14:14:17 +05:30
parent bd35f3e43d
commit b1c7c238a9
No known key found for this signature in database
2 changed files with 20 additions and 5 deletions

View File

@ -1,4 +1,5 @@
import { disableTwoFactor } from "@/accounts/api/user";
import { SidebarDrawer } from "@/base/components/mui/SidebarDrawer";
import type { ModalVisibilityProps, NestedDrawerVisibilityProps } from "@/base/components/utils/modal";
import { AppContext } from "@/new/photos/types/context";
import { VerticallyCentered } from "@ente/shared/components/Container";
@ -63,10 +64,18 @@ export const TwoFactorSettings: React.FC<NestedDrawerVisibilityProps> = ({
};
return (
<TwoFactorDialog
maxWidth="xs"
open={open}
onClose={onClose}
<SidebarDrawer
// <TwoFactorDialog
// maxWidth="xs"
// transitionDuration={0}
// open={open}
// onClose={onClose}
transitionDuration={0}
open={open}
onClose={onClose}
BackdropProps={{
sx: { "&&&": { backgroundColor: "transparent" } },
}}
>
<DialogTitleWithCloseButton onClose={onClose}>
{t("TWO_FACTOR_AUTHENTICATION")}
@ -78,7 +87,7 @@ export const TwoFactorSettings: React.FC<NestedDrawerVisibilityProps> = ({
<TwoFactorModalSetupSection closeDialog={closeDialog} />
)}
</DialogContent>
</TwoFactorDialog>
</SidebarDrawer>
);
}

View File

@ -15,3 +15,9 @@ export const SidebarDrawer = styled(Drawer)(({ theme }) => ({
padding: theme.spacing(1),
},
}));
/**
* A variant of {@link SidebarDrawer} for second level, nested drawers that are
* shown atop an already visible {@link SidebarDrawer}.
*/
// export const NestedDrawerVisibilityProps