Rename again

This commit is contained in:
Manav Rathi 2025-02-06 10:06:00 +05:30
parent 684c538fe8
commit 4ef56c3dc9
No known key found for this signature in database
8 changed files with 18 additions and 17 deletions

View File

@ -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<AlbumCastDialogProps> = ({
open={open}
onClose={onClose}
title={t("cast_album_to_tv")}
sx={{ zIndex: aboveGalleryContentZ }}
sx={{ zIndex: aboveFileViewerContentZ }}
>
{view == "choose" && (
<Stack sx={{ py: 1, gap: 4 }}>

View File

@ -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<FilesDownloadProgressProps> = ({
horizontal="left"
sx={{
"&&": { bottom: `${index * 80 + 20}px` },
zIndex: aboveGalleryContentZ,
zIndex: aboveFileViewerContentZ,
}}
open={isFilesDownloadStarted(attributes)}
onClose={handleClose(attributes)}

View File

@ -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 (
<TitledMiniDialog
sx={{ zIndex: aboveGalleryContentZ }}
sx={{ zIndex: aboveFileViewerContentZ }}
open={isInEditMode}
onClose={closeEditMode}
title={t("rename_file")}

View File

@ -12,7 +12,7 @@ import log from "@/base/log";
import { downloadAndRevokeObjectURL } from "@/base/utils/web";
import { downloadManager } from "@/gallery/services/download";
import { EnteFile } from "@/media/file";
import { aboveGalleryContentZ } from "@/new/photos/components/utils/z-index";
import { aboveFileViewerContentZ } from "@/new/photos/components/utils/z-index";
import { getLocalCollections } from "@/new/photos/services/collections";
import { AppContext } from "@/new/photos/types/context";
import { CenteredFlex } from "@ente/shared/components/Container";
@ -525,7 +525,7 @@ export const ImageEditorOverlay: React.FC<ImageEditorOverlayProps> = (
<Backdrop
sx={{
backgroundColor: "background.default" /* Opaque */,
zIndex: aboveGalleryContentZ,
zIndex: aboveFileViewerContentZ,
width: "100%",
}}
open

View File

@ -31,7 +31,7 @@ import {
updateReadyToInstallDialogAttributes,
} from "@/new/photos/components/utils/download";
import { useLoadingBar } from "@/new/photos/components/utils/use-loading-bar";
import { aboveGalleryContentZ } from "@/new/photos/components/utils/z-index";
import { aboveFileViewerContentZ } from "@/new/photos/components/utils/z-index";
import { runMigrations } from "@/new/photos/services/migration";
import { initML, isMLSupported } from "@/new/photos/services/ml";
import { getFamilyPortalRedirectURL } from "@/new/photos/services/user-details";
@ -186,7 +186,7 @@ const App: React.FC<AppProps> = ({ Component, pageProps }) => {
<ThemedLoadingBar ref={loadingBarRef} />
<AttributedMiniDialog
sx={{ zIndex: aboveGalleryContentZ }}
sx={{ zIndex: aboveFileViewerContentZ }}
{...miniDialogProps}
/>

View File

@ -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<CopyButtonProps> = ({ text, size }) => {
arrow
open={copied}
title={t("copied")}
slotProps={{ popper: { sx: { zIndex: aboveGalleryContentZ } } }}
slotProps={{ popper: { sx: { zIndex: aboveFileViewerContentZ } } }}
>
<IconButton onClick={handleClick} color="secondary">
<Icon fontSize={size} />

View File

@ -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": {

View File

@ -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;