π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Unify album action icons
Anand Baburajan79b80e556f92
diff --git a/web/apps/albums/src/public-album/components/ActionIcons.tsx b/web/apps/albums/src/public-album/components/ActionIcons.tsxnew file mode 100644index 0000000000..c02bbce694--- /dev/null+++ b/web/apps/albums/src/public-album/components/ActionIcons.tsx@@ -0,0 +1,56 @@+import {+ ChatFeedback01Icon,+ Download01Icon,+ ImageAdd02Icon,+ Share08Icon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";+import React from "react";++export interface ActionIconProps {+ size?: number;+ strokeWidth?: number;+}++const defaultSize = 24;+const defaultStrokeWidth = 1.6;++export const FeedIcon: React.FC<ActionIconProps> = ({+ size = defaultSize,+ strokeWidth = defaultStrokeWidth,+}) => (+ <HugeiconsIcon+ icon={ChatFeedback01Icon}+ size={size}+ strokeWidth={strokeWidth}+ />+);++export const DownloadIcon: React.FC<ActionIconProps> = ({+ size = defaultSize,+ strokeWidth = defaultStrokeWidth,+}) => (+ <HugeiconsIcon+ icon={Download01Icon}+ size={size}+ strokeWidth={strokeWidth}+ />+);++export const AddPhotosIcon: React.FC<ActionIconProps> = ({+ size = defaultSize,+ strokeWidth = defaultStrokeWidth,+}) => (+ <HugeiconsIcon+ icon={ImageAdd02Icon}+ size={size}+ strokeWidth={strokeWidth}+ />+);++export const ShareIcon: React.FC<ActionIconProps> = ({+ size = defaultSize,+ strokeWidth = defaultStrokeWidth,+}) => (+ <HugeiconsIcon icon={Share08Icon} size={size} strokeWidth={strokeWidth} />+);diff --git a/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx b/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsxindex 297d751f46..8d61f160c2 100644--- a/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx+++ b/web/apps/albums/src/public-album/components/TripLayout/MobileNavBar.tsx@@ -1,10 +1,12 @@import { LazyNotification } from "@/app/lazy/global-ui";import { getEnteURL } from "@/public-album/access/utils/external-links";-import { FeedIcon } from "@/public-album/social/components/FeedIcon";-import AddPhotoAlternateOutlinedIcon from "@mui/icons-material/AddPhotoAlternateOutlined";+import {+ AddPhotosIcon,+ DownloadIcon,+ FeedIcon,+ ShareIcon,+} from "@/public-album/components/ActionIcons";import CheckIcon from "@mui/icons-material/Check";-import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";-import ShareIcon from "@mui/icons-material/Share";import { Box, Button, IconButton, styled } from "@mui/material";import { EnteLogo } from "ente-base/components/EnteLogo";import { t } from "i18next";@@ -25,6 +27,7 @@ export const MobileNavBar: React.FC<MobileNavBarProps> = ({onShowFeed,collectionTitle,}) => {+ const iconStrokeWidth = 1.8;const [showCopiedMessage, setShowCopiedMessage] = useState(false);const handleShare = async () => {@@ -57,38 +60,29 @@ export const MobileNavBar: React.FC<MobileNavBarProps> = ({<ButtonGroup><MobileNavButton onClick={handleShare}>- <ShareIcon sx={{ fontSize: "15px" }} />+ <ShareIcon size={16} strokeWidth={iconStrokeWidth} /></MobileNavButton>{onShowFeed && (<MobileNavButton onClick={onShowFeed}>- <Box- sx={{- width: 16,- height: 16,- display: "flex",- alignItems: "center",- justifyContent: "center",- "& svg": { width: "100%", height: "100%" },- }}- >- <FeedIcon />- </Box>+ <FeedIcon size={16} strokeWidth={iconStrokeWidth} /></MobileNavButton>)}{onAddPhotos && (<MobileNavButton onClick={onAddPhotos}>- <AddPhotoAlternateOutlinedIcon- sx={{ fontSize: "16px" }}+ <AddPhotosIcon+ size={16}+ strokeWidth={iconStrokeWidth}/></MobileNavButton>)}{enableDownload && (<MobileNavButton onClick={downloadAllFiles}>- <FileDownloadOutlinedIcon- sx={{ fontSize: "18px" }}+ <DownloadIcon+ size={16}+ strokeWidth={iconStrokeWidth}/></MobileNavButton>)}diff --git a/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx b/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsxindex f2dee4e683..81d39395b3 100644--- a/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx+++ b/web/apps/albums/src/public-album/components/TripLayout/TopNavButtons.tsx@@ -1,10 +1,12 @@import { LazyNotification } from "@/app/lazy/global-ui";import { getEnteURL } from "@/public-album/access/utils/external-links";-import { FeedIcon } from "@/public-album/social/components/FeedIcon";-import AddPhotoAlternateOutlinedIcon from "@mui/icons-material/AddPhotoAlternateOutlined";+import {+ AddPhotosIcon,+ DownloadIcon,+ FeedIcon,+ ShareIcon,+} from "@/public-album/components/ActionIcons";import CheckIcon from "@mui/icons-material/Check";-import FileDownloadOutlinedIcon from "@mui/icons-material/FileDownloadOutlined";-import ShareIcon from "@mui/icons-material/Share";import { Box, Button, IconButton, styled } from "@mui/material";import { t } from "i18next";import { useState } from "react";@@ -22,6 +24,7 @@ export const TopNavButtons: React.FC<TopNavButtonsProps> = ({enableDownload,onShowFeed,}) => {+ const iconStrokeWidth = 1.8;const [showCopiedMessage, setShowCopiedMessage] = useState(false);const handleShare = () => {@@ -36,26 +39,27 @@ export const TopNavButtons: React.FC<TopNavButtonsProps> = ({<><ButtonContainer><NavButton onClick={handleShare}>- <ShareIcon sx={{ fontSize: "20px" }} />+ <ShareIcon size={24} strokeWidth={iconStrokeWidth} /></NavButton>{onShowFeed && (<NavButton onClick={onShowFeed}>- <FeedIcon />+ <FeedIcon size={24} strokeWidth={iconStrokeWidth} /></NavButton>)}{onAddPhotos && (<NavButton onClick={onAddPhotos}>- <AddPhotoAlternateOutlinedIcon- sx={{ fontSize: "22px" }}+ <AddPhotosIcon+ size={24}+ strokeWidth={iconStrokeWidth}/></NavButton>)}{enableDownload && (<NavButton onClick={downloadAllFiles}>- <FileDownloadOutlinedIcon sx={{ fontSize: "23px" }} />+ <DownloadIcon size={24} strokeWidth={iconStrokeWidth} /></NavButton>)}diff --git a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsxindex 3178c1ab57..d8c17022fc 100644--- a/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx+++ b/web/apps/albums/src/public-album/page/PublicAlbumPage.tsx@@ -7,6 +7,12 @@ import {type PasswordUnlockScreenProps,} from "@/public-album/access/components/PasswordUnlockScreen";import { getEnteURL } from "@/public-album/access/utils/external-links";+import {+ AddPhotosIcon,+ DownloadIcon,+ FeedIcon,+ ShareIcon,+} from "@/public-album/components/ActionIcons";import { type FileListHeaderOrFooter } from "@/public-album/components/FileList";import { FileListWithViewer } from "@/public-album/components/FileListWithViewer";import type { TripLayoutProps } from "@/public-album/components/TripLayout";@@ -14,7 +20,6 @@ import { setPublicAlbumsCredentials } from "@/public-album/data/auth/public-linkimport { quickLinkDateRangeForFiles } from "@/public-album/data/utils/quick-link";import { ActiveDownloadStatusNotifications } from "@/public-album/download/components/ActiveDownloadStatusNotifications";import { sortFiles } from "@/public-album/media/utils/sort-files";-import { FeedIcon } from "@/public-album/social/components/FeedIcon";import type { FullScreenDropZoneProps } from "@/public-album/upload/components/CollectDropZone";import type { UploadProps } from "@/public-album/upload/components/Upload";import {@@ -33,12 +38,6 @@ import {GalleryItemsHeaderAdapter,GalleryItemsSummary,} from "@/shared/ui/gallery/GalleryItemsHeader";-import {- Download01Icon,- ImageAdd02Icon,- Share08Icon,-} from "@hugeicons/core-free-icons";-import { HugeiconsIcon } from "@hugeicons/react";import CheckIcon from "@mui/icons-material/Check";import CloseIcon from "@mui/icons-material/Close";import {@@ -963,7 +962,7 @@ const SelectedFileOptions: React.FC<SelectedFileOptionsProps> = ({onClick={downloadFilesHelper}sx={{ flexShrink: 0, mr: "-15px" }}>- <HugeiconsIcon icon={Download01Icon} strokeWidth={1.6} />+ <DownloadIcon size={24} /></IconButton></Tooltip></Stack>@@ -1113,17 +1112,7 @@ const FileListHeader: React.FC<FileListHeaderProps> = ({onClick={onShowFeed}disabled={hasSelection}>- <Box- sx={{- width: 24,- height: 24,- display: "flex",- alignItems: "center",- justifyContent: "center",- }}- >- <FeedIcon />- </Box>+ <FeedIcon size={24} /></IconButton>)}{downloadEnabled && (@@ -1131,10 +1120,7 @@ const FileListHeader: React.FC<FileListHeaderProps> = ({onClick={downloadAllFiles}disabled={hasSelection}>- <HugeiconsIcon- icon={Download01Icon}- strokeWidth={1.6}- />+ <DownloadIcon size={24} /></IconButton>)}{onAddPhotos && (@@ -1142,20 +1128,14 @@ const FileListHeader: React.FC<FileListHeaderProps> = ({onClick={onAddPhotos}disabled={addPhotosDisabled || hasSelection}>- <HugeiconsIcon- icon={ImageAdd02Icon}- strokeWidth={1.8}- />+ <AddPhotosIcon size={24} /></IconButton>)}<IconButtononClick={handleShare}disabled={hasSelection}>- <HugeiconsIcon- icon={Share08Icon}- strokeWidth={1.6}- />+ <ShareIcon size={24} /></IconButton></Stack></SpacedRow>diff --git a/web/apps/albums/src/public-album/social/components/FeedIcon.tsx b/web/apps/albums/src/public-album/social/components/FeedIcon.tsxdeleted file mode 100644index aa46596b57..0000000000--- a/web/apps/albums/src/public-album/social/components/FeedIcon.tsx+++ /dev/null@@ -1,28 +0,0 @@-import React from "react";--export const FeedIcon: React.FC = () => (- <svg- width="23"- height="20"- viewBox="0 0 23 20"- fill="none"- xmlns="http://www.w3.org/2000/svg"- >- <path- d="M9.7998 0.5C10.2416 0.5 10.5996 0.857977 10.5996 1.2998C10.5996 1.74163 10.2416 2.09961 9.7998 2.09961H4.7998C3.03249 2.09961 1.59961 3.53249 1.59961 5.2998V14.2998C1.59961 16.0671 3.0325 17.5 4.7998 17.5H13.7998C15.5671 17.5 17 16.0671 17 14.2998V11.7998C17 11.358 17.358 11 17.7998 11C18.2416 11 18.5996 11.358 18.5996 11.7998V14.2998C18.5996 16.9507 16.4507 19.0996 13.7998 19.0996H4.7998C2.14883 19.0996 0 16.9507 0 14.2998V5.2998C0 2.64884 2.14884 0.5 4.7998 0.5H9.7998Z"- fill="currentColor"- />- <path- d="M13.2998 13.5C13.7416 13.5 14.0996 13.858 14.0996 14.2998C14.0996 14.7416 13.7416 15.0996 13.2998 15.0996H4.2998C3.85798 15.0996 3.5 14.7416 3.5 14.2998C3.5 13.858 3.85798 13.5 4.2998 13.5H13.2998Z"- fill="currentColor"- />- <path- d="M10.2998 10.5C10.7416 10.5 11.0996 10.858 11.0996 11.2998C11.0996 11.7416 10.7416 12.0996 10.2998 12.0996H4.2998C3.85798 12.0996 3.5 11.7416 3.5 11.2998C3.5 10.858 3.85798 10.5 4.2998 10.5H10.2998Z"- fill="currentColor"- />- <path- d="M20.6523 6.12012C21.3761 5.2635 22.0996 4.13144 22.0996 2.93848C22.0995 1.38141 20.9626 0 19.2998 0C18.621 0 17.9847 0.205224 17.2998 0.749023C16.6149 0.205224 15.9787 0 15.2998 0C13.637 0 12.5001 1.38141 12.5 2.93848C12.5 4.13144 13.2236 5.2635 13.9473 6.12012C14.698 7.00866 15.5878 7.76218 16.1758 8.21484C16.8431 8.72865 17.7565 8.72865 18.4238 8.21484C19.0119 7.76218 19.9016 7.00866 20.6523 6.12012Z"- fill="currentColor"- />- </svg>-);