Skip to content

armgit / ente

Public Imported from GitHub
0

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

Alt

Manav Rathi6515e13a9aea
diff --git a/web/packages/new/photos/components/gallery/ListHeader.tsx b/web/packages/new/photos/components/gallery/ListHeader.tsx
index 3a68a94cd2..3bf4bfef7c 100644
--- a/web/packages/new/photos/components/gallery/ListHeader.tsx
+++ b/web/packages/new/photos/components/gallery/ListHeader.tsx
@@ -26,6 +26,15 @@ interface GalleryItemsSummaryProps {
* An optional element, usually an icon, placed after the file count.
*/
endIcon?: React.ReactNode;
+ /**
+ * An optional click handler for the name.
+ *
+ * Note: Do not use this as the primary / only mechanism for the
+ * corresponding functionality to be invoked, since this click handler will
+ * be accessible only to sighted mouse users. However, it is fine to use it
+ * as an alternate means of invoking some function.
+ */
+ onNameClick?: () => void;
}
/**
@@ -37,9 +46,10 @@ export const GalleryItemsSummary: React.FC<GalleryItemsSummaryProps> = ({
nameProps,
fileCount,
endIcon,
+ onNameClick
}) => (
<div>
- <Typography variant="h3" {...(nameProps ?? {})}>
+ <Typography variant="h3" {...(nameProps ?? {})} onClick={onNameClick}>
{name}
</Typography>
diff --git a/web/packages/new/photos/components/gallery/PeopleHeader.tsx b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
index 9c6796b017..31f409e969 100644
--- a/web/packages/new/photos/components/gallery/PeopleHeader.tsx
+++ b/web/packages/new/photos/components/gallery/PeopleHeader.tsx
@@ -177,6 +177,7 @@ const ClusterPersonHeader: React.FC<ClusterPersonHeaderProps> = ({
name={pt("Unnamed person") /* TODO-Cluster */}
nameProps={{ color: "text.muted" }}
fileCount={person.fileIDs.length}
+ onNameClick={showAddPerson}
/>
<Stack direction="row" sx={{ alignItems: "center", gap: 2 }}>
<Tooltip title={pt("Add a name")}>