diff --git a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx index 4f74d5699d..6618280209 100644 --- a/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx +++ b/web/apps/photos/src/components/Collections/AlbumCastDialog.tsx @@ -4,7 +4,7 @@ import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton"; import log from "@/base/log"; import type { Collection } from "@/media/collection"; import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot"; -import { aboveGalleryContentZ } from "@/new/photos/components/utils/z-index"; +import { aboveFileViewerContentZ } from "@/new/photos/components/utils/z-index"; import { publishCastPayload, revokeAllCastTokens, @@ -134,7 +134,7 @@ export const AlbumCastDialog: React.FC = ({ open={open} onClose={onClose} title={t("cast_album_to_tv")} - sx={{ zIndex: aboveGalleryContentZ }} + sx={{ zIndex: aboveFileViewerContentZ }} > {view == "choose" && ( diff --git a/web/apps/photos/src/components/FilesDownloadProgress.tsx b/web/apps/photos/src/components/FilesDownloadProgress.tsx index ae53eee4f8..568741c8bc 100644 --- a/web/apps/photos/src/components/FilesDownloadProgress.tsx +++ b/web/apps/photos/src/components/FilesDownloadProgress.tsx @@ -1,5 +1,5 @@ import { Notification } from "@/new/photos/components/Notification"; -import { aboveGalleryContentZ } from "@/new/photos/components/utils/z-index"; +import { aboveFileViewerContentZ } from "@/new/photos/components/utils/z-index"; import { useAppContext } from "@/new/photos/types/context"; import { t } from "i18next"; import { GalleryContext } from "pages/gallery"; @@ -120,7 +120,7 @@ export const FilesDownloadProgress: React.FC = ({ horizontal="left" sx={{ "&&": { bottom: `${index * 80 + 20}px` }, - zIndex: aboveGalleryContentZ, + zIndex: aboveFileViewerContentZ, }} open={isFilesDownloadStarted(attributes)} onClose={handleClose(attributes)} diff --git a/web/apps/photos/src/components/PhotoViewer/FileInfo.tsx b/web/apps/photos/src/components/PhotoViewer/FileInfo.tsx index c791a2a339..d79f55eec1 100644 --- a/web/apps/photos/src/components/PhotoViewer/FileInfo.tsx +++ b/web/apps/photos/src/components/PhotoViewer/FileInfo.tsx @@ -29,7 +29,7 @@ import { } from "@/new/photos/components/utils/dialog"; import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot"; import { - aboveGalleryContentZ, + aboveFileViewerContentZ, fileInfoDrawerZ, } from "@/new/photos/components/utils/z-index"; import { tagNumericValue, type RawExifTags } from "@/new/photos/services/exif"; @@ -815,7 +815,7 @@ const FileNameEditDialog = ({ }; return ( = ( = ({ Component, pageProps }) => { diff --git a/web/packages/new/photos/components/FileInfo.tsx b/web/packages/new/photos/components/FileInfo.tsx index 01c8301cf5..81c7e52fa0 100644 --- a/web/packages/new/photos/components/FileInfo.tsx +++ b/web/packages/new/photos/components/FileInfo.tsx @@ -3,7 +3,7 @@ import DoneIcon from "@mui/icons-material/Done"; import { IconButton, Tooltip, type SvgIconProps } from "@mui/material"; import { t } from "i18next"; import { useState } from "react"; -import { aboveGalleryContentZ } from "./utils/z-index"; +import { aboveFileViewerContentZ } from "./utils/z-index"; interface CopyButtonProps { /** @@ -31,7 +31,7 @@ export const CopyButton: React.FC = ({ text, size }) => { arrow open={copied} title={t("copied")} - slotProps={{ popper: { sx: { zIndex: aboveGalleryContentZ } } }} + slotProps={{ popper: { sx: { zIndex: aboveFileViewerContentZ } } }} > diff --git a/web/packages/new/photos/components/FileViewer.tsx b/web/packages/new/photos/components/FileViewer.tsx index 6734d9d900..72446197e4 100644 --- a/web/packages/new/photos/components/FileViewer.tsx +++ b/web/packages/new/photos/components/FileViewer.tsx @@ -7,7 +7,7 @@ import log from "@/base/log"; import { Stack, Typography, type ModalProps } from "@mui/material"; import { t } from "i18next"; import { useState } from "react"; -import { aboveGalleryContentZ } from "./utils/z-index"; +import { aboveFileViewerContentZ } from "./utils/z-index"; type ConfirmDeleteFileDialogProps = ModalVisibilityProps & { /** @@ -46,6 +46,7 @@ export const ConfirmDeleteFileDialog: React.FC< setPhase("failed"); } }; + const handleClose: ModalProps["onClose"] = (_, reason) => { // Ignore backdrop clicks when we're processing the user request. if (reason == "backdropClick" && phase == "loading") return; @@ -58,7 +59,7 @@ export const ConfirmDeleteFileDialog: React.FC< onClose={handleClose} title={t("trash_file_title")} sx={(theme) => ({ - zIndex: aboveGalleryContentZ, + zIndex: aboveFileViewerContentZ, // See: [Note: Lighter backdrop for overlays on photo viewer] ...theme.applyStyles("light", { ".MuiBackdrop-root": { diff --git a/web/packages/new/photos/components/utils/z-index.tsx b/web/packages/new/photos/components/utils/z-index.tsx index bf6190824c..e96154e5c0 100644 --- a/web/packages/new/photos/components/utils/z-index.tsx +++ b/web/packages/new/photos/components/utils/z-index.tsx @@ -33,7 +33,7 @@ export const fileInfoDrawerZ = photoSwipeZ + 1; /** * Dialogs (not necessarily always) need to be higher still so to ensure they - * are visible above the drawer in case they are shown in response to some - * action taken in the file info drawer. + * are visible above the file info drawer in case they are shown in response to + * some action taken in the file info drawer. */ -export const aboveGalleryContentZ = fileInfoDrawerZ + 1; +export const aboveFileViewerContentZ = fileInfoDrawerZ + 1;