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 log from "@/base/log";
import type { Collection } from "@/media/collection"; import type { Collection } from "@/media/collection";
import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot"; 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 { import {
publishCastPayload, publishCastPayload,
revokeAllCastTokens, revokeAllCastTokens,
@ -134,7 +134,7 @@ export const AlbumCastDialog: React.FC<AlbumCastDialogProps> = ({
open={open} open={open}
onClose={onClose} onClose={onClose}
title={t("cast_album_to_tv")} title={t("cast_album_to_tv")}
sx={{ zIndex: aboveGalleryContentZ }} sx={{ zIndex: aboveFileViewerContentZ }}
> >
{view == "choose" && ( {view == "choose" && (
<Stack sx={{ py: 1, gap: 4 }}> <Stack sx={{ py: 1, gap: 4 }}>

View File

@ -1,5 +1,5 @@
import { Notification } from "@/new/photos/components/Notification"; 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 { useAppContext } from "@/new/photos/types/context";
import { t } from "i18next"; import { t } from "i18next";
import { GalleryContext } from "pages/gallery"; import { GalleryContext } from "pages/gallery";
@ -120,7 +120,7 @@ export const FilesDownloadProgress: React.FC<FilesDownloadProgressProps> = ({
horizontal="left" horizontal="left"
sx={{ sx={{
"&&": { bottom: `${index * 80 + 20}px` }, "&&": { bottom: `${index * 80 + 20}px` },
zIndex: aboveGalleryContentZ, zIndex: aboveFileViewerContentZ,
}} }}
open={isFilesDownloadStarted(attributes)} open={isFilesDownloadStarted(attributes)}
onClose={handleClose(attributes)} onClose={handleClose(attributes)}

View File

@ -29,7 +29,7 @@ import {
} from "@/new/photos/components/utils/dialog"; } from "@/new/photos/components/utils/dialog";
import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot"; import { useSettingsSnapshot } from "@/new/photos/components/utils/use-snapshot";
import { import {
aboveGalleryContentZ, aboveFileViewerContentZ,
fileInfoDrawerZ, fileInfoDrawerZ,
} from "@/new/photos/components/utils/z-index"; } from "@/new/photos/components/utils/z-index";
import { tagNumericValue, type RawExifTags } from "@/new/photos/services/exif"; import { tagNumericValue, type RawExifTags } from "@/new/photos/services/exif";
@ -815,7 +815,7 @@ const FileNameEditDialog = ({
}; };
return ( return (
<TitledMiniDialog <TitledMiniDialog
sx={{ zIndex: aboveGalleryContentZ }} sx={{ zIndex: aboveFileViewerContentZ }}
open={isInEditMode} open={isInEditMode}
onClose={closeEditMode} onClose={closeEditMode}
title={t("rename_file")} title={t("rename_file")}

View File

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

View File

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

View File

@ -3,7 +3,7 @@ import DoneIcon from "@mui/icons-material/Done";
import { IconButton, Tooltip, type SvgIconProps } from "@mui/material"; import { IconButton, Tooltip, type SvgIconProps } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import { useState } from "react"; import { useState } from "react";
import { aboveGalleryContentZ } from "./utils/z-index"; import { aboveFileViewerContentZ } from "./utils/z-index";
interface CopyButtonProps { interface CopyButtonProps {
/** /**
@ -31,7 +31,7 @@ export const CopyButton: React.FC<CopyButtonProps> = ({ text, size }) => {
arrow arrow
open={copied} open={copied}
title={t("copied")} title={t("copied")}
slotProps={{ popper: { sx: { zIndex: aboveGalleryContentZ } } }} slotProps={{ popper: { sx: { zIndex: aboveFileViewerContentZ } } }}
> >
<IconButton onClick={handleClick} color="secondary"> <IconButton onClick={handleClick} color="secondary">
<Icon fontSize={size} /> <Icon fontSize={size} />

View File

@ -7,7 +7,7 @@ import log from "@/base/log";
import { Stack, Typography, type ModalProps } from "@mui/material"; import { Stack, Typography, type ModalProps } from "@mui/material";
import { t } from "i18next"; import { t } from "i18next";
import { useState } from "react"; import { useState } from "react";
import { aboveGalleryContentZ } from "./utils/z-index"; import { aboveFileViewerContentZ } from "./utils/z-index";
type ConfirmDeleteFileDialogProps = ModalVisibilityProps & { type ConfirmDeleteFileDialogProps = ModalVisibilityProps & {
/** /**
@ -46,6 +46,7 @@ export const ConfirmDeleteFileDialog: React.FC<
setPhase("failed"); setPhase("failed");
} }
}; };
const handleClose: ModalProps["onClose"] = (_, reason) => { const handleClose: ModalProps["onClose"] = (_, reason) => {
// Ignore backdrop clicks when we're processing the user request. // Ignore backdrop clicks when we're processing the user request.
if (reason == "backdropClick" && phase == "loading") return; if (reason == "backdropClick" && phase == "loading") return;
@ -58,7 +59,7 @@ export const ConfirmDeleteFileDialog: React.FC<
onClose={handleClose} onClose={handleClose}
title={t("trash_file_title")} title={t("trash_file_title")}
sx={(theme) => ({ sx={(theme) => ({
zIndex: aboveGalleryContentZ, zIndex: aboveFileViewerContentZ,
// See: [Note: Lighter backdrop for overlays on photo viewer] // See: [Note: Lighter backdrop for overlays on photo viewer]
...theme.applyStyles("light", { ...theme.applyStyles("light", {
".MuiBackdrop-root": { ".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 * 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 * are visible above the file info drawer in case they are shown in response to
* action taken in the file info drawer. * some action taken in the file info drawer.
*/ */
export const aboveGalleryContentZ = fileInfoDrawerZ + 1; export const aboveFileViewerContentZ = fileInfoDrawerZ + 1;