π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
feat(photos):enable-sidebar-shell-for-all-users
Aswin Asok6b36202f097a
diff --git a/web/apps/photos/src/components/sidebar/Sidebar.tsx b/web/apps/photos/src/components/sidebar/Sidebar.tsxindex f5a08cd82d..e5f95d81bf 100644--- a/web/apps/photos/src/components/sidebar/Sidebar.tsx+++ b/web/apps/photos/src/components/sidebar/Sidebar.tsx@@ -11,14 +11,7 @@ import {import { HugeiconsIcon } from "@hugeicons/react";import CloseIcon from "@mui/icons-material/Close";import LockOutlinedIcon from "@mui/icons-material/LockOutlined";-import {- Box,- Divider,- IconButton,- Skeleton,- Stack,- styled,-} from "@mui/material";+import { Box, Divider, IconButton, Stack, styled } from "@mui/material";import Typography from "@mui/material/Typography";import { isDesktop } from "ente-base/app";import { EnteLogo, EnteLogoBox } from "ente-base/components/EnteLogo";@@ -277,7 +270,11 @@ export const Sidebar: React.FC<SidebarProps> = ({}, [pendingAction]);return (- <SidebarDrawerShell open={open} onClose={onClose}>+ <SidebarDrawerShell+ open={open}+ onClose={onClose}+ onEnter={pendingAction ? undefined : showAccount}+ ><RootSidebarDraweropen={open}onClose={onClose}@@ -405,14 +402,6 @@ const UserDetailsSection: React.FC<UserDetailsSectionProps> = ({return (<><Box sx={{ px: 0.5, mt: 1.5, pb: 1.5, mb: 1 }}>- <Typography sx={{ px: 1, pb: 1, color: "text.muted" }}>- {userDetails ? (- userDetails.email- ) : (- <Skeleton animation="wave" />- )}- </Typography>-<SubscriptionCarduserDetails={userDetails}onClick={handleSubscriptionCardClick}diff --git a/web/apps/photos/src/components/sidebar/SidebarDrawerShell.tsx b/web/apps/photos/src/components/sidebar/SidebarDrawerShell.tsxindex 48e83638b6..88945282e8 100644--- a/web/apps/photos/src/components/sidebar/SidebarDrawerShell.tsx+++ b/web/apps/photos/src/components/sidebar/SidebarDrawerShell.tsx@@ -7,7 +7,6 @@ import {} from "@mui/material";import { SidebarPanelContext } from "ente-base/components/mui/SidebarDrawerContext";import type { ModalVisibilityProps } from "ente-base/components/utils/modal";-import { useSettingsSnapshot } from "ente-new/photos/components/utils/use-snapshot";import { t } from "i18next";import React, { useRef } from "react";@@ -15,15 +14,15 @@ import React, { useRef } from "react";export function SidebarDrawerShell({open,onClose,+ onEnter,children,-}: React.PropsWithChildren<ModalVisibilityProps>) {+}: React.PropsWithChildren<ModalVisibilityProps & { onEnter?: () => void }>) {const theme = useTheme();const wide = useMediaQuery(theme.breakpoints.up("md"));- const { isInternalUser } = useSettingsSnapshot();const panel = useRef<HTMLDivElement>(null);const container = () => panel.current;- if (!isInternalUser || !wide) return children;+ if (!wide) return children;return (<Dialog@@ -32,6 +31,7 @@ export function SidebarDrawerShell({maxWidth={false}aria-label={t("settings")}slotProps={{+ transition: { onEnter },paper: {sx: {width: "min(1200px, calc(100vw - 48px))",diff --git a/web/apps/photos/src/components/sidebar/accounts/Account.tsx b/web/apps/photos/src/components/sidebar/accounts/Account.tsxindex 2239ec7742..3f2831da44 100644--- a/web/apps/photos/src/components/sidebar/accounts/Account.tsx+++ b/web/apps/photos/src/components/sidebar/accounts/Account.tsx@@ -380,6 +380,7 @@ export const Account: React.FC<AccountProps> = ({{t("delete_account")}</Box>}+ subtitle="Permanently remove your account and data"onClick={handleDeleteAccount}/></Stack>