Skip to content

armgit / ente

Public Imported from GitHub
0

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

Move

Manav Rathib39e727e0a98
diff --git a/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx b/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
index 0e2e30f3ab..9f23770ec5 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/collectionCard.tsx
@@ -1,6 +1,6 @@
+import type { CollectionSummary } from "@/new/photos/types/collection";
import { Typography } from "@mui/material";
import { t } from "i18next";
-import { CollectionSummary } from "types/collection";
import CollectionCard from "../CollectionCard";
import { AllCollectionTile, AllCollectionTileText } from "../styledComponents";
diff --git a/web/apps/photos/src/components/Collections/AllCollections/content.tsx b/web/apps/photos/src/components/Collections/AllCollections/content.tsx
index 57d9aa7962..e2fdd8355b 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/content.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/content.tsx
@@ -1,3 +1,4 @@
+import type { CollectionSummary } from "@/new/photos/types/collection";
import { FlexWrapper } from "@ente/shared/components/Container";
import useWindowSize from "@ente/shared/hooks/useWindowSize";
import { DialogContent } from "@mui/material";
@@ -8,7 +9,6 @@ import {
ListChildComponentProps,
areEqual,
} from "react-window";
-import { CollectionSummary } from "types/collection";
import AllCollectionCard from "./collectionCard";
import { AllCollectionMobileBreakpoint } from "./dialog";
diff --git a/web/apps/photos/src/components/Collections/AllCollections/index.tsx b/web/apps/photos/src/components/Collections/AllCollections/index.tsx
index 4fc96e9ecd..362d65c138 100644
--- a/web/apps/photos/src/components/Collections/AllCollections/index.tsx
+++ b/web/apps/photos/src/components/Collections/AllCollections/index.tsx
@@ -1,9 +1,9 @@
+import type { CollectionSummary } from "@/new/photos/types/collection";
import { Divider, useMediaQuery } from "@mui/material";
import {
AllCollectionDialog,
Transition,
} from "components/Collections/AllCollections/dialog";
-import { CollectionSummary } from "types/collection";
import { COLLECTION_LIST_SORT_BY } from "utils/collection";
import AllCollectionContent from "./content";
import AllCollectionsHeader from "./header";
diff --git a/web/apps/photos/src/components/Collections/CollectionInfoWithOptions.tsx b/web/apps/photos/src/components/Collections/CollectionInfoWithOptions.tsx
index e64cf3d51f..184348f470 100644
--- a/web/apps/photos/src/components/Collections/CollectionInfoWithOptions.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionInfoWithOptions.tsx
@@ -3,6 +3,10 @@ import {
GalleryItemsHeaderAdapter,
GalleryItemsSummary,
} from "@/new/photos/components/Gallery/ListHeader";
+import type {
+ CollectionSummary,
+ CollectionSummaryType,
+} from "@/new/photos/types/collection";
import { SpaceBetweenFlex } from "@ente/shared/components/Container";
import ArchiveOutlined from "@mui/icons-material/ArchiveOutlined";
import Favorite from "@mui/icons-material/FavoriteRounded";
@@ -11,7 +15,6 @@ import PeopleIcon from "@mui/icons-material/People";
import { SetCollectionNamerAttributes } from "components/Collections/CollectionNamer";
import CollectionOptions from "components/Collections/CollectionOptions";
import type { Dispatch, SetStateAction } from "react";
-import { CollectionSummary, CollectionSummaryType } from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
interface Iprops {
diff --git a/web/apps/photos/src/components/Collections/CollectionListBar.tsx b/web/apps/photos/src/components/Collections/CollectionListBar.tsx
index cca057736d..e499c6c14d 100644
--- a/web/apps/photos/src/components/Collections/CollectionListBar.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionListBar.tsx
@@ -1,5 +1,6 @@
import { useIsMobileWidth } from "@/base/hooks";
import type { Person } from "@/new/photos/services/ml/cgroups";
+import type { CollectionSummary } from "@/new/photos/types/collection";
import {
IconButtonWithBG,
Overlay,
@@ -25,7 +26,6 @@ import memoize from "memoize-one";
import React, { useEffect, useRef, useState } from "react";
import AutoSizer from "react-virtualized-auto-sizer";
import { FixedSizeList, ListChildComponentProps, areEqual } from "react-window";
-import { CollectionSummary } from "types/collection";
import { ALL_SECTION, COLLECTION_LIST_SORT_BY } from "utils/collection";
import type { GalleryBarMode } from ".";
import CollectionCard from "./CollectionCard";
diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx
index 020443a50b..3dd405fc4b 100644
--- a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx
@@ -1,6 +1,7 @@
import log from "@/base/log";
import type { Collection } from "@/media/collection";
import { ItemVisibility } from "@/media/file-metadata";
+import type { CollectionSummaryType } from "@/new/photos/types/collection";
import { FlexWrapper, HorizontalFlex } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
import OverflowMenu from "@ente/shared/components/OverflowMenu/menu";
@@ -17,7 +18,6 @@ import { useContext, useRef, useState } from "react";
import { Trans } from "react-i18next";
import * as CollectionAPI from "services/collectionService";
import * as TrashService from "services/trashService";
-import { CollectionSummaryType } from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
import {
ALL_SECTION,
diff --git a/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx b/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
index e591227745..0642e49df9 100644
--- a/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionSelector/CollectionCard.tsx
@@ -1,5 +1,5 @@
+import type { CollectionSummary } from "@/new/photos/types/collection";
import { Typography } from "@mui/material";
-import { CollectionSummary } from "types/collection";
import CollectionCard from "../CollectionCard";
import { AllCollectionTile, AllCollectionTileText } from "../styledComponents";
diff --git a/web/apps/photos/src/components/Collections/CollectionSelector/index.tsx b/web/apps/photos/src/components/Collections/CollectionSelector/index.tsx
index 878dd0d38d..3954110e34 100644
--- a/web/apps/photos/src/components/Collections/CollectionSelector/index.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionSelector/index.tsx
@@ -1,4 +1,8 @@
import type { Collection } from "@/media/collection";
+import type {
+ CollectionSummaries,
+ CollectionSummary,
+} from "@/new/photos/types/collection";
import { FlexWrapper } from "@ente/shared/components/Container";
import DialogTitleWithCloseButton from "@ente/shared/components/DialogBox/TitleWithCloseButton";
import { DialogContent, useMediaQuery } from "@mui/material";
@@ -6,7 +10,6 @@ import { AllCollectionDialog } from "components/Collections/AllCollections/dialo
import { t } from "i18next";
import { useEffect, useState } from "react";
import { createUnCategorizedCollection } from "services/collectionService";
-import { CollectionSummaries, CollectionSummary } from "types/collection";
import { CollectionSelectorIntent } from "types/gallery";
import {
COLLECTION_SORT_ORDER,
diff --git a/web/apps/photos/src/components/Collections/CollectionShare/index.tsx b/web/apps/photos/src/components/Collections/CollectionShare/index.tsx
index 8384a067b6..9aac11e308 100644
--- a/web/apps/photos/src/components/Collections/CollectionShare/index.tsx
+++ b/web/apps/photos/src/components/Collections/CollectionShare/index.tsx
@@ -1,9 +1,9 @@
import { EnteDrawer } from "@/base/components/EnteDrawer";
import { Titlebar } from "@/base/components/Titlebar";
import type { Collection } from "@/media/collection";
+import type { CollectionSummary } from "@/new/photos/types/collection";
import { DialogProps, Stack } from "@mui/material";
import { t } from "i18next";
-import { CollectionSummary } from "types/collection";
import EmailShare from "./emailShare";
import PublicShare from "./publicShare";
import SharingDetails from "./sharingDetails";
diff --git a/web/apps/photos/src/components/Collections/index.tsx b/web/apps/photos/src/components/Collections/index.tsx
index 3bb3e298c6..9c656cf302 100644
--- a/web/apps/photos/src/components/Collections/index.tsx
+++ b/web/apps/photos/src/components/Collections/index.tsx
@@ -1,5 +1,6 @@
import type { Collection } from "@/media/collection";
import type { Person } from "@/new/photos/services/ml/cgroups";
+import type { CollectionSummaries } 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";
@@ -10,7 +11,6 @@ import CollectionShare from "components/Collections/CollectionShare";
import { ITEM_TYPE, TimeStampListItem } from "components/PhotoList";
import { useCallback, useEffect, useMemo, useState } from "react";
import { sortCollectionSummaries } from "services/collectionService";
-import { CollectionSummaries } from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
import {
ALL_SECTION,
diff --git a/web/apps/photos/src/components/Sidebar/index.tsx b/web/apps/photos/src/components/Sidebar/index.tsx
index 8827dd22e9..6a75a9e616 100644
--- a/web/apps/photos/src/components/Sidebar/index.tsx
+++ b/web/apps/photos/src/components/Sidebar/index.tsx
@@ -57,7 +57,6 @@ import billingService from "services/billingService";
import { getUncategorizedCollection } from "services/collectionService";
import exportService from "services/export";
import { getUserDetailsV2 } from "services/userService";
-import { CollectionSummaries } from "types/collection";
import { UserDetails } from "types/user";
import {
hasAddOnBonus,
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index 6613452e5e..262edf6154 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -25,6 +25,7 @@ import {
setSearchCollectionsAndFiles,
} from "@/new/photos/services/search";
import type { SearchOption } from "@/new/photos/services/search/types";
+import type { CollectionSummaries } from "@/new/photos/types/collection";
import { EnteFile } from "@/new/photos/types/file";
import { mergeMetadata } from "@/new/photos/utils/file";
import {
@@ -113,7 +114,6 @@ import { preFileInfoSync, sync } from "services/sync";
import { syncTrash } from "services/trashService";
import uploadManager from "services/upload/uploadManager";
import { isTokenValid } from "services/userService";
-import { CollectionSummaries } from "types/collection";
import {
GalleryContextType,
SelectedState,
diff --git a/web/apps/photos/src/services/collectionService.ts b/web/apps/photos/src/services/collectionService.ts
index 00f98ca629..c479616842 100644
--- a/web/apps/photos/src/services/collectionService.ts
+++ b/web/apps/photos/src/services/collectionService.ts
@@ -20,6 +20,11 @@ import {
} from "@/media/collection";
import { ItemVisibility } from "@/media/file-metadata";
import { getLocalFiles } from "@/new/photos/services/files";
+import type {
+ CollectionSummaries,
+ CollectionSummary,
+ CollectionSummaryType,
+} from "@/new/photos/types/collection";
import { EnteFile } from "@/new/photos/types/file";
import {
EncryptedMagicMetadata,
@@ -35,11 +40,6 @@ import { getToken } from "@ente/shared/storage/localStorage/helpers";
import { getActualKey } from "@ente/shared/user";
import type { User } from "@ente/shared/user/types";
import { t } from "i18next";
-import {
- CollectionSummaries,
- CollectionSummary,
- CollectionSummaryType,
-} from "types/collection";
import { FamilyData } from "types/user";
import {
ALL_SECTION,
diff --git a/web/apps/photos/src/utils/collection.ts b/web/apps/photos/src/utils/collection.ts
index 2b000d6f76..9f18df53f8 100644
--- a/web/apps/photos/src/utils/collection.ts
+++ b/web/apps/photos/src/utils/collection.ts
@@ -9,6 +9,10 @@ import {
} from "@/media/collection";
import { ItemVisibility } from "@/media/file-metadata";
import { getAllLocalFiles, getLocalFiles } from "@/new/photos/services/files";
+import type {
+ CollectionSummaries,
+ CollectionSummaryType,
+} from "@/new/photos/types/collection";
import { EnteFile } from "@/new/photos/types/file";
import { SUB_TYPE } from "@/new/photos/types/magicMetadata";
import { safeDirectoryName } from "@/new/photos/utils/native-fs";
@@ -31,7 +35,6 @@ import {
updatePublicCollectionMagicMetadata,
updateSharedCollectionMagicMetadata,
} from "services/collectionService";
-import { CollectionSummaries, CollectionSummaryType } from "types/collection";
import { SetFilesDownloadProgressAttributes } from "types/gallery";
import { downloadFilesWithProgress } from "utils/file";
import { isArchivedCollection, updateMagicMetadata } from "utils/magicMetadata";
diff --git a/web/apps/photos/src/types/collection.ts b/web/packages/new/photos/types/collection.ts
similarity index 100%
rename from web/apps/photos/src/types/collection.ts
rename to web/packages/new/photos/types/collection.ts