π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Move
Manav Rathi21ae07567452
diff --git a/web/apps/photos/src/components/Collections/AllCollections/header.tsx b/web/apps/photos/src/components/Collections/AllCollections/header.tsxindex dc7caa5f91..adb902e5ca 100644--- a/web/apps/photos/src/components/Collections/AllCollections/header.tsx+++ b/web/apps/photos/src/components/Collections/AllCollections/header.tsx@@ -5,7 +5,7 @@ import {} from "@ente/shared/components/Container";import Close from "@mui/icons-material/Close";import { Box, DialogTitle, Stack, Typography } from "@mui/material";-import CollectionListSortOptions from "components/Collections/CollectionListSortBy";+import { CollectionListSortOptions } from "components/Collections/CollectionListSortOptions";import { t } from "i18next";export default function AllCollectionsHeader({diff --git a/web/apps/photos/src/components/Collections/AllCollections/index.tsx b/web/apps/photos/src/components/Collections/AllCollections/index.tsxindex 5913896c10..76ea032f45 100644--- a/web/apps/photos/src/components/Collections/AllCollections/index.tsx+++ b/web/apps/photos/src/components/Collections/AllCollections/index.tsx@@ -1,10 +1,10 @@import type { CollectionSummary } from "@/new/photos/types/collection";+import { CollectionListSortBy } from "@/new/photos/types/collection";import { Divider, useMediaQuery } from "@mui/material";import {AllCollectionDialog,Transition,} from "components/Collections/AllCollections/dialog";-import { CollectionListSortBy } from "utils/collection";import AllCollectionContent from "./content";import AllCollectionsHeader from "./header";diff --git a/web/apps/photos/src/components/Collections/CollectionListBar.tsx b/web/apps/photos/src/components/Collections/CollectionListBar.tsxindex 339532ffd4..866b58e2ae 100644--- a/web/apps/photos/src/components/Collections/CollectionListBar.tsx+++ b/web/apps/photos/src/components/Collections/CollectionListBar.tsx@@ -5,6 +5,7 @@ import type {CollectionSummary,CollectionSummaryType,} from "@/new/photos/types/collection";+import { CollectionListSortBy } from "@/new/photos/types/collection";import { ensure } from "@/utils/ensure";import { IconButtonWithBG, Overlay } from "@ente/shared/components/Container";import ArchiveIcon from "@mui/icons-material/Archive";@@ -31,7 +32,6 @@ import React, {} from "react";import AutoSizer from "react-virtualized-auto-sizer";import { FixedSizeList, ListChildComponentProps, areEqual } from "react-window";-import { CollectionListSortBy } from "utils/collection";import type { GalleryBarMode } from ".";import { CollectionListSortOptions } from "./CollectionListSortOptions";diff --git a/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx b/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsxindex 95a22f98bf..46b0644e13 100644--- a/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx+++ b/web/apps/photos/src/components/Collections/CollectionListSortOptions.tsx@@ -4,7 +4,7 @@ import TickIcon from "@mui/icons-material/Done";import SortIcon from "@mui/icons-material/Sort";import SvgIcon from "@mui/material/SvgIcon";import { t } from "i18next";-import { CollectionListSortBy } from "utils/collection";+import { CollectionListSortBy } from "@/new/photos/types/collection";interface CollectionListSortOptionsProps {setSortBy: (sortBy: CollectionListSortBy) => void;diff --git a/web/apps/photos/src/components/Collections/index.tsx b/web/apps/photos/src/components/Collections/index.tsxindex a27a9ef846..a5d7fde425 100644--- a/web/apps/photos/src/components/Collections/index.tsx+++ b/web/apps/photos/src/components/Collections/index.tsx@@ -1,6 +1,7 @@import type { Collection } from "@/media/collection";import type { Person } from "@/new/photos/services/ml/cgroups";import type { CollectionSummaries } from "@/new/photos/types/collection";+import { CollectionListSortBy } from "@/new/photos/types/collection";import { useLocalState } from "@ente/shared/hooks/useLocalState";import { LS_KEYS } from "@ente/shared/storage/localStorage";import AllCollections from "components/Collections/AllCollections";@@ -14,7 +15,6 @@ import { sortCollectionSummaries } from "services/collectionService";import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";import {ALL_SECTION,- CollectionListSortBy,hasNonSystemCollections,isSystemCollection,shouldBeShownOnCollectionBar,diff --git a/web/apps/photos/src/services/collectionService.ts b/web/apps/photos/src/services/collectionService.tsindex c99184d7de..722ab9ac16 100644--- a/web/apps/photos/src/services/collectionService.ts+++ b/web/apps/photos/src/services/collectionService.ts@@ -45,7 +45,6 @@ import {ALL_SECTION,ARCHIVE_SECTION,COLLECTION_SORT_ORDER,- CollectionListSortBy,DUMMY_UNCATEGORIZED_COLLECTION,HIDDEN_ITEMS_SECTION,TRASH_SECTION,@@ -61,6 +60,7 @@ import {isSharedOnlyViaLink,isValidMoveTarget,} from "utils/collection";+import { CollectionListSortBy } from "@/new/photos/types/collection";import {getUniqueFiles,groupFilesBasedOnCollectionID,diff --git a/web/apps/photos/src/utils/collection.ts b/web/apps/photos/src/utils/collection.tsindex 32940c6612..1809b074e5 100644--- a/web/apps/photos/src/utils/collection.ts+++ b/web/apps/photos/src/utils/collection.ts@@ -45,16 +45,6 @@ export const DUMMY_UNCATEGORIZED_COLLECTION = -3;export const HIDDEN_ITEMS_SECTION = -4;export const ALL_SECTION = 0;-/**- * Sort orders for use when we're showing lists of collections (e.g. in the- * collection bar).- */-export enum CollectionListSortBy {- Name,- CreationTimeAscending,- UpdationTimeDescending,-}-export const COLLECTION_SORT_ORDER = new Map<CollectionSummaryType, number>([["all", 0],["hiddenItems", 0],diff --git a/web/packages/new/photos/types/collection.ts b/web/packages/new/photos/types/collection.tsindex 0a6f369922..99622fc9b8 100644--- a/web/packages/new/photos/types/collection.ts+++ b/web/packages/new/photos/types/collection.ts@@ -34,3 +34,13 @@ export interface CollectionSummary {}export type CollectionSummaries = Map<number, CollectionSummary>;++/**+ * Sort orders for use when we're showing lists of collections (e.g. in the+ * collection bar).+ */+export enum CollectionListSortBy {+ Name,+ CreationTimeAscending,+ UpdationTimeDescending,+}