Skip to content

armgit / ente

Public Imported from GitHub
0

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

Merge remote-tracking branch 'upstream/main' into comments_reactions_web

Anand Baburajan5cb00d421a53
diff --cc web/apps/photos/src/components/Collections/CollectionHeader.tsx
index 91356a4d74,10e9094909..726e92f967
--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx
@@@ -1,9 -1,13 +1,10 @@@
import ArchiveOutlinedIcon from "@mui/icons-material/ArchiveOutlined";
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";
@@@ -31,7 -35,7 +32,8 @@@ 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,
deleteCollection,
@@@ -123,9 -140,16 +140,17 @@@ const CollectionHeaderOptions: React.FC
onRemotePull,
onCollectionShare,
onCollectionCast,
+ onCollectionFeed,
onAddSaveGroup,
isActiveCollectionDownloadInProgress,
+ onMarkTempDeleted,
+ onAddFileToCollection,
+ onRemoteFilesPull,
+ onVisualFeedback,
+ fileNormalCollectionIDs,
+ collectionNameByID,
+ onSelectCollection,
+ onSelectPerson,
}) => {
const { showMiniDialog, onGenericError } = useBaseContext();
const { showLoadingBar, hideLoadingBar } = usePhotosAppContext();
diff --cc web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
index 605d96843d,41111983bd..3e20af5512
--- a/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
+++ b/web/apps/photos/src/components/Collections/GalleryBarAndListHeader.tsx
@@@ -57,11 -52,19 +57,20 @@@ type GalleryBarAndListHeaderProps = Omi
setActiveCollectionID: (collectionID: number) => void;
setFileListHeader: (header: FileListHeaderOrFooter) => void;
saveGroups: SaveGroup[];
- /**
- * The files currently being displayed in the gallery (for the feed sidebar).
- */
+ files: EnteFile[];
- } & Pick<CollectionHeaderProps, "onRemotePull" | "onAddSaveGroup"> &
+ } & Pick<
+ CollectionHeaderProps,
+ | "onRemotePull"
+ | "onAddSaveGroup"
+ | "onMarkTempDeleted"
+ | "onAddFileToCollection"
+ | "onRemoteFilesPull"
+ | "onVisualFeedback"
+ | "fileNormalCollectionIDs"
+ | "collectionNameByID"
+ | "onSelectCollection"
+ | "onSelectPerson"
+ > &
Pick<
CollectionShareProps,
"user" | "emailByUserID" | "shareSuggestionEmails" | "setBlockingLoad"
@@@ -104,9 -107,15 +113,16 @@@ export const GalleryBarAndListHeader: R
shareSuggestionEmails,
onRemotePull,
onAddSaveGroup,
+ onMarkTempDeleted,
+ onAddFileToCollection,
+ onRemoteFilesPull,
+ onVisualFeedback,
+ fileNormalCollectionIDs,
+ collectionNameByID,
+ onSelectCollection,
onSelectPerson,
setFileListHeader,
+ files,
}) => {
const { show: showAllAlbums, props: allAlbumsVisibilityProps } =
useModalVisibility();
@@@ -160,19 -164,21 +176,27 @@@
isActiveCollectionDownloadInProgress,
onRemotePull,
onAddSaveGroup,
+ onMarkTempDeleted,
+ onAddFileToCollection,
+ onRemoteFilesPull,
+ onVisualFeedback,
+ fileNormalCollectionIDs,
+ collectionNameByID,
+ onSelectCollection,
+ onSelectPerson,
}}
- collectionSummary={
- toShowCollectionSummaries.get(activeCollectionID!)!
- }
+ collectionSummary={collectionSummary!}
onCollectionShare={showCollectionShare}
onCollectionCast={showCollectionCast}
+ onCollectionFeed={showCollectionFeed}
/>
+ ) : mode != "people" && collectionSummary ? (
+ <GalleryItemsHeaderAdapter>
+ <GalleryItemsSummary
+ name={collectionSummary.name}
+ fileCount={collectionSummary.fileCount}
+ />
+ </GalleryItemsHeaderAdapter>
) : activePerson ? (
<PeopleHeader
person={activePerson}
@@@ -194,7 -199,16 +218,17 @@@
activePerson,
showCollectionShare,
showCollectionCast,
+ onRemotePull,
+ onAddSaveGroup,
+ onMarkTempDeleted,
+ onAddFileToCollection,
+ onRemoteFilesPull,
+ onVisualFeedback,
+ fileNormalCollectionIDs,
+ collectionNameByID,
+ onSelectCollection,
+ onSelectPerson,
+ showCollectionFeed,
// TODO: Cluster
// This causes a loop since it is an array dep
// people,
diff --cc web/packages/new/photos/components/gallery/BarImpl.tsx
index dd3074bf95,95c16dfa2b..e14a64c5fe
--- a/web/packages/new/photos/components/gallery/BarImpl.tsx
+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx
@@@ -538,8 -539,10 +539,10 @@@ const CollectionBarCardIcon: React.FC<C
// will be true simultaneously even in the rarest of cases (a pinned and
// shared album that is also archived), and there is enough space for 3.
<CollectionBarCardIcon_>
- {attributes.has("userFavorites") && <FavoriteRoundedIcon />}
+ {attributes.has("userFavorites") && <StarIcon fontSize="small" />}
- {attributes.has("pinned") && (
+ {(attributes.has("pinned") ||
+ (attributes.has("shareePinned") &&
+ settingsSnapshot().isShareePinEnabled)) && (
// Need && to override the 20px set in the container.
<PushPinIcon sx={{ "&&": { fontSize: "18px" } }} />
)}