diff --git a/web/apps/photos/src/components/GalleryLoadingOverlay.tsx b/web/apps/photos/src/components/GalleryLoadingOverlay.tsx deleted file mode 100644 index 5a6b3a3427..0000000000 --- a/web/apps/photos/src/components/GalleryLoadingOverlay.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { styled } from "@mui/material"; -export const GalleryLoadingOverlay = styled("div")` - left: 0; - top: 0; - outline: none; - height: 100%; - width: 100%; - display: flex; - justify-content: center; - align-items: center; - color: #fff; - font-weight: 900; - position: absolute; - background: rgba(0, 0, 0, 0.5); - z-index: 9000; -`; diff --git a/web/apps/photos/src/pages/gallery.tsx b/web/apps/photos/src/pages/gallery.tsx index 5e39221df0..fbe4fe3f2a 100644 --- a/web/apps/photos/src/pages/gallery.tsx +++ b/web/apps/photos/src/pages/gallery.tsx @@ -2,8 +2,8 @@ import { sessionExpiredDialogAttributes } from "@/accounts/components/utils/dial import { stashRedirect } from "@/accounts/services/redirect"; import type { MiniDialogAttributes } from "@/base/components/MiniDialog"; import { AppNavbar, NavbarBase } from "@/base/components/Navbar"; +import { TranslucentLoadingOverlay } from "@/base/components/loaders"; import type { ButtonishProps } from "@/base/components/mui"; -import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator"; import { FocusVisibleButton } from "@/base/components/mui/FocusVisibleButton"; import { errorDialogAttributes } from "@/base/components/utils/dialog"; import { useIsSmallWidth } from "@/base/components/utils/hooks"; @@ -99,7 +99,6 @@ import { } from "components/FilesDownloadProgress"; import { FixCreationTime } from "components/FixCreationTime"; import GalleryEmptyState from "components/GalleryEmptyState"; -import { GalleryLoadingOverlay } from "components/GalleryLoadingOverlay"; import PhotoFrame from "components/PhotoFrame"; import { ITEM_TYPE, TimeStampListItem } from "components/PhotoList"; import Sidebar from "components/Sidebar"; @@ -902,11 +901,7 @@ const Page: React.FC = () => { }} /> - {blockingLoad && ( - - - - )} + {blockingLoad && } {isFirstLoad && ( - {blockingLoad && ( - - - - )} + {blockingLoad && } ( ); + +/** + * An translucent overlay that covers the entire viewport and shows an activity + * indicator in its center. + * + * Used as a overscreen during blocking actions. + */ +export const TranslucentLoadingOverlay: React.FC = () => ( + + + +); diff --git a/web/packages/base/components/utils/theme.ts b/web/packages/base/components/utils/theme.ts index a2f85c145e..65e7bf869c 100644 --- a/web/packages/base/components/utils/theme.ts +++ b/web/packages/base/components/utils/theme.ts @@ -189,8 +189,8 @@ const _colors = { paper2: "#252525", }, backdrop: { - base: "rgba(0, 0, 0, 0.90)" /* unused */, - muted: "rgba(0, 0, 0, 0.65)" /* unused */, + base: "rgba(0, 0, 0, 0.90)", + muted: "rgba(0, 0, 0, 0.65)", faint: "rgba(0, 0, 0,0.20)", }, text: {