π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Inline
Manav Rathiff32e6852ed8
diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/TrashCollectionOption.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/TrashCollectionOption.tsxdeleted file mode 100644index b7f383b87e..0000000000--- a/web/apps/photos/src/components/Collections/CollectionOptions/TrashCollectionOption.tsx+++ /dev/null@@ -1,27 +0,0 @@-import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option";--import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";-import { t } from "i18next";-import { CollectionActions } from ".";--interface Iprops {- handleCollectionAction: (- action: CollectionActions,- loader?: boolean,- ) => (...args: any[]) => Promise<void>;-}--export function TrashCollectionOption({ handleCollectionAction }: Iprops) {- return (- <OverflowMenuOption- color="critical"- startIcon={<DeleteOutlinedIcon />}- onClick={handleCollectionAction(- CollectionActions.CONFIRM_EMPTY_TRASH,- false,- )}- >- {t("EMPTY_TRASH")}- </OverflowMenuOption>- );-}diff --git a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsxindex 3dd405fc4b..d505ec7c00 100644--- a/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx+++ b/web/apps/photos/src/components/Collections/CollectionOptions/index.tsx@@ -5,6 +5,7 @@ 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";+import { OverflowMenuOption } from "@ente/shared/components/OverflowMenu/option";import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";import MoreHoriz from "@mui/icons-material/MoreHoriz";@@ -35,7 +36,6 @@ import { AlbumCollectionOption } from "./AlbumCollectionOption";import CollectionSortOrderMenu from "./CollectionSortOrderMenu";import { OnlyDownloadCollectionOption } from "./OnlyDownloadCollectionOption";import { SharedCollectionOption } from "./SharedCollectionOption";-import { TrashCollectionOption } from "./TrashCollectionOption";interface CollectionOptionsProps {setCollectionNamerAttributes: SetCollectionNamerAttributes;@@ -566,3 +566,25 @@ const ShareQuickOption: React.FC<ShareQuickOptionProps> = ({</IconButton></Tooltip>);++interface TrashCollectionOptionProps {+ handleCollectionAction: (+ action: CollectionActions,+ loader?: boolean,+ ) => (...args: any[]) => Promise<void>;+}++export const TrashCollectionOption: React.FC<TrashCollectionOptionProps> = ({+ handleCollectionAction,+}) => (+ <OverflowMenuOption+ color="critical"+ startIcon={<DeleteOutlinedIcon />}+ onClick={handleCollectionAction(+ CollectionActions.CONFIRM_EMPTY_TRASH,+ false,+ )}+ >+ {t("EMPTY_TRASH")}+ </OverflowMenuOption>+);