π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Move
Manav Rathicda5caec3f61
diff --git a/web/apps/photos/src/components/Collections/index.tsx b/web/apps/photos/src/components/Collections/index.tsxindex c58ea50c13..40b6ecf428 100644--- a/web/apps/photos/src/components/Collections/index.tsx+++ b/web/apps/photos/src/components/Collections/index.tsx@@ -1,4 +1,8 @@import type { Collection } from "@/media/collection";+import {+ GalleryBarImpl,+ type GalleryBarMode,+} from "@/new/photos/components/Gallery/BarImpl";import type { Person } from "@/new/photos/services/ml/cgroups";import {collectionsSortBy,@@ -13,10 +17,6 @@ import {} from "@ente/shared/storage/localStorage";import AllCollections from "components/Collections/AllCollections";import CollectionInfoWithOptions from "components/Collections/CollectionInfoWithOptions";-import {- CollectionListBar,- type GalleryBarMode,-} from "components/Collections/CollectionListBar";import { SetCollectionNamerAttributes } from "components/Collections/CollectionNamer";import CollectionShare from "components/Collections/CollectionShare";import { ITEM_TYPE, TimeStampListItem } from "components/PhotoList";@@ -162,7 +162,7 @@ export const Collections: React.FC<CollectionsProps> = ({return (<>- <CollectionListBar+ <GalleryBarImpl{...{mode,setMode,diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex 1f83172aac..20adc9dbd2 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -3,6 +3,7 @@ import { NavbarBase } from "@/base/components/Navbar";import { useIsMobileWidth } from "@/base/hooks";import log from "@/base/log";import type { Collection } from "@/media/collection";+import type { GalleryBarMode } from "@/new/photos/components/Gallery/BarImpl";import {GalleryItemsHeaderAdapter,GalleryItemsSummary,@@ -60,7 +61,6 @@ import type { ButtonProps, IconButtonProps } from "@mui/material";import { Box, Button, IconButton, Typography, styled } from "@mui/material";import AuthenticateUserModal from "components/AuthenticateUserModal";import { Collections } from "components/Collections";-import type { GalleryBarMode } from "components/Collections/CollectionListBar";import CollectionNamer, {CollectionNamerAttributes,} from "components/Collections/CollectionNamer";diff --git a/web/apps/photos/src/components/Collections/CollectionListBar.tsx b/web/packages/new/photos/components/Gallery/BarImpl.tsxsimilarity index 98%rename from web/apps/photos/src/components/Collections/CollectionListBar.tsxrename to web/packages/new/photos/components/Gallery/BarImpl.tsxindex d806794655..5f4e0bda11 100644--- a/web/apps/photos/src/components/Collections/CollectionListBar.tsx+++ b/web/packages/new/photos/components/Gallery/BarImpl.tsx@@ -33,14 +33,18 @@ import React, {useState,} from "react";import AutoSizer from "react-virtualized-auto-sizer";-import { FixedSizeList, ListChildComponentProps, areEqual } from "react-window";+import {+ FixedSizeList,+ type ListChildComponentProps,+ areEqual,+} from "react-window";/*** Specifies what the bar is displaying currently.*/export type GalleryBarMode = "albums" | "hidden-albums" | "people";-export interface CollectionListBarProps {+export interface GalleryBarImplProps {/*** What are we displaying currently.*/@@ -88,8 +92,7 @@ export interface CollectionListBarProps {onSelectPerson: (person: Person) => void;}-// TODO-Cluster Rename me to GalleryBarImpl-export const CollectionListBar: React.FC<CollectionListBarProps> = ({+export const GalleryBarImpl: React.FC<GalleryBarImplProps> = ({mode,setMode,collectionSummaries,@@ -287,7 +290,7 @@ export const Row2 = styled(Box)``;const ModeIndicator: React.FC<- Pick<CollectionListBarProps, "mode" | "setMode">+ Pick<GalleryBarImplProps, "mode" | "setMode">> = ({ mode }) => (<Stack direction="row" sx={{ gap: "10px" }}><Typography color={mode == "people" ? "text.muted" : "text.base"}>