π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
refractor(AlbumAddedNotification):subtitle-changed-to-album-name
Aswin Asokdca6d5537f0a
diff --git a/web/apps/photos/src/components/AlbumAddedNotification.tsx b/web/apps/photos/src/components/AlbumAddedNotification.tsxindex eac613d0b7..050cb967ab 100644--- a/web/apps/photos/src/components/AlbumAddedNotification.tsx+++ b/web/apps/photos/src/components/AlbumAddedNotification.tsx@@ -18,8 +18,8 @@ interface AlbumAddedNotificationProps {open: boolean;onClose: () => void;phase: AddToAlbumPhase;- /** The file name to show as subtitle (truncated). */- fileName?: string;+ /** The destination album name to show as subtitle (truncated). */+ albumName?: string;/** Called when the arrow CTA is clicked to navigate to the album. */onArrowClick?: () => void;}@@ -32,7 +32,7 @@ export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({open,onClose,phase,- fileName,+ albumName,onArrowClick,}) => {// Only show the toast once the operation completes successfully.@@ -57,7 +57,7 @@ export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({{/* Intentionally using a simple title for clarity */}{t("added_to_album")}</Typography>- {fileName && (+ {albumName && (<Typographyvariant="body"sx={{@@ -66,7 +66,7 @@ export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({marginTop: "4px",}}>- {truncate(fileName, 15)}+ {truncate(albumName, 20)}</Typography>)}</Box>diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsxindex de68dddec6..7f1b86d8a1 100644--- a/web/apps/photos/src/pages/gallery.tsx+++ b/web/apps/photos/src/pages/gallery.tsx@@ -47,7 +47,7 @@ import { type UploadTypeSelectorIntent } from "ente-gallery/components/Upload";import { useSaveGroups } from "ente-gallery/components/utils/save-groups";import { type Collection } from "ente-media/collection";import { type EnteFile } from "ente-media/file";-import { fileFileName, type ItemVisibility } from "ente-media/file-metadata";+import { type ItemVisibility } from "ente-media/file-metadata";import {CollectionSelector,type CollectionSelectorAttributes,@@ -245,7 +245,7 @@ const Page: React.FC = () => {open: boolean;phase: AddToAlbumPhase;albumId?: number;- fileName?: string;+ albumName?: string;}>({ open: false, phase: "processing" });const onAuthenticateCallback = useRef<(() => void) | undefined>(undefined);@@ -744,14 +744,12 @@ const Page: React.FC = () => {);await remotePull({ silent: true });- //Show custom toast with file name and navigation+ // Show custom toast with album name and navigationsetAddToAlbumProgress({open: true,phase: "done",albumId: collection.id,- fileName: fileFileName(- pendingSingleFileAdd.current.file,- ),+ albumName: collection.name,});}@@ -1056,12 +1054,12 @@ const Page: React.FC = () => {sourceCollectionSummaryID,);await remotePull({ silent: true });- // Show custom toast with file name and navigation+ // Show custom toast with album name and navigationsetAddToAlbumProgress({open: true,phase: "done",albumId: collection.id,- fileName: fileFileName(file),+ albumName: collection.name,});} catch (e) {onGenericError(e);@@ -1347,7 +1345,7 @@ const Page: React.FC = () => {setAddToAlbumProgress((s) => ({ ...s, open: false }))}phase={addToAlbumProgress.phase}- fileName={addToAlbumProgress.fileName}+ albumName={addToAlbumProgress.albumName}onArrowClick={() => {closeFileViewerRef.current?.();if (addToAlbumProgress.albumId !== undefined) {