This commit is contained in:
Manav Rathi
2024-09-11 17:17:06 +05:30
parent 87e31965e5
commit a4a2623074
13 changed files with 50 additions and 43 deletions

View File

@@ -6,9 +6,13 @@ 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 { Collection, CollectionSummary } from "types/collection";
import {
Collection,
CollectionSummary,
CollectionSummaryType,
} from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
import { CollectionSummaryType, shouldShowOptions } from "utils/collection";
import { shouldShowOptions } from "utils/collection";
import { CollectionInfo } from "./CollectionInfo";
import { CollectionInfoBarWrapper } from "./styledComponents";

View File

@@ -5,8 +5,7 @@ import PeopleIcon from "@mui/icons-material/People";
import PushPin from "@mui/icons-material/PushPin";
import { Box, Typography, styled } from "@mui/material";
import Tooltip from "@mui/material/Tooltip";
import { CollectionSummary } from "types/collection";
import { CollectionSummaryType } from "utils/collection";
import { CollectionSummary, CollectionSummaryType } from "types/collection";
import CollectionCard from "../CollectionCard";
import {
ActiveIndicator,

View File

@@ -1,7 +1,7 @@
import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";
import { IconButton, Tooltip } from "@mui/material";
import { t } from "i18next";
import { CollectionSummaryType } from "utils/collection";
import { CollectionSummaryType } from "types/collection";
import { CollectionActions } from "..";
interface Iprops {
handleCollectionAction: (

View File

@@ -1,7 +1,7 @@
import PeopleIcon from "@mui/icons-material/People";
import { IconButton, Tooltip } from "@mui/material";
import { t } from "i18next";
import { CollectionSummaryType } from "utils/collection";
import { CollectionSummaryType } from "types/collection";
import { CollectionActions } from "..";
interface Iprops {

View File

@@ -1,7 +1,7 @@
import { FlexWrapper } from "@ente/shared/components/Container";
import EnteSpinner from "@ente/shared/components/EnteSpinner";
import { CollectionSummaryType } from "types/collection";
import {
CollectionSummaryType,
showDownloadQuickOption,
showEmptyTrashQuickOption,
showShareQuickOption,

View File

@@ -12,14 +12,13 @@ import { useContext, useRef, useState } from "react";
import { Trans } from "react-i18next";
import * as CollectionAPI from "services/collectionService";
import * as TrashService from "services/trashService";
import { Collection } from "types/collection";
import { Collection, CollectionSummaryType } from "types/collection";
import { SetFilesDownloadProgressAttributesCreator } from "types/gallery";
import {
ALL_SECTION,
changeCollectionOrder,
changeCollectionSortOrder,
changeCollectionVisibility,
CollectionSummaryType,
downloadCollectionHelper,
downloadDefaultHiddenCollectionHelper,
HIDDEN_ITEMS_SECTION,

View File

@@ -9,11 +9,11 @@ import {
Collection,
CollectionSummaries,
CollectionSummary,
CollectionSummaryType,
} from "types/collection";
import { CollectionSelectorIntent } from "types/gallery";
import {
COLLECTION_SORT_ORDER,
CollectionSummaryType,
DUMMY_UNCATEGORIZED_COLLECTION,
isAddToAllowedCollection,
isMoveToAllowedCollection,

View File

@@ -2,8 +2,11 @@ import { EnteDrawer } from "@/base/components/EnteDrawer";
import { Titlebar } from "@/base/components/Titlebar";
import { DialogProps, Stack } from "@mui/material";
import { t } from "i18next";
import { Collection, CollectionSummary } from "types/collection";
import { CollectionSummaryType } from "utils/collection";
import {
Collection,
CollectionSummary,
CollectionSummaryType,
} from "types/collection";
import EmailShare from "./emailShare";
import PublicShare from "./publicShare";
import SharingDetails from "./sharingDetails";

View File

@@ -12,8 +12,7 @@ import Avatar from "components/pages/gallery/Avatar";
import { t } from "i18next";
import { GalleryContext } from "pages/gallery";
import { useContext } from "react";
import { COLLECTION_ROLE } from "types/collection";
import { CollectionSummaryType } from "utils/collection";
import { COLLECTION_ROLE, CollectionSummaryType } from "types/collection";
export default function SharingDetails({ collection, type }) {
const galleryContext = useContext(GalleryContext);

View File

@@ -105,7 +105,11 @@ import { sync, triggerPreFileInfoSync } from "services/sync";
import { syncTrash } from "services/trashService";
import uploadManager from "services/upload/uploadManager";
import { isTokenValid } from "services/userService";
import { Collection, CollectionSummaries } from "types/collection";
import {
Collection,
CollectionSummaries,
CollectionSummaryType,
} from "types/collection";
import {
GalleryContextType,
SelectedState,
@@ -118,7 +122,6 @@ import {
ALL_SECTION,
ARCHIVE_SECTION,
COLLECTION_OPS_TYPE,
CollectionSummaryType,
HIDDEN_ITEMS_SECTION,
TRASH_SECTION,
constructCollectionNameMap,

View File

@@ -28,7 +28,9 @@ import {
CollectionShareeMagicMetadata,
CollectionSummaries,
CollectionSummary,
CollectionSummaryType,
CollectionToFileMap,
CollectionType,
CreatePublicAccessTokenRequest,
EncryptedCollection,
EncryptedFileKey,
@@ -43,8 +45,6 @@ import {
ARCHIVE_SECTION,
COLLECTION_LIST_SORT_BY,
COLLECTION_SORT_ORDER,
CollectionSummaryType,
CollectionType,
DUMMY_UNCATEGORIZED_COLLECTION,
HIDDEN_ITEMS_SECTION,
TRASH_SECTION,

View File

@@ -5,7 +5,31 @@ import {
MagicMetadataCore,
SUB_TYPE,
} from "@/new/photos/types/magicMetadata";
import { CollectionSummaryType, CollectionType } from "utils/collection";
export enum CollectionType {
folder = "folder",
favorites = "favorites",
album = "album",
uncategorized = "uncategorized",
}
export enum CollectionSummaryType {
folder = "folder",
favorites = "favorites",
album = "album",
archive = "archive",
trash = "trash",
uncategorized = "uncategorized",
all = "all",
outgoingShare = "outgoingShare",
incomingShareViewer = "incomingShareViewer",
incomingShareCollaborator = "incomingShareCollaborator",
sharedOnlyViaLink = "sharedOnlyViaLink",
archived = "archived",
defaultHidden = "defaultHidden",
hiddenItems = "hiddenItems",
pinned = "pinned",
}
export enum COLLECTION_ROLE {
VIEWER = "VIEWER",

View File

@@ -42,30 +42,6 @@ export const DUMMY_UNCATEGORIZED_COLLECTION = -3;
export const HIDDEN_ITEMS_SECTION = -4;
export const ALL_SECTION = 0;
export enum CollectionType {
folder = "folder",
favorites = "favorites",
album = "album",
uncategorized = "uncategorized",
}
export enum CollectionSummaryType {
folder = "folder",
favorites = "favorites",
album = "album",
archive = "archive",
trash = "trash",
uncategorized = "uncategorized",
all = "all",
outgoingShare = "outgoingShare",
incomingShareViewer = "incomingShareViewer",
incomingShareCollaborator = "incomingShareCollaborator",
sharedOnlyViaLink = "sharedOnlyViaLink",
archived = "archived",
defaultHidden = "defaultHidden",
hiddenItems = "hiddenItems",
pinned = "pinned",
}
export enum COLLECTION_LIST_SORT_BY {
NAME,
CREATION_TIME_ASCENDING,