Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
0cc2b1f
Replace heart icon with custom star icon for favorites
anandbaburajan Dec 2, 2025
ad2a5a6
Add heart and comment action buttons to file viewer
anandbaburajan Dec 2, 2025
7e6a7c8
Fix file viewer UI: add star icon outline, keep controls visible duri…
anandbaburajan Dec 3, 2025
2e76dcb
Move description to bottom-left with gradient overlays on desktop
anandbaburajan Dec 3, 2025
9721e66
Remove black strokes from file viewer top bar icons
anandbaburajan Dec 3, 2025
cdd9f81
Make action button borders more visible in file viewer
anandbaburajan Dec 3, 2025
557bda9
Add comments sidebar to file viewer
anandbaburajan Dec 3, 2025
11a8b66
Fix formatting and import ordering
anandbaburajan Dec 3, 2025
f380d2c
Fix zoom button left spacing for single-photo albums
anandbaburajan Dec 4, 2025
c5851a1
Refactor CommentsSidebar with reusable components and improved styling
anandbaburajan Dec 4, 2025
a439639
Improve comment grouping and spacing in CommentsSidebar
anandbaburajan Dec 4, 2025
53e9d25
Refine CommentsSidebar styling and responsiveness
anandbaburajan Dec 4, 2025
8edf22e
Add deleted comment handling and improve CommentsSidebar
anandbaburajan Dec 4, 2025
248f681
Add right-click context menu for comments with overlay
anandbaburajan Dec 4, 2025
36de222
Fix context menu overlay on mobile
anandbaburajan Dec 4, 2025
fa98c97
Improve CommentsSidebar UX and add mock comment
anandbaburajan Dec 5, 2025
7ef4b1d
Add collection selector dropdown for comments when no album context
anandbaburajan Dec 5, 2025
53f10ad
Add comment count indicator to file viewer comments icon
anandbaburajan Dec 5, 2025
d729827
Fix bottom gradient overlay not reaching left edge on mobile
anandbaburajan Dec 5, 2025
7b02ec7
Add likes sidebar to file viewer with right-click on heart icon
anandbaburajan Dec 5, 2025
b82211c
Add like album selector modal and border to sidebars
anandbaburajan Dec 5, 2025
081a946
Add dark mode support to comments and likes components
anandbaburajan Dec 5, 2025
2a11ddb
Add chat-style scroll, reply autofocus, and local comment insertion
anandbaburajan Dec 8, 2025
1d5ee8e
Add public like modal and hide album selector for public links
anandbaburajan Dec 8, 2025
30e2e0b
Add name input modal for public album likes
anandbaburajan Dec 8, 2025
cc9a910
Add public comment modal flow for public albums
anandbaburajan Dec 8, 2025
c4ea9e7
Add notifications button and sidebar to album collection header
anandbaburajan Dec 8, 2025
1f731ea
Replace collection header icons and rename notifications to feed
anandbaburajan Dec 9, 2025
4e31752
Redesign feed sidebar layout and add new action icons
anandbaburajan Dec 10, 2025
fcb5887
Update feed sidebar mock data with comprehensive test scenarios
anandbaburajan Dec 10, 2025
ed8214f
Add comment settings to manage link section
anandbaburajan Dec 10, 2025
dc735be
Update feed sidebar styling for light mode
anandbaburajan Dec 10, 2025
8e8c444
Add dashed connector line between feed items
anandbaburajan Dec 10, 2025
b5ac369
Add reactions API and unlike album selector modal
anandbaburajan Dec 11, 2025
b65015b
Simplify like album selector and remove unlike modal
anandbaburajan Dec 11, 2025
40dc86c
Implement likers list with real API data and album cover thumbnails
anandbaburajan Dec 11, 2025
8cc00b5
Improve album selector styling in comments and likes sidebars
anandbaburajan Dec 12, 2025
f53b7e6
Show header for pseudo-collections like All in gallery view
anandbaburajan Dec 12, 2025
c6b62bc
Update delete option hover colors in comments context menu
anandbaburajan Dec 12, 2025
587a29e
Integrate comments API with add, reply, delete, and like functionality
anandbaburajan Dec 12, 2025
c50a439
Use direct state updates instead of refetching for comments and react…
anandbaburajan Dec 12, 2025
136b80f
Fix crash when accessing itemData during slide transitions
anandbaburajan Dec 12, 2025
fbd795f
Show like and comment buttons only in shared albums or public links
anandbaburajan Dec 15, 2025
13fea4c
Rename manage link drawer title from Share album to Manage link
anandbaburajan Dec 15, 2025
07187cf
Show feed button only for shared albums
anandbaburajan Dec 15, 2025
c6c1df1
Filter album selectors to only show shared albums
anandbaburajan Dec 15, 2025
5c0bcbc
Fix comment avatar and long URL handling in comments sidebar
anandbaburajan Dec 15, 2025
b389430
Share user ID to email mapping from FileViewer to LikesSidebar
anandbaburajan Dec 15, 2025
734328e
Fix album selector resetting after adding comment in gallery view
anandbaburajan Dec 15, 2025
1c9ee41
Show comment delete option only to authorized users
anandbaburajan Dec 15, 2025
ad6ff42
Show author name above deleted parent comments in replies
anandbaburajan Dec 15, 2025
b3f0ec2
Fix floating like button on comments and use green heart color
anandbaburajan Dec 15, 2025
e0bec2e
Fix context menu like button text flashing and reduce icon size
anandbaburajan Dec 15, 2025
44718c9
Add contact colors to avatar backgrounds in comments and likes sidebars
anandbaburajan Dec 15, 2025
5cb00d4
Merge remote-tracking branch 'upstream/main' into comments_reactions_web
anandbaburajan Dec 16, 2025
cefbfdd
Show You instead of email for current user in likes and comments
anandbaburajan Dec 16, 2025
53dc93f
Fix feed categorization for replies and reply likes
anandbaburajan Dec 16, 2025
c7a779e
Pass collection and user info to FeedSidebar
anandbaburajan Dec 16, 2025
fe5c1d3
Add feed item navigation to comments and likes sidebars
anandbaburajan Dec 16, 2025
a09e6df
Reduce shared album indicator icon size in collection header
anandbaburajan Dec 16, 2025
56aff98
Center empty state messages vertically in sidebars
anandbaburajan Dec 16, 2025
562c4f2
Add anonymous reactions support for public albums
anandbaburajan Dec 17, 2025
9d0e1c8
Fix anonymous reactions and improve feed display
anandbaburajan Dec 17, 2025
54c7fba
Fix anonymous liker avatar showing wrong initial immediately after li…
anandbaburajan Dec 18, 2025
9ad13d6
Simplify comment structure to store only text in encrypted payload
anandbaburajan Dec 18, 2025
581a89f
Show masked emails for registered users in public album likers list
anandbaburajan Dec 18, 2025
aea2518
Add anonymous commenting support for public albums
anandbaburajan Dec 18, 2025
4e76559
Add like dialog for anonymous users liking comments in public albums
anandbaburajan Dec 18, 2025
9bac301
Merge branch 'main' into comments_reactions_web
anandbaburajan Dec 29, 2025
63d8139
Remove unused individual comment and reaction diff endpoints
anandbaburajan Dec 29, 2025
43d6148
Merge remote-tracking branch 'upstream/main' into comments_reactions_web
anandbaburajan Dec 29, 2025
2dbb070
Hide feed button from album collection header
anandbaburajan Dec 29, 2025
aae8c1e
Include fileID when reacting to file-scoped comments
anandbaburajan Dec 30, 2025
9a3286d
take users directly to album after joining public album
anandbaburajan Dec 31, 2025
91645eb
Merge remote-tracking branch 'upstream/main' into comments_reactions_web
anandbaburajan Dec 31, 2025
eb4bafb
Add join album flow for public album reactions and fix anon comment d…
anandbaburajan Dec 31, 2025
5d43d3c
Use shouldOnlyServeAlbumsApp for public album detection in viewer
anandbaburajan Jan 1, 2026
fd741c3
Fix public album detection for like button using credentials check
anandbaburajan Jan 1, 2026
796339e
Fix public album detection for comments sidebar using credentials check
anandbaburajan Jan 1, 2026
dfd829a
Exclude comment likes when checking for existing file reaction
anandbaburajan Jan 1, 2026
0d25dfd
Use anon user names for avatar colors instead of fixed-length IDs
anandbaburajan Jan 1, 2026
516111a
Fix owner comment deletion for public link only albums
anandbaburajan Jan 1, 2026
05c649d
Allow Enter key to submit name in anonymous like/comment modal
anandbaburajan Jan 1, 2026
b50507a
Add public album feed sidebar with click navigation
anandbaburajan Jan 1, 2026
38880a8
Fix public feed sidebar click navigation and masked email avatars
anandbaburajan Jan 1, 2026
8b8325a
Fix public feed sidebar appearing behind TripLayout nav buttons
anandbaburajan Jan 1, 2026
ca74dd8
Add comments and reactions toggle to public link settings
anandbaburajan Jan 1, 2026
28e48dd
Add character limits for anonymous name and comments
anandbaburajan Jan 1, 2026
526b13e
Remove unnecessary JSON wrapper from anon name encryption
anandbaburajan Jan 1, 2026
17e92b4
Fix lint errors, add missing translations, and skip social fetch when…
anandbaburajan Jan 1, 2026
87f92be
Merge remote-tracking branch 'upstream/main' into comments_reactions_web
anandbaburajan Jan 1, 2026
7a42d9d
Add i18n translations and remove album FeedSidebar
anandbaburajan Jan 1, 2026
1aebb24
Fix crash when opening file viewer before slide is ready
anandbaburajan Jan 1, 2026
8ec7525
lint
anandbaburajan Jan 1, 2026
f00d9ce
enter to send
anandbaburajan Jan 1, 2026
06c556b
Add background and border styling to reply-to section in comments
anandbaburajan Jan 1, 2026
66e4130
lint
anandbaburajan Jan 1, 2026
6740518
Gate comments and reactions feature behind server flag
anandbaburajan Jan 2, 2026
b74babd
lint
anandbaburajan Jan 2, 2026
46950c9
Add env var override for comments feature flag
anandbaburajan Jan 2, 2026
90f56db
Fix comment likes disappearing during sidebar close animation
anandbaburajan Jan 2, 2026
8fcb02f
Add periodic refresh for comments, likes, and public feed sidebars
anandbaburajan Jan 2, 2026
a92d540
Skip masked emails API during periodic refresh for public albums
anandbaburajan Jan 2, 2026
a4acad7
Fix comment disappearing when file is in both shared and non-shared a…
anandbaburajan Jan 5, 2026
3f33200
Gate social API calls on isCommentsFeatureEnabled in gallery view
anandbaburajan Jan 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 110 additions & 10 deletions web/apps/photos/src/components/Collections/CollectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,10 @@ import ArchiveOutlinedIcon from "@mui/icons-material/ArchiveOutlined";
import CheckIcon from "@mui/icons-material/Check";
import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";
import EditIcon from "@mui/icons-material/Edit";
import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";
import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";
import LinkIcon from "@mui/icons-material/Link";
import LogoutIcon from "@mui/icons-material/Logout";
import MapOutlinedIcon from "@mui/icons-material/MapOutlined";
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
import PeopleIcon from "@mui/icons-material/People";
import PushPinIcon from "@mui/icons-material/PushPin";
import PushPinOutlinedIcon from "@mui/icons-material/PushPinOutlined";
import SortIcon from "@mui/icons-material/Sort";
Expand Down Expand Up @@ -36,6 +33,7 @@ import {
GalleryItemsHeaderAdapter,
GalleryItemsSummary,
} from "ente-new/photos/components/gallery/ListHeader";
import { StarIcon } from "ente-new/photos/components/icons/StarIcon";
import { useSettingsSnapshot } from "ente-new/photos/components/utils/use-snapshot";
import {
defaultHiddenCollectionUserFacingName,
Expand Down Expand Up @@ -109,8 +107,14 @@ export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {
const EndIcon = () => {
if (attributes.has("archived")) return <ArchiveOutlinedIcon />;
if (attributes.has("sharedOnlyViaLink")) return <LinkIcon />;
if (attributes.has("shared")) return <PeopleIcon />;
if (attributes.has("userFavorites")) return <FavoriteRoundedIcon />;
if (attributes.has("shared"))
return (
<Box sx={{ mt: "-1px" }}>
<SmallShareIcon />
</Box>
);
if (attributes.has("userFavorites"))
return <StarIcon fontSize="small" />;
return <></>;
};

Expand Down Expand Up @@ -445,7 +449,7 @@ const CollectionHeaderOptions: React.FC<CollectionHeaderProps> = ({
<OverflowMenuOption
key="share"
onClick={onCollectionShare}
startIcon={<PeopleIcon />}
startIcon={<ShareIcon />}
>
{t("share_favorites")}
</OverflowMenuOption>,
Expand Down Expand Up @@ -630,7 +634,7 @@ const CollectionHeaderOptions: React.FC<CollectionHeaderProps> = ({
<OverflowMenuOption
key="share"
onClick={onCollectionShare}
startIcon={<PeopleIcon />}
startIcon={<ShareIcon />}
>
{t("share_album")}
</OverflowMenuOption>,
Expand Down Expand Up @@ -774,6 +778,23 @@ type DownloadQuickOptionProps = OptionProps & {
collectionSummary: CollectionSummary;
};

const DownloadIcon: React.FC = () => (
<svg
width="22"
height="22"
viewBox="0 0 24 24"
fill="none"
xmlns="http://www.w3.org/2000/svg"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
>
<path d="M2.99969 17.0002C2.99969 17.9302 2.99969 18.3952 3.10192 18.7767C3.37932 19.8119 4.18796 20.6206 5.22324 20.898C5.60474 21.0002 6.06972 21.0002 6.99969 21.0002L16.9997 21.0002C17.9297 21.0002 18.3947 21.0002 18.7762 20.898C19.8114 20.6206 20.6201 19.8119 20.8975 18.7767C20.9997 18.3952 20.9997 17.9302 20.9997 17.0002" />
<path d="M16.4998 11.5002C16.4998 11.5002 13.1856 16.0002 11.9997 16.0002C10.8139 16.0002 7.49976 11.5002 7.49976 11.5002M11.9997 15.0002V3.00016" />
</svg>
);

const DownloadQuickOption: React.FC<DownloadQuickOptionProps> = ({
collectionSummary: { type },
onClick,
Expand All @@ -790,11 +811,48 @@ const DownloadQuickOption: React.FC<DownloadQuickOptionProps> = ({
}
>
<IconButton onClick={onClick}>
<FileDownloadOutlinedIcon />
<Box
sx={{
width: 24,
height: 24,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<DownloadIcon />
</Box>
</IconButton>
</Tooltip>
);

export const FeedIcon: React.FC = () => (
<svg
width="23"
height="20"
viewBox="0 0 23 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M9.7998 0.5C10.2416 0.5 10.5996 0.857977 10.5996 1.2998C10.5996 1.74163 10.2416 2.09961 9.7998 2.09961H4.7998C3.03249 2.09961 1.59961 3.53249 1.59961 5.2998V14.2998C1.59961 16.0671 3.0325 17.5 4.7998 17.5H13.7998C15.5671 17.5 17 16.0671 17 14.2998V11.7998C17 11.358 17.358 11 17.7998 11C18.2416 11 18.5996 11.358 18.5996 11.7998V14.2998C18.5996 16.9507 16.4507 19.0996 13.7998 19.0996H4.7998C2.14883 19.0996 0 16.9507 0 14.2998V5.2998C0 2.64884 2.14884 0.5 4.7998 0.5H9.7998Z"
fill="currentColor"
/>
<path
d="M13.2998 13.5C13.7416 13.5 14.0996 13.858 14.0996 14.2998C14.0996 14.7416 13.7416 15.0996 13.2998 15.0996H4.2998C3.85798 15.0996 3.5 14.7416 3.5 14.2998C3.5 13.858 3.85798 13.5 4.2998 13.5H13.2998Z"
fill="currentColor"
/>
<path
d="M10.2998 10.5C10.7416 10.5 11.0996 10.858 11.0996 11.2998C11.0996 11.7416 10.7416 12.0996 10.2998 12.0996H4.2998C3.85798 12.0996 3.5 11.7416 3.5 11.2998C3.5 10.858 3.85798 10.5 4.2998 10.5H10.2998Z"
fill="currentColor"
/>
<path
d="M20.6523 6.12012C21.3761 5.2635 22.0996 4.13144 22.0996 2.93848C22.0995 1.38141 20.9626 0 19.2998 0C18.621 0 17.9847 0.205224 17.2998 0.749023C16.6149 0.205224 15.9787 0 15.2998 0C13.637 0 12.5001 1.38141 12.5 2.93848C12.5 4.13144 13.2236 5.2635 13.9473 6.12012C14.698 7.00866 15.5878 7.76218 16.1758 8.21484C16.8431 8.72865 17.7565 8.72865 18.4238 8.21484C19.0119 7.76218 19.9016 7.00866 20.6523 6.12012Z"
fill="currentColor"
/>
</svg>
);

const showShareQuickOption = ({ type, attributes }: CollectionSummary) =>
type == "album" ||
type == "folder" ||
Expand All @@ -806,6 +864,38 @@ interface ShareQuickOptionProps {
onClick: () => void;
}

const ShareIcon: React.FC = () => (
<svg
width="21"
height="19"
viewBox="0 0 22 20"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13.875 8C13.3918 8 13 8.39175 13 8.875C13 9.35825 13.3918 9.75 13.875 9.75V8.875V8ZM13.875 0C13.3918 0 13 0.391751 13 0.875C13 1.35825 13.3918 1.75 13.875 1.75V0.875V0ZM15.875 11C15.3918 11 15 11.3918 15 11.875C15 12.3582 15.3918 12.75 15.875 12.75V11.875V11ZM17.375 18C16.8918 18 16.5 18.3918 16.5 18.875C16.5 19.3582 16.8918 19.75 17.375 19.75V18.875V18ZM11.875 4.875H11C11 6.60089 9.60086 8 7.875 8V8.875V9.75C10.5673 9.75 12.75 7.56739 12.75 4.875H11.875ZM7.875 8.875V8C6.14911 8 4.75 6.60089 4.75 4.875H3.875H3C3 7.56739 5.18261 9.75 7.875 9.75V8.875ZM3.875 4.875H4.75C4.75 3.14911 6.14911 1.75 7.875 1.75V0.875V0C5.18261 0 3 2.18261 3 4.875H3.875ZM7.875 0.875V1.75C9.60086 1.75 11 3.14911 11 4.875H11.875H12.75C12.75 2.18261 10.5673 0 7.875 0V0.875ZM13.875 8.875V9.75C16.5673 9.75 18.75 7.56739 18.75 4.875H17.875H17C17 6.60089 15.6009 8 13.875 8V8.875ZM17.875 4.875H18.75C18.75 2.18261 16.5673 0 13.875 0V0.875V1.75C15.6009 1.75 17 3.14911 17 4.875H17.875ZM9.875 11.875V11H5.875V11.875V12.75H9.875V11.875ZM5.875 11.875V11C2.63033 11 0 13.6304 0 16.875H0.875H1.75C1.75 14.5968 3.59683 12.75 5.875 12.75V11.875ZM0.875 16.875H0C0 18.4629 1.28719 19.75 2.875 19.75V18.875V18C2.25367 18 1.75 17.4963 1.75 16.875H0.875ZM2.875 18.875V19.75H12.875V18.875V18H2.875V18.875ZM12.875 18.875V19.75C14.4628 19.75 15.75 18.4628 15.75 16.875H14.875H14C14 17.4964 13.4964 18 12.875 18V18.875ZM14.875 16.875H15.75C15.75 13.6304 13.1196 11 9.875 11V11.875V12.75C12.1532 12.75 14 14.5968 14 16.875H14.875ZM15.875 11.875V12.75C18.1532 12.75 20 14.5968 20 16.875H20.875H21.75C21.75 13.6304 19.1196 11 15.875 11V11.875ZM20.875 16.875H20C20 17.4964 19.4964 18 18.875 18V18.875V19.75C20.4628 19.75 21.75 18.4628 21.75 16.875H20.875ZM18.875 18.875V18H17.375V18.875V19.75H18.875V18.875Z"
fill="currentColor"
/>
</svg>
);

/** A smaller version of ShareIcon for use in the collection header summary. */
const SmallShareIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
<svg
width="15"
height="14"
viewBox="0 0 22 20"
{...props}
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M13.875 8C13.3918 8 13 8.39175 13 8.875C13 9.35825 13.3918 9.75 13.875 9.75V8.875V8ZM13.875 0C13.3918 0 13 0.391751 13 0.875C13 1.35825 13.3918 1.75 13.875 1.75V0.875V0ZM15.875 11C15.3918 11 15 11.3918 15 11.875C15 12.3582 15.3918 12.75 15.875 12.75V11.875V11ZM17.375 18C16.8918 18 16.5 18.3918 16.5 18.875C16.5 19.3582 16.8918 19.75 17.375 19.75V18.875V18ZM11.875 4.875H11C11 6.60089 9.60086 8 7.875 8V8.875V9.75C10.5673 9.75 12.75 7.56739 12.75 4.875H11.875ZM7.875 8.875V8C6.14911 8 4.75 6.60089 4.75 4.875H3.875H3C3 7.56739 5.18261 9.75 7.875 9.75V8.875ZM3.875 4.875H4.75C4.75 3.14911 6.14911 1.75 7.875 1.75V0.875V0C5.18261 0 3 2.18261 3 4.875H3.875ZM7.875 0.875V1.75C9.60086 1.75 11 3.14911 11 4.875H11.875H12.75C12.75 2.18261 10.5673 0 7.875 0V0.875ZM13.875 8.875V9.75C16.5673 9.75 18.75 7.56739 18.75 4.875H17.875H17C17 6.60089 15.6009 8 13.875 8V8.875ZM17.875 4.875H18.75C18.75 2.18261 16.5673 0 13.875 0V0.875V1.75C15.6009 1.75 17 3.14911 17 4.875H17.875ZM9.875 11.875V11H5.875V11.875V12.75H9.875V11.875ZM5.875 11.875V11C2.63033 11 0 13.6304 0 16.875H0.875H1.75C1.75 14.5968 3.59683 12.75 5.875 12.75V11.875ZM0.875 16.875H0C0 18.4629 1.28719 19.75 2.875 19.75V18.875V18C2.25367 18 1.75 17.4963 1.75 16.875H0.875ZM2.875 18.875V19.75H12.875V18.875V18H2.875V18.875ZM12.875 18.875V19.75C14.4628 19.75 15.75 18.4628 15.75 16.875H14.875H14C14 17.4964 13.4964 18 12.875 18V18.875ZM14.875 16.875H15.75C15.75 13.6304 13.1196 11 9.875 11V11.875V12.75C12.1532 12.75 14 14.5968 14 16.875H14.875ZM15.875 11.875V12.75C18.1532 12.75 20 14.5968 20 16.875H20.875H21.75C21.75 13.6304 19.1196 11 15.875 11V11.875ZM20.875 16.875H20C20 17.4964 19.4964 18 18.875 18V18.875V19.75C20.4628 19.75 21.75 18.4628 21.75 16.875H20.875ZM18.875 18.875V18H17.375V18.875V19.75H18.875V18.875Z"
fill="currentColor"
/>
</svg>
);

const ShareQuickOption: React.FC<ShareQuickOptionProps> = ({
collectionSummary: { attributes },
onClick,
Expand All @@ -822,7 +912,17 @@ const ShareQuickOption: React.FC<ShareQuickOptionProps> = ({
}
>
<IconButton onClick={onClick}>
<PeopleIcon />
<Box
sx={{
width: 24,
height: 24,
display: "flex",
alignItems: "center",
justifyContent: "center",
}}
>
<ShareIcon />
</Box>
</IconButton>
</Tooltip>
);
Expand All @@ -849,7 +949,7 @@ const DownloadOption: React.FC<
isDownloadInProgress?.() ? (
<ActivityIndicator size="20px" sx={{ cursor: "not-allowed" }} />
) : (
<FileDownloadOutlinedIcon />
<DownloadIcon />
)
}
onClick={onClick}
Expand Down
22 changes: 19 additions & 3 deletions web/apps/photos/src/components/Collections/CollectionShare.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1847,7 +1847,7 @@ const ManagePublicShareOptions: React.FC<ManagePublicShareOptionsProps> = ({
anchor="right"
{...{ open, onClose }}
onRootClose={handleRootClose}
title={t("share_album")}
title={t("manage_link")}
>
<Stack sx={{ gap: 3, py: "20px", px: "8px" }}>
<ManageLayout
Expand Down Expand Up @@ -1949,18 +1949,34 @@ const ManagePublicCollect: React.FC<ManagePublicLinkSettingProps> = ({
publicURL,
onUpdate,
}) => {
const handleFileDownloadSetting = () => {
const { isCommentsEnabled } = useSettingsSnapshot();

const handleCollectSetting = () => {
void onUpdate({ enableCollect: !publicURL.enableCollect });
};

const handleCommentSetting = () => {
void onUpdate({ enableComment: !publicURL.enableComment });
};

return (
<Stack>
<RowButtonGroup>
<RowSwitch
label={t("allow_adding_photos")}
checked={publicURL.enableCollect}
onClick={handleFileDownloadSetting}
onClick={handleCollectSetting}
/>
{isCommentsEnabled && (
<>
<RowButtonDivider />
<RowSwitch
label={t("enable_comments")}
checked={publicURL.enableComment}
onClick={handleCommentSetting}
/>
</>
)}
</RowButtonGroup>
</Stack>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ import {
GalleryBarImpl,
type GalleryBarImplProps,
} from "ente-new/photos/components/gallery/BarImpl";
import {
GalleryItemsHeaderAdapter,
GalleryItemsSummary,
} from "ente-new/photos/components/gallery/ListHeader";
import { PeopleHeader } from "ente-new/photos/components/gallery/PeopleHeader";
import type { CollectionSummary } from "ente-new/photos/services/collection-summary";
import {
Expand Down Expand Up @@ -48,7 +52,7 @@ type GalleryBarAndListHeaderProps = Omit<
*/
shouldHide: boolean;
barCollectionSummaries: CollectionSummaries;
activeCollection: Collection;
activeCollection: Collection | undefined;
setActiveCollectionID: (collectionID: number) => void;
setFileListHeader: (header: FileListHeaderOrFooter) => void;
saveGroups: SaveGroup[];
Expand Down Expand Up @@ -154,9 +158,12 @@ export const GalleryBarAndListHeader: React.FC<
useEffect(() => {
if (shouldHide) return;

const collectionSummary = toShowCollectionSummaries.get(
activeCollectionID!,
);
setFileListHeader({
component:
mode != "people" ? (
mode != "people" && activeCollection ? (
<CollectionHeader
{...{
activeCollection,
Expand All @@ -173,12 +180,17 @@ export const GalleryBarAndListHeader: React.FC<
onSelectCollection,
onSelectPerson,
}}
collectionSummary={
toShowCollectionSummaries.get(activeCollectionID!)!
}
collectionSummary={collectionSummary!}
onCollectionShare={showCollectionShare}
onCollectionCast={showCollectionCast}
/>
) : mode != "people" && collectionSummary ? (
<GalleryItemsHeaderAdapter>
<GalleryItemsSummary
name={collectionSummary.name}
fileCount={collectionSummary.fileCount}
/>
</GalleryItemsHeaderAdapter>
) : activePerson ? (
<PeopleHeader
person={activePerson}
Expand All @@ -194,6 +206,7 @@ export const GalleryBarAndListHeader: React.FC<
shouldHide,
mode,
toShowCollectionSummaries,
activeCollection,
activeCollectionID,
isActiveCollectionDownloadInProgress,
activePerson,
Expand Down Expand Up @@ -249,24 +262,28 @@ export const GalleryBarAndListHeader: React.FC<
isInHiddenSection={mode == "hidden-albums"}
onRemotePull={onRemotePull}
/>
<CollectionShare
{...collectionShareVisibilityProps}
collectionSummary={
toShowCollectionSummaries.get(activeCollectionID!)!
}
collection={activeCollection}
{...{
user,
emailByUserID,
shareSuggestionEmails,
setBlockingLoad,
onRemotePull,
}}
/>
<AlbumCastDialog
{...collectionCastVisibilityProps}
collection={activeCollection}
/>
{activeCollection && (
<>
<CollectionShare
{...collectionShareVisibilityProps}
collectionSummary={
toShowCollectionSummaries.get(activeCollectionID!)!
}
collection={activeCollection}
{...{
user,
emailByUserID,
shareSuggestionEmails,
setBlockingLoad,
onRemotePull,
}}
/>
<AlbumCastDialog
{...collectionCastVisibilityProps}
collection={activeCollection}
/>
</>
)}
</>
);
};
Expand Down
4 changes: 2 additions & 2 deletions web/apps/photos/src/components/FileList.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import AlbumOutlinedIcon from "@mui/icons-material/AlbumOutlined";
import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";
import { Box, Checkbox, Fab, Typography, styled } from "@mui/material";
Expand All @@ -14,6 +13,7 @@ import type { EnteFile } from "ente-media/file";
import { fileDurationString } from "ente-media/file-metadata";
import { FileType } from "ente-media/file-type";
import type { GalleryBarMode } from "ente-new/photos/components/gallery/reducer";
import { StarIcon } from "ente-new/photos/components/icons/StarIcon";
import {
LoadingThumbnail,
StaticThumbnail,
Expand Down Expand Up @@ -1101,7 +1101,7 @@ const FileThumbnail: React.FC<FileThumbnailProps> = ({
)}
{isFav && (
<FavoriteOverlay>
<FavoriteRoundedIcon />
<StarIcon fontSize="small" />
</FavoriteOverlay>
)}

Expand Down
Loading