Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

refractor(gallery):file-naming-updated

Aswin Asok8e022db88fb9
diff --git a/web/apps/photos/src/components/AddToAlbumProgress.tsx b/web/apps/photos/src/components/AlbumAddedNotification.tsx
similarity index 93%
rename from web/apps/photos/src/components/AddToAlbumProgress.tsx
rename to web/apps/photos/src/components/AlbumAddedNotification.tsx
index 44233442e9..599fb39ab4 100644
--- a/web/apps/photos/src/components/AddToAlbumProgress.tsx
+++ b/web/apps/photos/src/components/AlbumAddedNotification.tsx
@@ -1,4 +1,3 @@
-// TODO: Review AddToAlbumProgress for accessibility and consistent UI patterns.
import ArrowForwardIcon from "@mui/icons-material/ArrowForward";
import CloseIcon from "@mui/icons-material/Close";
import {
@@ -15,7 +14,7 @@ import React from "react";
export type AddToAlbumPhase = "processing" | "done" | "failed";
-interface AddToAlbumProgressProps {
+interface AlbumAddedNotificationProps {
open: boolean;
onClose: () => void;
phase: AddToAlbumPhase;
@@ -26,9 +25,10 @@ interface AddToAlbumProgressProps {
}
/**
- * Minimal progress UI for add-to-album operations.
+ * Success notification shown after files are added to an album.
+ * Provides navigation to the album via an arrow button.
*/
-export const AddToAlbumProgress: React.FC<AddToAlbumProgressProps> = ({
+export const AlbumAddedNotification: React.FC<AlbumAddedNotificationProps> = ({
open,
onClose,
phase,
diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx
index f859ce0f7f..de68dddec6 100644
--- a/web/apps/photos/src/pages/gallery.tsx
+++ b/web/apps/photos/src/pages/gallery.tsx
@@ -6,8 +6,8 @@ import ArrowBackIcon from "@mui/icons-material/ArrowBack";
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/AddToAlbumProgress";
-import { AddToAlbumProgress } from "components/AddToAlbumProgress";
+import type { AddToAlbumPhase } from "components/AlbumAddedNotification";
+import { AlbumAddedNotification } from "components/AlbumAddedNotification";
import { AuthenticateUser } from "components/AuthenticateUser";
import { GalleryBarAndListHeader } from "components/Collections/GalleryBarAndListHeader";
import { DownloadStatusNotifications } from "components/DownloadStatusNotifications";
@@ -1341,7 +1341,7 @@ const Page: React.FC = () => {
}}
onSubmit={handleAlbumNameSubmit}
/>
- <AddToAlbumProgress
+ <AlbumAddedNotification
open={addToAlbumProgress.open}
onClose={() =>
setAddToAlbumProgress((s) => ({ ...s, open: false }))