Skip to content

armgit / ente

Public Imported from GitHub
0

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

Polish Space dialog surfaces

Anand Baburajanedf0facb1b83
diff --git a/web/apps/space/src/components/ConfirmationActionSheet.tsx b/web/apps/space/src/components/ConfirmationActionSheet.tsx
index 68c30ac083..f1586326ae 100644
--- a/web/apps/space/src/components/ConfirmationActionSheet.tsx
+++ b/web/apps/space/src/components/ConfirmationActionSheet.tsx
@@ -63,18 +63,10 @@ export const ConfirmationActionSheet: React.FC<
? { transition: SpaceBottomSheetTransition }
: undefined
}
- sx={
- isDark
- ? {
- zIndex: 1500,
- "--space-dialog-backdrop": "rgba(0 0 0 / 0.86)",
- }
- : undefined
- }
+ sx={isDark ? { zIndex: 1500 } : undefined}
slotProps={{
paper: {
sx: {
- bgcolor: isDark ? "#1E1E1E" : spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
diff --git a/web/apps/space/src/components/NotificationPermissionInstructions.tsx b/web/apps/space/src/components/NotificationPermissionInstructions.tsx
index bef1a4d73a..de99f56b82 100644
--- a/web/apps/space/src/components/NotificationPermissionInstructions.tsx
+++ b/web/apps/space/src/components/NotificationPermissionInstructions.tsx
@@ -2,12 +2,7 @@ import { Box, Dialog, useMediaQuery } from "@mui/material";
import { SpaceBottomSheetTransition } from "components/BottomSheetTransition";
import { isSpaceIOS } from "hooks/use-pwa-install-prompt";
import React from "react";
-import {
- spaceSurface,
- spaceSurfaceHover,
- spaceText,
- spaceTextMuted,
-} from "styles/colors";
+import { spaceSurfaceHover, spaceText, spaceTextMuted } from "styles/colors";
const green = "#08C225";
const textBase = spaceText;
@@ -50,7 +45,6 @@ export const SpaceNotificationPermissionInstructions: React.FC<
onClose={onClose}
aria-labelledby={titleID}
maxWidth={false}
- sx={{ "--space-dialog-backdrop": "rgba(0 0 0 / 0.56)" }}
slots={
isBottomSheet
? { transition: SpaceBottomSheetTransition }
@@ -59,7 +53,6 @@ export const SpaceNotificationPermissionInstructions: React.FC<
slotProps={{
paper: {
sx: {
- bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "0 -18px 44px rgba(0, 0, 0, 0.18)",
@@ -141,7 +134,7 @@ export const SpaceNotificationPermissionInstructions: React.FC<
<Box
sx={{
alignItems: "center",
- bgcolor: "#E7F6E9",
+ bgcolor: "rgba(8, 194, 37, 0.14)",
borderRadius: "14px",
color: green,
display: "flex",
diff --git a/web/apps/space/src/components/PWAInstallPrompt.tsx b/web/apps/space/src/components/PWAInstallPrompt.tsx
index 69cf249b15..5946b72902 100644
--- a/web/apps/space/src/components/PWAInstallPrompt.tsx
+++ b/web/apps/space/src/components/PWAInstallPrompt.tsx
@@ -482,7 +482,6 @@ export const SpacePWAInstallInstructions: React.FC<
aria-describedby={
purpose == "notifications" ? descriptionID : undefined
}
- sx={{ "--space-dialog-backdrop": "rgba(0 0 0 / 0.56)" }}
slots={
isBottomSheet
? { transition: SpaceBottomSheetTransition }
@@ -491,7 +490,6 @@ export const SpacePWAInstallInstructions: React.FC<
slotProps={{
paper: {
sx: {
- bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "0 -18px 44px rgba(0, 0, 0, 0.18)",
@@ -625,7 +623,7 @@ const InstallInstructionStep: React.FC<InstallStep> = ({ icon, text }) => (
<Box
sx={{
alignItems: "center",
- bgcolor: "#E7F6E9",
+ bgcolor: "rgba(8, 194, 37, 0.14)",
borderRadius: "14px",
color: green,
display: "flex",
diff --git a/web/apps/space/src/components/ShareLinkDialog.tsx b/web/apps/space/src/components/ShareLinkDialog.tsx
index 048930fd22..0ea8e10006 100644
--- a/web/apps/space/src/components/ShareLinkDialog.tsx
+++ b/web/apps/space/src/components/ShareLinkDialog.tsx
@@ -6,7 +6,7 @@ import {
onOpenSpaceShareLinkDialog,
type SpaceShareLinkDialogMode,
} from "services/share-link";
-import { spaceSurface, spaceText, spaceTextMuted } from "styles/colors";
+import { spaceText, spaceTextMuted } from "styles/colors";
const green = "#08C225";
const dangerColor = "#F63A3A";
@@ -93,7 +93,6 @@ export const SpaceShareLinkDialogHost: React.FC = () => {
slotProps={{
paper: {
sx: {
- bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
diff --git a/web/apps/space/src/pages/_app.tsx b/web/apps/space/src/pages/_app.tsx
index f9691296bf..8521516eae 100644
--- a/web/apps/space/src/pages/_app.tsx
+++ b/web/apps/space/src/pages/_app.tsx
@@ -18,7 +18,11 @@ import React from "react";
import "react-easy-crop/react-easy-crop.css";
import { registerSpaceServiceWorker } from "services/web-push";
import { SpaceAppStateProvider } from "state/AppStateProvider";
-import { spaceAppBackground, spaceAppBackgroundColor } from "styles/colors";
+import {
+ spaceAppBackground,
+ spaceAppBackgroundColor,
+ spaceDialogBackground,
+} from "styles/colors";
import "styles/globals.css";
const spaceTheme = createTheme(shareTheme, {
@@ -32,10 +36,10 @@ const spaceTheme = createTheme(shareTheme, {
},
MuiDialog: {
styleOverrides: {
+ paper: { backgroundColor: spaceDialogBackground },
root: {
".MuiBackdrop-root": {
- backgroundColor:
- "var(--space-dialog-backdrop, rgba(0 0 0 / 0.48))",
+ backgroundColor: "rgba(0 0 0 / 0.84)",
},
},
},
diff --git a/web/apps/space/src/screens/FriendsScreen.tsx b/web/apps/space/src/screens/FriendsScreen.tsx
index e7af6d3591..51128ee402 100644
--- a/web/apps/space/src/screens/FriendsScreen.tsx
+++ b/web/apps/space/src/screens/FriendsScreen.tsx
@@ -35,7 +35,6 @@ import {
import type { SpaceFriendRequest } from "services/space";
import {
spaceAppBackground,
- spaceAppBackgroundColor,
spaceSurface,
spaceSurfaceHover,
spaceText,
@@ -737,7 +736,6 @@ const AddFriendSheet: React.FC<AddFriendSheetProps> = ({
slotProps={{
paper: {
sx: {
- bgcolor: spaceAppBackgroundColor,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
diff --git a/web/apps/space/src/styles/colors.ts b/web/apps/space/src/styles/colors.ts
index e20989e9bc..e146e17c3b 100644
--- a/web/apps/space/src/styles/colors.ts
+++ b/web/apps/space/src/styles/colors.ts
@@ -3,6 +3,7 @@ export const spaceAppBackgroundColor = "#0C1014";
export const spaceAppBackground =
"radial-gradient(ellipse 120% 95% at 50% 58%, rgba(38, 78, 52, 0.16), transparent 72%), #0C1014";
+export const spaceDialogBackground = "#171C1A";
export const spaceSurface = "#202825";
export const spaceSurfaceHover = "#29322F";
export const spaceText = "#F4F4F4";