π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Always show people section btn on destkop
Manav Rathie3e9febeb369
diff --git a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsxindex 28bc207407..7b1e9bce2c 100644--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx@@ -78,7 +78,6 @@ type CollectionsProps = Omit<*/export const GalleryBarAndListHeader: React.FC<CollectionsProps> = ({shouldHide,- showPeopleSectionButton,mode,onChangeMode,collectionSummaries,@@ -193,7 +192,6 @@ export const GalleryBarAndListHeader: React.FC<CollectionsProps> = ({<><GalleryBarImpl{...{- showPeopleSectionButton,mode,onChangeMode,activeCollectionID,diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex e929aa6707..c74fb6d1bc 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -844,10 +844,6 @@ export default function Gallery() {return <div></div>;}- // `peopleState` will be undefined only when ML is disabled, otherwise it'll- // be present, with empty arrays, even if people data is still syncing.- const showPeopleSectionButton = peopleState !== undefined;-return (<GalleryContext.Providervalue={{@@ -965,7 +961,6 @@ export default function Gallery() {setActiveCollectionID: handleSetActiveCollectionID,hiddenCollectionSummaries:state.hiddenCollectionSummaries,- showPeopleSectionButton,people:(state.view.type == "people"? state.view.visiblePeoplediff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsxindex 7d4875f32c..85dd164042 100644--- a/web/packages/new/photos/components/gallery/BarImpl.tsx+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx@@ -41,13 +41,10 @@ import {type ListChildComponentProps,areEqual,} from "react-window";+import { isMLSupported } from "../../services/ml";import type { GalleryBarMode } from "./reducer";export interface GalleryBarImplProps {- /**- * When `true`, the bar shows a button to switch to the people section.- */- showPeopleSectionButton: boolean;/*** What are we displaying currently.*/@@ -100,7 +97,6 @@ export interface GalleryBarImplProps {}export const GalleryBarImpl: React.FC<GalleryBarImplProps> = ({- showPeopleSectionButton,mode,onChangeMode,collectionSummaries,@@ -255,9 +251,7 @@ export const GalleryBarImpl: React.FC<GalleryBarImplProps> = ({sx={people.length ? {} : { borderBlockEndColor: "transparent" }}><Row1>- <ModeIndicator- {...{ showPeopleSectionButton, mode, onChangeMode }}- />+ <ModeIndicator {...{ mode, onChangeMode }} />{controls1}</Row1><Row2>@@ -314,20 +308,17 @@ export const Row2 = styled(Box)``;const ModeIndicator: React.FC<- Pick<- GalleryBarImplProps,- "showPeopleSectionButton" | "mode" | "onChangeMode"- >-> = ({ showPeopleSectionButton, mode, onChangeMode }) => {+ Pick<GalleryBarImplProps, "mode" | "onChangeMode">+> = ({ mode, onChangeMode }) => {// Mode switcher is not shown in the hidden albums section.if (mode == "hidden-albums") {return <Typography>{t("hidden_albums")}</Typography>;}- // Show the static mode indicator with only the "Albums" title if we have- // not been asked to show the people button (there are no other sections to- // switch to in such a case).- if (!showPeopleSectionButton) {+ // Show the static mode indicator with only the "Albums" title if ML is not+ // supported on this client (web), since there are no other sections to+ // switch to in such a case.+ if (!isMLSupported) {return <Typography>{t("albums")}</Typography>;}