π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
feat(Icons):updated-to-new-design
Aswin Asok25b2733d60ef
diff --git a/web/apps/photos/src/components/Sidebar.tsx b/web/apps/photos/src/components/Sidebar.tsxindex 58f0b698d2..4a857a320d 100644--- a/web/apps/photos/src/components/Sidebar.tsx+++ b/web/apps/photos/src/components/Sidebar.tsx@@ -1,13 +1,15 @@-import ArchiveOutlinedIcon from "@mui/icons-material/ArchiveOutlined";-import CategoryIcon from "@mui/icons-material/Category";+import {+ Delete02Icon,+ Download05Icon,+ ViewOffSlashIcon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import ChevronRightIcon from "@mui/icons-material/ChevronRight";import CloseIcon from "@mui/icons-material/Close";-import DeleteOutlineIcon from "@mui/icons-material/DeleteOutline";import HealthAndSafetyIcon from "@mui/icons-material/HealthAndSafety";import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";import LockOutlinedIcon from "@mui/icons-material/LockOutlined";import NorthEastIcon from "@mui/icons-material/NorthEast";-import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";import {Box,Dialog,@@ -70,6 +72,7 @@ import {} from "ente-gallery/services/video";import { DeleteAccount } from "ente-new/photos/components/DeleteAccount";import { DropdownInput } from "ente-new/photos/components/DropdownInput";+import { ShapeIcon } from "ente-new/photos/components/icons/ShapeIcon";import { MLSettings } from "ente-new/photos/components/sidebar/MLSettings";import { SessionsSettings } from "ente-new/photos/components/sidebar/SessionsSettings";import { TwoFactorSettings } from "ente-new/photos/components/sidebar/TwoFactorSettings";@@ -703,6 +706,8 @@ const ShortcutSection: React.FC<ShortcutSectionProps> = ({uncategorizedCollectionSummaryID,onShowCollectionSummary,}) => {+ const shortcutIconSize = 20;+const handleOpenUncategorizedSection = () =>void onShowCollectionSummary(uncategorizedCollectionSummaryID).then(onCloseSidebar,@@ -730,19 +735,29 @@ const ShortcutSection: React.FC<ShortcutSectionProps> = ({return (<><RowButton- startIcon={<CategoryIcon />}+ startIcon={<ShapeIcon />}label={t("section_uncategorized")}caption={summaryCaption(uncategorizedCollectionSummaryID)}onClick={handleOpenUncategorizedSection}/><RowButton- startIcon={<ArchiveOutlinedIcon />}+ startIcon={+ <HugeiconsIcon+ icon={Download05Icon}+ size={shortcutIconSize}+ />+ }label={t("section_archive")}caption={summaryCaption(PseudoCollectionID.archiveItems)}onClick={handleOpenArchiveSection}/><RowButton- startIcon={<VisibilityOffIcon />}+ startIcon={+ <HugeiconsIcon+ icon={ViewOffSlashIcon}+ size={shortcutIconSize}+ />+ }label={t("section_hidden")}caption={<LockOutlinedIcon@@ -755,7 +770,12 @@ const ShortcutSection: React.FC<ShortcutSectionProps> = ({onClick={handleOpenHiddenSection}/><RowButton- startIcon={<DeleteOutlineIcon />}+ startIcon={+ <HugeiconsIcon+ icon={Delete02Icon}+ size={shortcutIconSize}+ />+ }label={t("section_trash")}caption={summaryCaption(PseudoCollectionID.trash)}onClick={handleOpenTrashSection}diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex dd06e23e59..167177098f 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -2,9 +2,10 @@// the file it depends on have been audited and their interfaces fixed)./* eslint-disable react-hooks/exhaustive-deps *//* eslint-disable @typescript-eslint/no-floating-promises */+import { Upload01Icon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import ArrowBackIcon from "@mui/icons-material/ArrowBack";import CheckCircleIcon from "@mui/icons-material/CheckCircle";-import FileUploadOutlinedIcon from "@mui/icons-material/FileUploadOutlined";import MenuIcon from "@mui/icons-material/Menu";import { IconButton, Link, Stack, Typography } from "@mui/material";import type { AddToAlbumPhase } from "components/AlbumAddedNotification";@@ -1874,7 +1875,7 @@ const UploadButton: React.FC<ButtonishProps> = ({ onClick }) => {const disabled = uploadManager.isUploadInProgress();const isSmallWidth = useIsSmallWidth();- const icon = <FileUploadOutlinedIcon />;+ const icon = <HugeiconsIcon icon={Upload01Icon} size={20} />;return (<>diff --git a/web/packages/base/components/RowButton.tsx b/web/packages/base/components/RowButton.tsxindex ef72d5af01..a66bec3e42 100644--- a/web/packages/base/components/RowButton.tsx+++ b/web/packages/base/components/RowButton.tsx@@ -234,7 +234,10 @@ export const RowButton: React.FC<RowButtonProps> = ({disabled && { color: "text.muted" },]}>- <Stack direction="row" sx={{ py: "14px", gap: "10px" }}>+ <Stack+ direction="row"+ sx={{ py: "14px", gap: "10px", alignItems: "center" }}+ >{startIcon && startIcon}<Box sx={{ px: "2px" }}>{typeof label != "string" ? (diff --git a/web/packages/new/photos/components/FileContextMenu.tsx b/web/packages/new/photos/components/FileContextMenu.tsxindex 78ee273548..8346ede58a 100644--- a/web/packages/new/photos/components/FileContextMenu.tsx+++ b/web/packages/new/photos/components/FileContextMenu.tsx@@ -1,16 +1,19 @@-import ClockIcon from "@mui/icons-material/AccessTime";-import AddIcon from "@mui/icons-material/Add";-import ArchiveIcon from "@mui/icons-material/ArchiveOutlined";-import MoveIcon from "@mui/icons-material/ArrowForward";-import DeleteIcon from "@mui/icons-material/Delete";-import DownloadIcon from "@mui/icons-material/Download";-import EditLocationAltIcon from "@mui/icons-material/EditLocationAlt";+import {+ AddSquareIcon,+ ArrowRight02Icon,+ Clock02Icon,+ Delete02Icon,+ Download01Icon,+ Download05Icon,+ Location05Icon,+ RemoveCircleIcon,+ Time04Icon,+ Unarchive03Icon,+ ViewIcon,+ ViewOffSlashIcon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon, type IconSvgElement } from "@hugeicons/react";import PersonAddIcon from "@mui/icons-material/PersonAdd";-import RemoveIcon from "@mui/icons-material/RemoveCircleOutline";-import RestoreIcon from "@mui/icons-material/Restore";-import UnArchiveIcon from "@mui/icons-material/Unarchive";-import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined";-import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined";import type { SvgIconProps } from "@mui/material";import {ListItemIcon,@@ -52,15 +55,47 @@ interface ActionConfig {isDestructive?: boolean;}+const getHugeIconSize = (fontSize: SvgIconProps["fontSize"]) =>+ fontSize === "small" ? 20 : fontSize === "large" ? 35 : 24;++const createHugeIcon = (icon: IconSvgElement): React.FC<SvgIconProps> => {+ const HugeIcon: React.FC<SvgIconProps> = ({+ fontSize,+ className,+ htmlColor,+ }) => (+ <HugeiconsIcon+ icon={icon}+ size={getHugeIconSize(fontSize)}+ className={className}+ color={htmlColor ?? "currentColor"}+ />+ );+ return HugeIcon;+};++const FixTimeIcon = createHugeIcon(Time04Icon);+const DownloadIcon = createHugeIcon(Download01Icon);+const EditLocationIcon = createHugeIcon(Location05Icon);+const ArchiveIcon = createHugeIcon(Download05Icon);+const UnArchiveIcon = createHugeIcon(Unarchive03Icon);+const HideIcon = createHugeIcon(ViewOffSlashIcon);+const UnhideIcon = createHugeIcon(ViewIcon);+const DeleteIcon = createHugeIcon(Delete02Icon);+const RestoreIcon = createHugeIcon(Clock02Icon);+const AddIcon = createHugeIcon(AddSquareIcon);+const MoveIcon = createHugeIcon(ArrowRight02Icon);+const RemoveIcon = createHugeIcon(RemoveCircleIcon);+const actionConfigs: Record<FileContextAction, ActionConfig> = {download: { label: "download", Icon: DownloadIcon },- fixTime: { label: "fix_creation_time", Icon: ClockIcon },- editLocation: { label: "edit_location", Icon: EditLocationAltIcon },+ fixTime: { label: "fix_creation_time", Icon: FixTimeIcon },+ editLocation: { label: "edit_location", Icon: EditLocationIcon },favorite: { label: "favorite", Icon: StarBorderIcon },archive: { label: "archive", Icon: ArchiveIcon },unarchive: { label: "unarchive", Icon: UnArchiveIcon },- hide: { label: "hide", Icon: VisibilityOffOutlinedIcon },- unhide: { label: "unhide", Icon: VisibilityOutlinedIcon },+ hide: { label: "hide", Icon: HideIcon },+ unhide: { label: "unhide", Icon: UnhideIcon },trash: { label: "delete", Icon: DeleteIcon, isDestructive: true },deletePermanently: {label: "delete_permanently",diff --git a/web/packages/new/photos/components/SearchBar.tsx b/web/packages/new/photos/components/SearchBar.tsxindex 78aa8631ce..2f8ddad426 100644--- a/web/packages/new/photos/components/SearchBar.tsx+++ b/web/packages/new/photos/components/SearchBar.tsx@@ -1,9 +1,10 @@+import { Search01Icon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import CalendarIcon from "@mui/icons-material/CalendarMonth";import CloseIcon from "@mui/icons-material/Close";import ImageIcon from "@mui/icons-material/Image";import LocationIcon from "@mui/icons-material/LocationOn";import CameraIcon from "@mui/icons-material/PhotoCameraOutlined";-import SearchIcon from "@mui/icons-material/Search";import SettingsIcon from "@mui/icons-material/Settings";import {Box,@@ -149,7 +150,7 @@ const MobileSearchArea: React.FC<MobileSearchAreaProps> = ({ onSearch }) => (<EnteLogo height={15} /></EnteLogoBox><IconButton onClick={onSearch}>- <SearchIcon />+ <HugeiconsIcon icon={Search01Icon} /></IconButton></Stack>);@@ -516,7 +517,7 @@ const iconForOption = (option: SearchOption | undefined) => {case "city":return <LocationIcon />;default:- return <SearchIcon />;+ return <HugeiconsIcon icon={Search01Icon} />;}};diff --git a/web/packages/new/photos/components/SelectedFileOptions.tsx b/web/packages/new/photos/components/SelectedFileOptions.tsxindex 40ccc69309..41f84e0ef0 100644--- a/web/packages/new/photos/components/SelectedFileOptions.tsx+++ b/web/packages/new/photos/components/SelectedFileOptions.tsx@@ -1,19 +1,22 @@-import ClockIcon from "@mui/icons-material/AccessTime";-import AddIcon from "@mui/icons-material/Add";-import ArchiveIcon from "@mui/icons-material/ArchiveOutlined";-import MoveIcon from "@mui/icons-material/ArrowForward";+import {+ AddSquareIcon,+ ArrowRight02Icon,+ Clock02Icon,+ Delete02Icon,+ Download01Icon,+ Download05Icon,+ Location05Icon,+ RemoveCircleIcon,+ Time04Icon,+ Unarchive03Icon,+ ViewIcon,+ ViewOffSlashIcon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import CheckCircleIcon from "@mui/icons-material/CheckCircle";import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline";import CloseIcon from "@mui/icons-material/Close";-import DeleteIcon from "@mui/icons-material/Delete";-import DownloadIcon from "@mui/icons-material/Download";-import EditLocationAltIcon from "@mui/icons-material/EditLocationAlt";import PersonAddIcon from "@mui/icons-material/PersonAdd";-import RemoveIcon from "@mui/icons-material/RemoveCircleOutline";-import RestoreIcon from "@mui/icons-material/Restore";-import UnArchiveIcon from "@mui/icons-material/Unarchive";-import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined";-import VisibilityOutlinedIcon from "@mui/icons-material/VisibilityOutlined";import { Box, Button, IconButton, Tooltip, Typography } from "@mui/material";import { SpacedRow } from "ente-base/components/containers";import type { ButtonishProps } from "ente-base/components/mui";@@ -461,7 +464,7 @@ export const SelectedFileOptions: React.FC<SelectedFileOptionsProps> = ({const DownloadButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("download")}><IconButton {...{ onClick }}>- <DownloadIcon />+ <HugeiconsIcon icon={Download01Icon} /></IconButton></Tooltip>);@@ -477,7 +480,7 @@ const FavoriteButton: React.FC<ButtonishProps> = ({ onClick }) => (const ArchiveButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("archive")}><IconButton {...{ onClick }}>- <ArchiveIcon />+ <HugeiconsIcon icon={Download05Icon} /></IconButton></Tooltip>);@@ -485,7 +488,7 @@ const ArchiveButton: React.FC<ButtonishProps> = ({ onClick }) => (const UnarchiveButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("unarchive")}><IconButton {...{ onClick }}>- <UnArchiveIcon />+ <HugeiconsIcon icon={Unarchive03Icon} /></IconButton></Tooltip>);@@ -493,7 +496,7 @@ const UnarchiveButton: React.FC<ButtonishProps> = ({ onClick }) => (const HideButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("hide")}><IconButton {...{ onClick }}>- <VisibilityOffOutlinedIcon />+ <HugeiconsIcon icon={ViewOffSlashIcon} /></IconButton></Tooltip>);@@ -501,7 +504,7 @@ const HideButton: React.FC<ButtonishProps> = ({ onClick }) => (const UnhideButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("unhide")}><IconButton {...{ onClick }}>- <VisibilityOutlinedIcon />+ <HugeiconsIcon icon={ViewIcon} /></IconButton></Tooltip>);@@ -509,7 +512,7 @@ const UnhideButton: React.FC<ButtonishProps> = ({ onClick }) => (const DeleteButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("delete")}><IconButton {...{ onClick }} sx={{ color: "critical.main" }}>- <DeleteIcon />+ <HugeiconsIcon icon={Delete02Icon} /></IconButton></Tooltip>);@@ -517,7 +520,7 @@ const DeleteButton: React.FC<ButtonishProps> = ({ onClick }) => (const RestoreButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("restore")}><IconButton {...{ onClick }}>- <RestoreIcon />+ <HugeiconsIcon icon={Clock02Icon} /></IconButton></Tooltip>);@@ -525,7 +528,7 @@ const RestoreButton: React.FC<ButtonishProps> = ({ onClick }) => (const DeletePermanentlyButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("delete_permanently")}><IconButton {...{ onClick }} sx={{ color: "critical.main" }}>- <DeleteIcon />+ <HugeiconsIcon icon={Delete02Icon} /></IconButton></Tooltip>);@@ -533,7 +536,7 @@ const DeletePermanentlyButton: React.FC<ButtonishProps> = ({ onClick }) => (const FixTimeButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("fix_creation_time")}><IconButton {...{ onClick }}>- <ClockIcon />+ <HugeiconsIcon icon={Time04Icon} /></IconButton></Tooltip>);@@ -541,7 +544,7 @@ const FixTimeButton: React.FC<ButtonishProps> = ({ onClick }) => (const EditLocationButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("edit_location")}><IconButton {...{ onClick }}>- <EditLocationAltIcon />+ <HugeiconsIcon icon={Location05Icon} /></IconButton></Tooltip>);@@ -549,7 +552,7 @@ const EditLocationButton: React.FC<ButtonishProps> = ({ onClick }) => (const AddToCollectionButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("add")}><IconButton {...{ onClick }}>- <AddIcon />+ <HugeiconsIcon icon={AddSquareIcon} /></IconButton></Tooltip>);@@ -565,7 +568,7 @@ const AddPersonButton: React.FC<ButtonishProps> = ({ onClick }) => (const MoveToCollectionButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("move")}><IconButton {...{ onClick }}>- <MoveIcon />+ <HugeiconsIcon icon={ArrowRight02Icon} /></IconButton></Tooltip>);@@ -573,7 +576,7 @@ const MoveToCollectionButton: React.FC<ButtonishProps> = ({ onClick }) => (const RemoveFromCollectionButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("remove")}><IconButton {...{ onClick }}>- <RemoveIcon />+ <HugeiconsIcon icon={RemoveCircleIcon} /></IconButton></Tooltip>);diff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsxindex de9ec1c3ff..7731d73311 100644--- a/web/packages/new/photos/components/gallery/BarImpl.tsx+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx@@ -1,9 +1,9 @@+import { Link05Icon, PinIcon } from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";import ArchiveIcon from "@mui/icons-material/Archive";import ExpandMoreIcon from "@mui/icons-material/ExpandMore";-import LinkIcon from "@mui/icons-material/Link";import NavigateNextIcon from "@mui/icons-material/NavigateNext";import PeopleIcon from "@mui/icons-material/People";-import PushPinIcon from "@mui/icons-material/PushPin";import { Box, IconButton, Stack, Typography, styled } from "@mui/material";import { Overlay } from "ente-base/components/containers";import { FilledIconButton } from "ente-base/components/mui";@@ -541,11 +541,11 @@ const CollectionBarCardIcon: React.FC<CollectionBarCardIconProps> = ({{attributes.has("userFavorites") && <StarIcon fontSize="small" />}{(attributes.has("pinned") || attributes.has("shareePinned")) && (// Need && to override the 20px set in the container.- <PushPinIcon sx={{ "&&": { fontSize: "18px" } }} />+ <HugeiconsIcon icon={PinIcon} size={18} />)}{attributes.has("shared") &&(attributes.has("sharedOnlyViaLink") ? (- <LinkIcon />+ <HugeiconsIcon icon={Link05Icon} size={20} />) : (<PeopleIcon />))}@@ -606,8 +606,10 @@ const PersonCard: React.FC<PersonCardProps> = ({{person.name && <CardText>{person.name}</CardText>}{person.isPinned && (<PersonPinnedIcon>- <PushPinIcon- sx={{ "&&": { fontSize: "18px", color: "white" } }}+ <HugeiconsIcon+ icon={PinIcon}+ size={18}+ color="white"/></PersonPinnedIcon>)}diff --git a/web/packages/new/photos/components/icons/ShapeIcon.tsx b/web/packages/new/photos/components/icons/ShapeIcon.tsxnew file mode 100644index 0000000000..c0aa4698de--- /dev/null+++ b/web/packages/new/photos/components/icons/ShapeIcon.tsx@@ -0,0 +1,29 @@+import SvgIcon, { type SvgIconProps } from "@mui/material/SvgIcon";+import React from "react";++export const ShapeIcon: React.FC<SvgIconProps> = ({ sx, ...props }) => (+ <SvgIcon {...props} viewBox="0 0 24 24" sx={[{ fontSize: 24 }, sx]}>+ <path+ d="M13.3382 10H10.6618C9.1273 10 8.36006 10 8.08543 9.49297C7.8108 8.98594 8.21743 8.32019 9.0307 6.9887L10.3689 4.79773C11.101 3.59924 11.467 3 12 3C12.533 3 12.899 3.59924 13.6311 4.79773L14.9693 6.9887C15.7826 8.32019 16.1892 8.98594 15.9146 9.49297C15.6399 10 14.8727 10 13.3382 10Z"+ fill="none"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinejoin="round"+ />+ <circle+ cx="17.5"+ cy="17.5"+ r="3.5"+ fill="none"+ stroke="currentColor"+ strokeWidth="1.5"+ />+ <path+ d="M9.66294 20.1111C10 19.6067 10 18.9045 10 17.5C10 16.0955 10 15.3933 9.66294 14.8889C9.51702 14.6705 9.32952 14.483 9.11114 14.3371C8.60669 14 7.90446 14 6.5 14C5.09554 14 4.39331 14 3.88886 14.3371C3.67048 14.483 3.48298 14.6705 3.33706 14.8889C3 15.3933 3 16.0955 3 17.5C3 18.9045 3 19.6067 3.33706 20.1111C3.48298 20.3295 3.67048 20.517 3.88886 20.6629C4.39331 21 5.09554 21 6.5 21C7.90446 21 8.60669 21 9.11114 20.6629C9.32952 20.517 9.51702 20.3295 9.66294 20.1111Z"+ fill="none"+ stroke="currentColor"+ strokeWidth="1.5"+ strokeLinejoin="round"+ />+ </SvgIcon>+);