π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Rearrange
Manav Rathi01d48b0fccf7
diff --git a/web/apps/photos/src/components/Collections/CollectionListBar.tsx b/web/apps/photos/src/components/Collections/CollectionListBar.tsxindex 09b55e0dfa..d806794655 100644--- a/web/apps/photos/src/components/Collections/CollectionListBar.tsx+++ b/web/apps/photos/src/components/Collections/CollectionListBar.tsx@@ -2,6 +2,10 @@ import { useIsMobileWidth } from "@/base/hooks";import { CollectionsSortOptions } from "@/new/photos/components/CollectionsSortOptions";import { BarItemTile, ItemCard } from "@/new/photos/components/ItemCards";import { FilledIconButton } from "@/new/photos/components/mui-custom";+import {+ IMAGE_CONTAINER_MAX_WIDTH,+ MIN_COLUMNS,+} from "@/new/photos/components/PhotoList";import type { Person } from "@/new/photos/services/ml/cgroups";import type {CollectionSummary,@@ -19,10 +23,6 @@ import PeopleIcon from "@mui/icons-material/People";import PushPin from "@mui/icons-material/PushPin";import { Box, IconButton, Stack, Typography, styled } from "@mui/material";import Tooltip from "@mui/material/Tooltip";-import {- IMAGE_CONTAINER_MAX_WIDTH,- MIN_COLUMNS,-} from "components/PhotoList/constants";import { t } from "i18next";import React, {memo,diff --git a/web/apps/photos/src/components/PhotoList/constants.ts b/web/apps/photos/src/components/PhotoList/constants.tsdeleted file mode 100644index 6f88be0d89..0000000000--- a/web/apps/photos/src/components/PhotoList/constants.ts+++ /dev/null@@ -1,8 +0,0 @@-export const GAP_BTW_TILES = 4;-export const DATE_CONTAINER_HEIGHT = 48;-export const SIZE_AND_COUNT_CONTAINER_HEIGHT = 72;-export const IMAGE_CONTAINER_MAX_HEIGHT = 180;-export const IMAGE_CONTAINER_MAX_WIDTH = 180;-export const MIN_COLUMNS = 4;-export const SPACE_BTW_DATES = 44;-export const SPACE_BTW_DATES_TO_IMAGE_CONTAINER_WIDTH_RATIO = 0.244;diff --git a/web/apps/photos/src/components/PhotoList/dedupe.tsx b/web/apps/photos/src/components/PhotoList/dedupe.tsxindex 25b8f1e8f4..ea46c46f4a 100644--- a/web/apps/photos/src/components/PhotoList/dedupe.tsx+++ b/web/apps/photos/src/components/PhotoList/dedupe.tsx@@ -1,3 +1,9 @@+import {+ GAP_BTW_TILES,+ IMAGE_CONTAINER_MAX_HEIGHT,+ IMAGE_CONTAINER_MAX_WIDTH,+ MIN_COLUMNS,+} from "@/new/photos/components/PhotoList";import { EnteFile } from "@/new/photos/types/file";import { formattedByteSize } from "@/new/photos/utils/units";import { FlexWrapper } from "@ente/shared/components/Container";@@ -11,15 +17,12 @@ import {areEqual,} from "react-window";import { Duplicate } from "services/deduplicationService";+import {DATE_CONTAINER_HEIGHT,- GAP_BTW_TILES,- IMAGE_CONTAINER_MAX_HEIGHT,- IMAGE_CONTAINER_MAX_WIDTH,- MIN_COLUMNS,SIZE_AND_COUNT_CONTAINER_HEIGHT,SPACE_BTW_DATES,-} from "./constants";+} from "components/PhotoList";export enum ITEM_TYPE {TIME = "TIME",diff --git a/web/apps/photos/src/components/PhotoList/index.tsx b/web/apps/photos/src/components/PhotoList/index.tsxindex 9c9b077f61..a05996a60a 100644--- a/web/apps/photos/src/components/PhotoList/index.tsx+++ b/web/apps/photos/src/components/PhotoList/index.tsx@@ -16,20 +16,22 @@ import {import { handleSelectCreator } from "utils/photoFrame";import { PublicCollectionGalleryContext } from "utils/publicCollectionGallery";-const FOOTER_HEIGHT = 90;-const ALBUM_FOOTER_HEIGHT = 75;-const ALBUM_FOOTER_HEIGHT_WITH_REFERRAL = 113;-import {- DATE_CONTAINER_HEIGHT,GAP_BTW_TILES,IMAGE_CONTAINER_MAX_HEIGHT,IMAGE_CONTAINER_MAX_WIDTH,MIN_COLUMNS,- SIZE_AND_COUNT_CONTAINER_HEIGHT,- SPACE_BTW_DATES,- SPACE_BTW_DATES_TO_IMAGE_CONTAINER_WIDTH_RATIO,-} from "./constants";+} from "@/new/photos/components/PhotoList";++export const DATE_CONTAINER_HEIGHT = 48;+export const SIZE_AND_COUNT_CONTAINER_HEIGHT = 72;+export const SPACE_BTW_DATES = 44;++const SPACE_BTW_DATES_TO_IMAGE_CONTAINER_WIDTH_RATIO = 0.244;++const FOOTER_HEIGHT = 90;+const ALBUM_FOOTER_HEIGHT = 75;+const ALBUM_FOOTER_HEIGHT_WITH_REFERRAL = 113;export enum ITEM_TYPE {TIME = "TIME",diff --git a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsxindex f44104d883..114351788f 100644--- a/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx+++ b/web/apps/photos/src/components/pages/gallery/PreviewCard.tsx@@ -1,5 +1,9 @@import log from "@/base/log";import { FileType } from "@/media/file-type";+import {+ GAP_BTW_TILES,+ IMAGE_CONTAINER_MAX_WIDTH,+} from "@/new/photos/components/PhotoList";import {LoadingThumbnail,StaticThumbnail,@@ -12,10 +16,6 @@ import useLongPress from "@ente/shared/hooks/useLongPress";import AlbumOutlined from "@mui/icons-material/AlbumOutlined";import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";import { Tooltip, styled } from "@mui/material";-import {- GAP_BTW_TILES,- IMAGE_CONTAINER_MAX_WIDTH,-} from "components/PhotoList/constants";import i18n from "i18next";import { DeduplicateContext } from "pages/deduplicate";import { GalleryContext } from "pages/gallery";diff --git a/web/packages/new/photos/components/PhotoList.ts b/web/packages/new/photos/components/PhotoList.tsnew file mode 100644index 0000000000..0d8c724b51--- /dev/null+++ b/web/packages/new/photos/components/PhotoList.ts@@ -0,0 +1,6 @@+export const GAP_BTW_TILES = 4;+export const IMAGE_CONTAINER_MAX_HEIGHT = 180;+export const IMAGE_CONTAINER_MAX_WIDTH = 180;+export const MIN_COLUMNS = 4;++// TODO: Move the PhotoList component here.