π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Replace heart icon with custom star icon for favorites
Anand Baburajan0cc2b1f72fae
diff --git a/web/apps/photos/src/components/Collections/CollectionHeader.tsx b/web/apps/photos/src/components/Collections/CollectionHeader.tsxindex fc1ac506c4..051b636a80 100644--- a/web/apps/photos/src/components/Collections/CollectionHeader.tsx+++ b/web/apps/photos/src/components/Collections/CollectionHeader.tsx@@ -1,8 +1,8 @@import ArchiveOutlinedIcon from "@mui/icons-material/ArchiveOutlined";import DeleteOutlinedIcon from "@mui/icons-material/DeleteOutlined";import EditIcon from "@mui/icons-material/Edit";-import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";+import { StarIcon } from "ente-new/photos/components/icons/StarIcon";import LinkIcon from "@mui/icons-material/Link";import LogoutIcon from "@mui/icons-material/Logout";import MoreHorizIcon from "@mui/icons-material/MoreHoriz";@@ -93,7 +93,7 @@ export const CollectionHeader: React.FC<CollectionHeaderProps> = (props) => {if (attributes.has("archived")) return <ArchiveOutlinedIcon />;if (attributes.has("sharedOnlyViaLink")) return <LinkIcon />;if (attributes.has("shared")) return <PeopleIcon />;- if (attributes.has("userFavorites")) return <FavoriteRoundedIcon />;+ if (attributes.has("userFavorites")) return <StarIcon fontSize="small" />;return <></>;};diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsxindex 1109107302..f0b8be7368 100644--- a/web/apps/photos/src/components/FileList.tsx+++ b/web/apps/photos/src/components/FileList.tsx@@ -1,6 +1,6 @@import AlbumOutlinedIcon from "@mui/icons-material/AlbumOutlined";-import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";import PlayCircleOutlineOutlinedIcon from "@mui/icons-material/PlayCircleOutlineOutlined";+import { StarIcon } from "ente-new/photos/components/icons/StarIcon";import { Box, Checkbox, Typography, styled } from "@mui/material";import Avatar from "components/Avatar";import type { LocalUser } from "ente-accounts/services/user";@@ -1010,7 +1010,7 @@ const FileThumbnail: React.FC<FileThumbnailProps> = ({)}{isFav && (<FavoriteOverlay>- <FavoriteRoundedIcon />+ <StarIcon fontSize="small" /></FavoriteOverlay>)}diff --git a/web/packages/gallery/components/viewer/icons.tsx b/web/packages/gallery/components/viewer/icons.tsxindex 4b604612ed..ce8bb72ea0 100644--- a/web/packages/gallery/components/viewer/icons.tsx+++ b/web/packages/gallery/components/viewer/icons.tsx@@ -24,12 +24,12 @@ const paths = {live: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-12.5c-2.49 0-4.5 2.01-4.5 4.5s2.01 4.5 4.5 4.5 4.5-2.01 4.5-4.5-2.01-4.5-4.5-4.5m0 5.5c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1" transform="translate(2, 8.7) scale(0.75)"',// "@mui/icons-material/VolumeUp"vol: '<path d="M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77" transform="translate(0, 9) scale(0.75)"',- // "@mui/icons-material/FavoriteBorderRounded"+ // Custom star icon (outline)favorite:- '<path d="M19.66 3.99c-2.64-1.8-5.9-.96-7.66 1.1-1.76-2.06-5.02-2.91-7.66-1.1-1.4.96-2.28 2.58-2.34 4.29-.14 3.88 3.3 6.99 8.55 11.76l.1.09c.76.69 1.93.69 2.69-.01l.11-.1c5.25-4.76 8.68-7.87 8.55-11.75-.06-1.7-.94-3.32-2.34-4.28M12.1 18.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05" transform="translate(0, 5.5) scale(0.95)"',- // "@mui/icons-material/FavoriteRounded"+ '<path d="M8.69381 1.56975C9.38617 0.609562 10.7995 0.609562 11.4919 1.56975L13.7114 4.64784C13.9253 4.9445 14.2255 5.16569 14.5699 5.28031L18.1427 6.46961C19.2572 6.84061 19.6939 8.20365 19.0073 9.16808L16.8062 12.2597C16.5941 12.5577 16.4794 12.9156 16.4783 13.2831L16.4669 17.0962C16.4634 18.2857 15.32 19.1281 14.2033 18.764L10.6234 17.5966C10.2784 17.4841 9.90729 17.4841 9.56228 17.5966L5.98245 18.764C4.86575 19.1281 3.72231 18.2857 3.71876 17.0962L3.70737 13.2831C3.70628 12.9156 3.5916 12.5577 3.37946 12.2597L1.17839 9.16808C0.491785 8.20365 0.928537 6.84061 2.04305 6.46961L5.61584 5.28031C5.96017 5.16569 6.26041 4.9445 6.47432 4.64784L8.69381 1.56975Z" fill="none" stroke="white" stroke-width="1.7" transform="translate(5.5, 6)"',+ // Custom star icon (filled)"favorite-fill":- '<path d="M13.35 20.13c-.76.69-1.93.69-2.69-.01l-.11-.1C5.3 15.27 1.87 12.16 2 8.28c.06-1.7.93-3.33 2.34-4.29 2.64-1.8 5.9-.96 7.66 1.1 1.76-2.06 5.02-2.91 7.66-1.1 1.41.96 2.28 2.59 2.34 4.29.14 3.88-3.3 6.99-8.55 11.76z" transform="translate(0, 5.5) scale(0.95)"',+ '<path d="M8.69381 1.56975C9.38617 0.609562 10.7995 0.609562 11.4919 1.56975L13.7114 4.64784C13.9253 4.9445 14.2255 5.16569 14.5699 5.28031L18.1427 6.46961C19.2572 6.84061 19.6939 8.20365 19.0073 9.16808L16.8062 12.2597C16.5941 12.5577 16.4794 12.9156 16.4783 13.2831L16.4669 17.0962C16.4634 18.2857 15.32 19.1281 14.2033 18.764L10.6234 17.5966C10.2784 17.4841 9.90729 17.4841 9.56228 17.5966L5.98245 18.764C4.86575 19.1281 3.72231 18.2857 3.71876 17.0962L3.70737 13.2831C3.70628 12.9156 3.5916 12.5577 3.37946 12.2597L1.17839 9.16808C0.491785 8.20365 0.928537 6.84061 2.04305 6.46961L5.61584 5.28031C5.96017 5.16569 6.26041 4.9445 6.47432 4.64784L8.69381 1.56975Z" transform="translate(5.5, 6)"',// "@mui/icons-material/FileDownloadOutlined"download:'<path d="M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z" transform="translate(0, 4)"',diff --git a/web/packages/new/photos/components/SelectedFileOptions.tsx b/web/packages/new/photos/components/SelectedFileOptions.tsxindex fb86c0b920..682a8e2e3e 100644--- a/web/packages/new/photos/components/SelectedFileOptions.tsx+++ b/web/packages/new/photos/components/SelectedFileOptions.tsx@@ -5,8 +5,8 @@ import MoveIcon from "@mui/icons-material/ArrowForward";import CloseIcon from "@mui/icons-material/Close";import DeleteIcon from "@mui/icons-material/Delete";import DownloadIcon from "@mui/icons-material/Download";-import FavoriteBorderIcon from "@mui/icons-material/FavoriteBorderRounded";import RemoveIcon from "@mui/icons-material/RemoveCircleOutline";+import { StarBorderIcon } from "ente-new/photos/components/icons/StarIcon";import RestoreIcon from "@mui/icons-material/Restore";import UnArchiveIcon from "@mui/icons-material/Unarchive";import VisibilityOffOutlinedIcon from "@mui/icons-material/VisibilityOffOutlined";@@ -350,7 +350,7 @@ const DownloadButton: React.FC<ButtonishProps> = ({ onClick }) => (const FavoriteButton: React.FC<ButtonishProps> = ({ onClick }) => (<Tooltip title={t("favorite")}><IconButton {...{ onClick }}>- <FavoriteBorderIcon />+ <StarBorderIcon fontSize="small" /></IconButton></Tooltip>);diff --git a/web/packages/new/photos/components/gallery/BarImpl.tsx b/web/packages/new/photos/components/gallery/BarImpl.tsxindex a1f0080970..4eda5ab01e 100644--- a/web/packages/new/photos/components/gallery/BarImpl.tsx+++ b/web/packages/new/photos/components/gallery/BarImpl.tsx@@ -1,7 +1,7 @@import ArchiveIcon from "@mui/icons-material/Archive";import ExpandMoreIcon from "@mui/icons-material/ExpandMore";-import FavoriteRoundedIcon from "@mui/icons-material/FavoriteRounded";import LinkIcon from "@mui/icons-material/Link";+import { StarIcon } from "ente-new/photos/components/icons/StarIcon";import NavigateNextIcon from "@mui/icons-material/NavigateNext";import PeopleIcon from "@mui/icons-material/People";import PushPinIcon from "@mui/icons-material/PushPin";@@ -538,7 +538,7 @@ const CollectionBarCardIcon: React.FC<CollectionBarCardIconProps> = ({// will be true simultaneously even in the rarest of cases (a pinned and// shared album that is also archived), and there is enough space for 3.<CollectionBarCardIcon_>- {attributes.has("userFavorites") && <FavoriteRoundedIcon />}+ {attributes.has("userFavorites") && <StarIcon fontSize="small" />}{attributes.has("pinned") && (// Need && to override the 20px set in the container.<PushPinIcon sx={{ "&&": { fontSize: "18px" } }} />diff --git a/web/packages/new/photos/components/icons/StarIcon.tsx b/web/packages/new/photos/components/icons/StarIcon.tsxnew file mode 100644index 0000000000..920405c01e--- /dev/null+++ b/web/packages/new/photos/components/icons/StarIcon.tsx@@ -0,0 +1,31 @@+import SvgIcon, { type SvgIconProps } from "@mui/material/SvgIcon";+import React from "react";++/**+ * Custom star icon (filled).+ *+ * This is the app's custom star shape used for favorites.+ */+export const StarIcon: React.FC<SvgIconProps> = (props) => (+ <SvgIcon {...props} viewBox="0 0 21 20">+ <path d="M8.69381 1.56975C9.38617 0.609562 10.7995 0.609562 11.4919 1.56975L13.7114 4.64784C13.9253 4.9445 14.2255 5.16569 14.5699 5.28031L18.1427 6.46961C19.2572 6.84061 19.6939 8.20365 19.0073 9.16808L16.8062 12.2597C16.5941 12.5577 16.4794 12.9156 16.4783 13.2831L16.4669 17.0962C16.4634 18.2857 15.32 19.1281 14.2033 18.764L10.6234 17.5966C10.2784 17.4841 9.90729 17.4841 9.56228 17.5966L5.98245 18.764C4.86575 19.1281 3.72231 18.2857 3.71876 17.0962L3.70737 13.2831C3.70628 12.9156 3.5916 12.5577 3.37946 12.2597L1.17839 9.16808C0.491785 8.20365 0.928537 6.84061 2.04305 6.46961L5.61584 5.28031C5.96017 5.16569 6.26041 4.9445 6.47432 4.64784L8.69381 1.56975Z" />+ </SvgIcon>+);++/**+ * Custom star icon (outline).+ *+ * This is the app's custom star shape used for favorites (outline variant).+ */+export const StarBorderIcon: React.FC<SvgIconProps> = (props) => (+ <SvgIcon {...props} viewBox="0 0 21 20">+ <path+ d="M8.69381 1.56975C9.38617 0.609562 10.7995 0.609562 11.4919 1.56975L13.7114 4.64784C13.9253 4.9445 14.2255 5.16569 14.5699 5.28031L18.1427 6.46961C19.2572 6.84061 19.6939 8.20365 19.0073 9.16808L16.8062 12.2597C16.5941 12.5577 16.4794 12.9156 16.4783 13.2831L16.4669 17.0962C16.4634 18.2857 15.32 19.1281 14.2033 18.764L10.6234 17.5966C10.2784 17.4841 9.90729 17.4841 9.56228 17.5966L5.98245 18.764C4.86575 19.1281 3.72231 18.2857 3.71876 17.0962L3.70737 13.2831C3.70628 12.9156 3.5916 12.5577 3.37946 12.2597L1.17839 9.16808C0.491785 8.20365 0.928537 6.84061 2.04305 6.46961L5.61584 5.28031C5.96017 5.16569 6.26041 4.9445 6.47432 4.64784L8.69381 1.56975Z"+ fill="none"+ stroke="currentColor"+ strokeWidth="1.7"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </SvgIcon>+);