Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use shared Space background

Anand Baburajan8bb7caab694b
diff --git a/web/apps/space/src/components/ActionToast.tsx b/web/apps/space/src/components/ActionToast.tsx
index 6395992b1a..90b8387746 100644
--- a/web/apps/space/src/components/ActionToast.tsx
+++ b/web/apps/space/src/components/ActionToast.tsx
@@ -3,10 +3,11 @@ import { HugeiconsIcon } from "@hugeicons/react";
import { Box } from "@mui/material";
import { keyframes } from "@mui/material/styles";
import React from "react";
+import { spaceSurface, spaceText } from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
const green = "#08C225";
-const textBase = "#000";
+const textBase = spaceText;
const toastHorizontalPadding = "16px";
const toastEnter = keyframes`
from {
@@ -64,7 +65,7 @@ export const SpaceActionToast: React.FC<SpaceActionToastProps> = ({
aria-live="polite"
sx={{
alignItems: "center",
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "18px",
boxShadow: "0 12px 32px rgba(0, 0, 0, 0.18)",
boxSizing: "border-box",
@@ -137,7 +138,7 @@ export const SpaceActionToast: React.FC<SpaceActionToastProps> = ({
p: 0,
width: 36,
"&:focus-visible": {
- outline: "2px solid rgba(0 0 0 / 0.72)",
+ outline: "2px solid rgba(255 255 255 / 0.72)",
outlineOffset: 2,
},
}}
diff --git a/web/apps/space/src/components/AuthenticatedFriendProfile.tsx b/web/apps/space/src/components/AuthenticatedFriendProfile.tsx
index 93fe3ad96b..95c7a81ed8 100644
--- a/web/apps/space/src/components/AuthenticatedFriendProfile.tsx
+++ b/web/apps/space/src/components/AuthenticatedFriendProfile.tsx
@@ -4,7 +4,6 @@ import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import { useBrowserBackClose } from "hooks/use-browser-back-close";
import React from "react";
-import { friendsBackground } from "screens/FriendsScreen";
import {
FriendProfileImageViewerScreen,
friendProfileImageViewerBackground,
@@ -25,6 +24,7 @@ import {
type SpaceProfilePost,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { profilePostItemsFromPosts } from "utils/post-display";
import { spaceDefaultCoverImagePath } from "utils/post-image";
import { hasPreviousSpaceRoute, useSpaceRouter } from "utils/route-transitions";
@@ -146,7 +146,7 @@ export const AuthenticatedFriendProfile: React.FC<
if (profileLoadStatus != "ready" || !profile?.spaceId) {
return (
<SpaceRouteFallback
- background={friendsBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -155,13 +155,13 @@ export const AuthenticatedFriendProfile: React.FC<
!hadCachedFriendProfileOnMount.current &&
(isProfileLoading || isPostsLoading)
) {
- return <SpaceRouteFallback background={friendsBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
const actorSpaceId = profile.spaceId;
return (
<>
- <SpacePageMeta themeColor={friendsBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<ProfileScreen
friendsCount={displayedProfile.friendsCount}
headerVariant="friend"
diff --git a/web/apps/space/src/components/AvatarCropPage.tsx b/web/apps/space/src/components/AvatarCropPage.tsx
index 0fff3c3077..92cce524de 100644
--- a/web/apps/space/src/components/AvatarCropPage.tsx
+++ b/web/apps/space/src/components/AvatarCropPage.tsx
@@ -3,11 +3,18 @@ import { SpaceBackIcon } from "components/BackIcon";
import { SpaceButtonSpinner } from "components/ButtonSpinner";
import React from "react";
import Cropper, { type Area, type Point } from "react-easy-crop";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
const green = "#08C225";
-const textBase = "#000";
-const textLight = "#969696";
+const textBase = spaceText;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
export const spaceAppAvatarCropSize =
@@ -18,7 +25,6 @@ export const spaceSetupAvatarCropFooterHeight = "130px";
interface SpaceAvatarCropPageProps {
aspect?: number;
- background: string;
crop: Point;
cropShape?: "rect" | "round";
errorMessage?: string;
@@ -60,7 +66,7 @@ const SpaceAvatarCropPageButton: React.FC<{
onClick={onClick}
sx={{
alignItems: "center",
- bgcolor: disabled && !loading ? "#F5F5F5" : green,
+ bgcolor: disabled && !loading ? spaceSurface : green,
border: 0,
borderRadius: "20px",
color: disabled && !loading ? textLight : "white",
@@ -101,10 +107,10 @@ const SpaceAvatarCropPageSecondaryAction: React.FC<{
sx={{
alignItems: "center",
alignSelf: "center",
- bgcolor: variant == "button" ? "#F2F2F2" : "transparent",
+ bgcolor: variant == "button" ? spaceSurface : "transparent",
border: 0,
borderRadius: variant == "button" ? "20px" : 0,
- color: "#666",
+ color: textLight,
cursor: disabled ? "default" : "pointer",
display: "flex",
fontFamily: '"Inter Variable", Inter, sans-serif',
@@ -130,7 +136,7 @@ const SpaceAvatarCropPageSecondaryAction: React.FC<{
},
"&:hover":
!disabled && variant == "button"
- ? { bgcolor: "#ECECEC" }
+ ? { bgcolor: spaceSurfaceHover }
: undefined,
}}
>
@@ -139,7 +145,6 @@ const SpaceAvatarCropPageSecondaryAction: React.FC<{
);
export const SpaceAvatarCropPage: React.FC<SpaceAvatarCropPageProps> = ({
- background,
crop,
errorMessage,
headerVariant = "setup",
@@ -172,7 +177,7 @@ export const SpaceAvatarCropPage: React.FC<SpaceAvatarCropPageProps> = ({
"--profile-crop-width": isCoverCrop
? "100%"
: "min(calc(100vw - 48px), 342px)",
- bgcolor: background,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
height: "100dvh",
@@ -185,7 +190,7 @@ export const SpaceAvatarCropPage: React.FC<SpaceAvatarCropPageProps> = ({
>
<Box
sx={{
- bgcolor: background,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "grid",
gridTemplateRows: isAppHeader
@@ -362,7 +367,7 @@ export const SpaceAvatarCropPage: React.FC<SpaceAvatarCropPageProps> = ({
<Box
sx={{
- bgcolor: background,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
diff --git a/web/apps/space/src/components/ConfirmationActionSheet.tsx b/web/apps/space/src/components/ConfirmationActionSheet.tsx
index ea2ac0277a..68c30ac083 100644
--- a/web/apps/space/src/components/ConfirmationActionSheet.tsx
+++ b/web/apps/space/src/components/ConfirmationActionSheet.tsx
@@ -5,10 +5,11 @@ import {
} from "components/ActionFeedback";
import { SpaceBottomSheetTransition } from "components/BottomSheetTransition";
import React from "react";
+import { spaceSurface, spaceText, spaceTextMuted } from "styles/colors";
const green = "#08C225";
const dangerColor = "#F63A3A";
-const textBase = "#000";
+const textBase = spaceText;
interface ConfirmationActionSheetProps {
appearance?: "light" | "dark";
@@ -31,7 +32,7 @@ interface ConfirmationActionSheetProps {
export const ConfirmationActionSheet: React.FC<
ConfirmationActionSheetProps
> = ({
- appearance = "light",
+ appearance = "dark",
open,
title,
description,
@@ -73,7 +74,7 @@ export const ConfirmationActionSheet: React.FC<
slotProps={{
paper: {
sx: {
- bgcolor: isDark ? "#1E1E1E" : "#FAFAFA",
+ bgcolor: isDark ? "#1E1E1E" : spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
@@ -125,7 +126,7 @@ export const ConfirmationActionSheet: React.FC<
{description && (
<Box
sx={{
- color: isDark ? "#BDBDBD" : "#666666",
+ color: isDark ? "#BDBDBD" : spaceTextMuted,
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 13,
lineHeight: "18px",
@@ -156,8 +157,8 @@ export const ConfirmationActionSheet: React.FC<
/>
<SheetButton
label={cancelLabel}
- backgroundColor={isDark ? "#333333" : "#F2F2F2"}
- color={isDark ? "#D8D8D8" : "#666666"}
+ backgroundColor={isDark ? "#333333" : spaceSurface}
+ color={isDark ? "#D8D8D8" : spaceTextMuted}
disabled={cancelDisabled}
onClick={onCancel}
/>
diff --git a/web/apps/space/src/components/MessagesPage.tsx b/web/apps/space/src/components/MessagesPage.tsx
index b3517e3946..e2920b28d0 100644
--- a/web/apps/space/src/components/MessagesPage.tsx
+++ b/web/apps/space/src/components/MessagesPage.tsx
@@ -3,7 +3,7 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React from "react";
-import { MessagesScreen, messagesBackground } from "screens/MessagesScreen";
+import { MessagesScreen } from "screens/MessagesScreen";
import type { SetupProfile } from "screens/SetupProfileScreen";
import { spaceInviteURL } from "services/invite";
import {
@@ -25,6 +25,7 @@ import {
type SpaceMessageConversation,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -641,7 +642,7 @@ export const SpaceMessagesPage: React.FC<SpaceMessagesPageProps> = ({
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={messagesBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -650,7 +651,7 @@ export const SpaceMessagesPage: React.FC<SpaceMessagesPageProps> = ({
if (!actorSpaceId) {
return (
<SpaceRouteFallback
- background={messagesBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -658,7 +659,7 @@ export const SpaceMessagesPage: React.FC<SpaceMessagesPageProps> = ({
return (
<>
- <SpacePageMeta themeColor={messagesBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<MessagesScreen
conversations={conversations}
friendsCount={conversationFriends.length}
diff --git a/web/apps/space/src/components/MobileBestToast.tsx b/web/apps/space/src/components/MobileBestToast.tsx
index 4ddad716a6..0e0ed14e3f 100644
--- a/web/apps/space/src/components/MobileBestToast.tsx
+++ b/web/apps/space/src/components/MobileBestToast.tsx
@@ -5,6 +5,7 @@ import {
import { HugeiconsIcon } from "@hugeicons/react";
import { Box } from "@mui/material";
import React from "react";
+import { spaceSurface, spaceText } from "styles/colors";
const green = "#08C225";
const dismissedKey = "spaceMobileBestToastDismissed";
@@ -24,11 +25,11 @@ export const SpaceMobileBestToast: React.FC = () => {
aria-live="polite"
sx={{
alignItems: "center",
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "18px",
boxShadow: "0 12px 32px rgba(0, 0, 0, 0.18)",
boxSizing: "border-box",
- color: "#000000",
+ color: spaceText,
display: { xs: "none", sm: "flex" },
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 14,
@@ -80,7 +81,7 @@ export const SpaceMobileBestToast: React.FC = () => {
appearance: "none",
bgcolor: "transparent",
border: 0,
- color: "#000000",
+ color: spaceText,
cursor: "pointer",
display: "flex",
flexShrink: 0,
@@ -90,7 +91,7 @@ export const SpaceMobileBestToast: React.FC = () => {
p: 0,
width: 40,
"&:focus-visible": {
- outline: "2px solid rgba(0 0 0 / 0.72)",
+ outline: "2px solid rgba(255 255 255 / 0.72)",
outlineOffset: 2,
},
}}
diff --git a/web/apps/space/src/components/NotificationPermissionInstructions.tsx b/web/apps/space/src/components/NotificationPermissionInstructions.tsx
index 68ec1e212f..bef1a4d73a 100644
--- a/web/apps/space/src/components/NotificationPermissionInstructions.tsx
+++ b/web/apps/space/src/components/NotificationPermissionInstructions.tsx
@@ -2,10 +2,16 @@ 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";
const green = "#08C225";
-const textBase = "#000";
-const textSoft = "#777777";
+const textBase = spaceText;
+const textSoft = spaceTextMuted;
interface SpaceNotificationPermissionInstructionsProps {
mode?: "brave-push" | "permission";
@@ -53,7 +59,7 @@ export const SpaceNotificationPermissionInstructions: React.FC<
slotProps={{
paper: {
sx: {
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "0 -18px 44px rgba(0, 0, 0, 0.18)",
@@ -122,7 +128,7 @@ export const SpaceNotificationPermissionInstructions: React.FC<
key={step}
sx={{
alignItems: "center",
- bgcolor: "#FAFAFA",
+ bgcolor: spaceSurfaceHover,
borderRadius: "18px",
color: textSoft,
display: "flex",
diff --git a/web/apps/space/src/components/OtpInput.tsx b/web/apps/space/src/components/OtpInput.tsx
index 140cdbe41c..e1e5ee4ce2 100644
--- a/web/apps/space/src/components/OtpInput.tsx
+++ b/web/apps/space/src/components/OtpInput.tsx
@@ -1,5 +1,6 @@
import { Box } from "@mui/material";
import React from "react";
+import { spaceSurface } from "styles/colors";
import { sanitizeSpaceOTP, spaceOTPCodeLength } from "utils/otp";
const green = "#08C225";
@@ -241,7 +242,7 @@ export const SpaceOtpInput = React.forwardRef<
key={index}
sx={{
alignItems: "center",
- bgcolor: active ? activeFill : "white",
+ bgcolor: active ? activeFill : spaceSurface,
border:
typed || active
? `2px solid ${green}`
diff --git a/web/apps/space/src/components/PWAInstallPrompt.tsx b/web/apps/space/src/components/PWAInstallPrompt.tsx
index 8a8243c940..16b3342226 100644
--- a/web/apps/space/src/components/PWAInstallPrompt.tsx
+++ b/web/apps/space/src/components/PWAInstallPrompt.tsx
@@ -16,11 +16,17 @@ import { SpaceNotificationPermissionInstructions } from "components/Notification
import { useSpacePWAInstallPrompt } from "hooks/use-pwa-install-prompt";
import { useSpaceWebPushPrompt } from "hooks/use-web-push-prompt";
import React from "react";
+import {
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
const green = "#08C225";
-const textBase = "#000";
-const textSoft = "#777777";
+const textBase = spaceText;
+const textSoft = spaceTextMuted;
const authenticatedSessionSeenKey = "space.prompts.authenticatedSessionSeen";
const automaticPromptClaimedKey = "space.prompts.automaticClaimed";
@@ -224,7 +230,7 @@ export const SpacePWAPromptBanner: React.FC<SpacePWAPromptBannerProps> = ({
aria-live="polite"
sx={{
alignItems: "center",
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "18px",
boxShadow: "0 12px 32px rgba(0, 0, 0, 0.18)",
color: textBase,
@@ -485,7 +491,7 @@ export const SpacePWAInstallInstructions: React.FC<
slotProps={{
paper: {
sx: {
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "0 -18px 44px rgba(0, 0, 0, 0.18)",
@@ -606,7 +612,7 @@ const InstallInstructionStep: React.FC<InstallStep> = ({ icon, text }) => (
<Box
sx={{
alignItems: "center",
- bgcolor: "#FAFAFA",
+ bgcolor: spaceSurfaceHover,
borderRadius: "18px",
color: textSoft,
display: "flex",
diff --git a/web/apps/space/src/components/ProfileImagePages.tsx b/web/apps/space/src/components/ProfileImagePages.tsx
index 31f1087e6f..a8caaa85c2 100644
--- a/web/apps/space/src/components/ProfileImagePages.tsx
+++ b/web/apps/space/src/components/ProfileImagePages.tsx
@@ -7,9 +7,9 @@ import {
EditProfilePhotoScreen,
} from "screens/EditProfilePhotoScreen";
import { ProfileImageViewerScreen } from "screens/ProfileImageViewerScreen";
-import { profileBackground } from "screens/ProfileScreen";
import { saveSpaceProfile, spaceProfileErrorMessage } from "services/profile";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import {
type ProfileImageFlowSource,
@@ -61,7 +61,7 @@ export const SpaceProfileImageViewerPage: React.FC<{
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -69,7 +69,7 @@ export const SpaceProfileImageViewerPage: React.FC<{
return (
<>
- <SpacePageMeta themeColor={profileBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<ProfileImageViewerScreen
profile={profile}
variant={variant}
@@ -124,7 +124,7 @@ export const SpaceProfileImageEditPage: React.FC<{
if (profileLoadStatus != "ready" || !profile || !pendingFile) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -166,7 +166,7 @@ export const SpaceProfileImageEditPage: React.FC<{
return (
<>
- <SpacePageMeta themeColor={profileBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
{variant == "cover" ? (
<EditProfileCoverScreen
coverFile={pendingFile}
diff --git a/web/apps/space/src/components/RouteFallback.tsx b/web/apps/space/src/components/RouteFallback.tsx
index 485a6f801a..1efdfcab4b 100644
--- a/web/apps/space/src/components/RouteFallback.tsx
+++ b/web/apps/space/src/components/RouteFallback.tsx
@@ -1,6 +1,7 @@
import { Box } from "@mui/material";
import { SpacePageMeta } from "components/PageMeta";
import React from "react";
+import { spaceAppBackground, spaceText } from "styles/colors";
interface SpaceRouteFallbackProps {
background: string;
@@ -49,7 +50,7 @@ export const SpaceRouteFallback: React.FC<SpaceRouteFallbackProps> = ({
<Box
sx={{
alignItems: "center",
- bgcolor: background,
+ background: spaceAppBackground,
display: "grid",
minHeight: "100svh",
placeItems: "center",
@@ -62,7 +63,7 @@ export const SpaceRouteFallback: React.FC<SpaceRouteFallbackProps> = ({
<Box
role="alert"
sx={{
- color: "#111111",
+ color: spaceText,
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 14,
fontWeight: 600,
diff --git a/web/apps/space/src/components/ShareLinkDialog.tsx b/web/apps/space/src/components/ShareLinkDialog.tsx
index cf7161b14a..048930fd22 100644
--- a/web/apps/space/src/components/ShareLinkDialog.tsx
+++ b/web/apps/space/src/components/ShareLinkDialog.tsx
@@ -6,6 +6,7 @@ import {
onOpenSpaceShareLinkDialog,
type SpaceShareLinkDialogMode,
} from "services/share-link";
+import { spaceSurface, spaceText, spaceTextMuted } from "styles/colors";
const green = "#08C225";
const dangerColor = "#F63A3A";
@@ -92,7 +93,7 @@ export const SpaceShareLinkDialogHost: React.FC = () => {
slotProps={{
paper: {
sx: {
- bgcolor: "#FAFAFA",
+ bgcolor: spaceSurface,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
@@ -127,6 +128,7 @@ export const SpaceShareLinkDialogHost: React.FC = () => {
<Box
component="h2"
sx={{
+ color: spaceText,
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 15,
fontWeight: 600,
@@ -140,7 +142,7 @@ export const SpaceShareLinkDialogHost: React.FC = () => {
</Box>
<Box
sx={{
- color: "#666",
+ color: spaceTextMuted,
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 13,
lineHeight: "18px",
diff --git a/web/apps/space/src/pages/_app.tsx b/web/apps/space/src/pages/_app.tsx
index dad43ade1c..ecec31f8c7 100644
--- a/web/apps/space/src/pages/_app.tsx
+++ b/web/apps/space/src/pages/_app.tsx
@@ -16,10 +16,18 @@ 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 "styles/globals.css";
const spaceTheme = createTheme(shareTheme, {
components: {
+ MuiCssBaseline: {
+ styleOverrides: {
+ html: { backgroundColor: spaceAppBackgroundColor },
+ body: { background: spaceAppBackground },
+ "#__next": { minHeight: "100svh" },
+ },
+ },
MuiDialog: {
styleOverrides: {
root: {
diff --git a/web/apps/space/src/pages/add-profile-photo.tsx b/web/apps/space/src/pages/add-profile-photo.tsx
index c242fa0676..453a2610ac 100644
--- a/web/apps/space/src/pages/add-profile-photo.tsx
+++ b/web/apps/space/src/pages/add-profile-photo.tsx
@@ -3,10 +3,10 @@ import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
import { SetupProfilePhotoScreen } from "screens/SetupProfilePhotoScreen";
-import { setupProfileBackground } from "screens/SetupProfileScreen";
import { savedPendingSpaceInvite } from "services/invite";
import { saveSpaceProfile, spaceProfileErrorMessage } from "services/profile";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { sendPendingSpaceFriendRequest } from "utils/pending-friend-request";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -49,7 +49,7 @@ const Page: React.FC = () => {
if (profileLoadStatus != "ready" || profile || !pendingCreateProfile) {
return (
<SpaceRouteFallback
- background={setupProfileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -57,7 +57,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={setupProfileBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<SetupProfilePhotoScreen
errorMessage={setupError}
isSubmitting={isSubmitting}
diff --git a/web/apps/space/src/pages/app/friends/index.tsx b/web/apps/space/src/pages/app/friends/index.tsx
index 7151c19130..a52533a61f 100644
--- a/web/apps/space/src/pages/app/friends/index.tsx
+++ b/web/apps/space/src/pages/app/friends/index.tsx
@@ -3,7 +3,7 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect } from "react";
-import { FriendsScreen, friendsBackground } from "screens/FriendsScreen";
+import { FriendsScreen } from "screens/FriendsScreen";
import { removeCachedSpaceHomePostsBySpace } from "services/home-posts";
import { spaceInviteURL } from "services/invite";
import {
@@ -19,6 +19,7 @@ import {
type SpaceFriendRequest,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -76,7 +77,7 @@ const Page: React.FC = () => {
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={friendsBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -84,7 +85,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={friendsBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<FriendsScreen
friendRequests={friendRequests}
friends={friends}
diff --git a/web/apps/space/src/pages/app/index.tsx b/web/apps/space/src/pages/app/index.tsx
index 5693cbfe47..d2b1fff0e9 100644
--- a/web/apps/space/src/pages/app/index.tsx
+++ b/web/apps/space/src/pages/app/index.tsx
@@ -2,7 +2,7 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
-import { HomeScreen, homeBackground } from "screens/HomeScreen";
+import { HomeScreen } from "screens/HomeScreen";
import {
loadSpaceHomePosts,
patchCachedSpaceHomePost,
@@ -21,6 +21,7 @@ import {
type SpacePost,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { prepareSpacePostImageFromEdit } from "utils/post-image";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -162,7 +163,7 @@ const Page: React.FC = () => {
) {
return (
<SpaceRouteFallback
- background={homeBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -170,7 +171,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={homeBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<HomeScreen
latestPosts={latestPosts}
unreadPosts={unreadPosts}
diff --git a/web/apps/space/src/pages/app/post.tsx b/web/apps/space/src/pages/app/post.tsx
index f29afd4b3b..e5640497e0 100644
--- a/web/apps/space/src/pages/app/post.tsx
+++ b/web/apps/space/src/pages/app/post.tsx
@@ -7,15 +7,21 @@ import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React from "react";
import { useSpaceAppState } from "state/app-state";
+import {
+ spaceAppBackground,
+ spaceAppBackgroundColor,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { spacePostImageInputAccept } from "utils/post-image";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
-const background = "#F5F5F7";
+const background = spaceAppBackgroundColor;
const green = "#08C225";
-const textBase = "#000000";
-const textSecondary = "#6B6B6B";
+const textBase = spaceText;
+const textSecondary = spaceTextMuted;
const Page: React.FC = () => {
const router = useSpaceRouter();
@@ -65,7 +71,7 @@ const Page: React.FC = () => {
<Box
component="main"
sx={{
- bgcolor: background,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
diff --git a/web/apps/space/src/pages/app/posts/[spaceId]/[postId].tsx b/web/apps/space/src/pages/app/posts/[spaceId]/[postId].tsx
index b679d25949..e38c906234 100644
--- a/web/apps/space/src/pages/app/posts/[spaceId]/[postId].tsx
+++ b/web/apps/space/src/pages/app/posts/[spaceId]/[postId].tsx
@@ -14,6 +14,7 @@ import {
type SpacePost,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -162,7 +163,7 @@ const Page: React.FC = () => {
) {
return (
<SpaceRouteFallback
- background="#FFFFFF"
+ background={spaceAppBackgroundColor}
message={postLoadError || profileLoadError}
/>
);
@@ -171,7 +172,7 @@ const Page: React.FC = () => {
if (!actorSpaceId) {
return (
<SpaceRouteFallback
- background="#FFFFFF"
+ background={spaceAppBackgroundColor}
message={postLoadError || profileLoadError}
/>
);
diff --git a/web/apps/space/src/pages/app/profile.tsx b/web/apps/space/src/pages/app/profile.tsx
index cca5d4950a..731bfab8e7 100644
--- a/web/apps/space/src/pages/app/profile.tsx
+++ b/web/apps/space/src/pages/app/profile.tsx
@@ -2,7 +2,7 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useMemo, useState } from "react";
-import { ProfileScreen, profileBackground } from "screens/ProfileScreen";
+import { ProfileScreen } from "screens/ProfileScreen";
import { spaceInviteURL } from "services/invite";
import {
createCurrentPhotoPost,
@@ -15,6 +15,7 @@ import {
type SpaceProfilePost,
} from "services/space";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { profilePostItemsFromPosts } from "utils/post-display";
import { prepareSpacePostImageFromEdit } from "utils/post-image";
import { useSpaceRouter } from "utils/route-transitions";
@@ -94,7 +95,7 @@ const Page: React.FC = () => {
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -103,7 +104,7 @@ const Page: React.FC = () => {
if (!actorSpaceId) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -111,7 +112,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={profileBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<ProfileScreen
friendsCount={friendsCount}
isPostsLoading={isPostsLoading}
diff --git a/web/apps/space/src/pages/app/settings.tsx b/web/apps/space/src/pages/app/settings.tsx
index ed23a6d1fb..60285b03df 100644
--- a/web/apps/space/src/pages/app/settings.tsx
+++ b/web/apps/space/src/pages/app/settings.tsx
@@ -1,9 +1,10 @@
import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import React, { useEffect } from "react";
-import { SettingsScreen, settingsBackground } from "screens/SettingsScreen";
+import { SettingsScreen } from "screens/SettingsScreen";
import { spaceLogout } from "services/logout";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -21,7 +22,7 @@ const Page: React.FC = () => {
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={settingsBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -29,7 +30,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={settingsBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<SettingsScreen
onBack={() => void router.push(spaceRoutes.profile)}
onChangeCoverImage={() =>
diff --git a/web/apps/space/src/pages/app/settings/profile/name.tsx b/web/apps/space/src/pages/app/settings/profile/name.tsx
index 27abddcef1..dffe6a0ff5 100644
--- a/web/apps/space/src/pages/app/settings/profile/name.tsx
+++ b/web/apps/space/src/pages/app/settings/profile/name.tsx
@@ -2,12 +2,10 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
-import {
- ChangeNameSettingsScreen,
- settingsBackground,
-} from "screens/SettingsScreen";
+import { ChangeNameSettingsScreen } from "screens/SettingsScreen";
import { saveSpaceProfile, spaceProfileErrorMessage } from "services/profile";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -27,7 +25,7 @@ const Page: React.FC = () => {
if (profileLoadStatus != "ready" || !profile) {
return (
<SpaceRouteFallback
- background={settingsBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -35,7 +33,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={settingsBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<ChangeNameSettingsScreen
errorMessage={errorMessage}
initialName={profile.fullName}
diff --git a/web/apps/space/src/pages/create-profile.tsx b/web/apps/space/src/pages/create-profile.tsx
index 97a75680c4..e147288fe7 100644
--- a/web/apps/space/src/pages/create-profile.tsx
+++ b/web/apps/space/src/pages/create-profile.tsx
@@ -2,16 +2,14 @@ import { SpacePageMeta } from "components/PageMeta";
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
-import {
- SetupProfileScreen,
- setupProfileBackground,
-} from "screens/SetupProfileScreen";
+import { SetupProfileScreen } from "screens/SetupProfileScreen";
import { savedSpaceSessionToken } from "services/persistent-session";
import {
spaceUsernameAvailability,
spaceUsernameValidationError,
} from "services/profile";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { sendPendingSpaceFriendRequest } from "utils/pending-friend-request";
import { useSpaceRouter } from "utils/route-transitions";
import { createProfileSourceFromQuery, spaceRoutes } from "utils/routes";
@@ -98,7 +96,7 @@ const Page: React.FC = () => {
if (!hasSpaceSession || profileLoadStatus != "ready" || profile) {
return (
<SpaceRouteFallback
- background={setupProfileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -106,7 +104,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={setupProfileBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<SetupProfileScreen
initialProfile={pendingCreateProfile}
onBack={() =>
diff --git a/web/apps/space/src/pages/index.tsx b/web/apps/space/src/pages/index.tsx
index 77919a166a..8fd4a32719 100644
--- a/web/apps/space/src/pages/index.tsx
+++ b/web/apps/space/src/pages/index.tsx
@@ -8,7 +8,7 @@ import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useMemo, useState } from "react";
import { OnboardingScreen, onboardingGreen } from "screens/OnboardingScreen";
-import { ProfileScreen, profileBackground } from "screens/ProfileScreen";
+import { ProfileScreen } from "screens/ProfileScreen";
import {
clearPendingSpaceInvite,
clearPendingSpaceInviteFriend,
@@ -34,6 +34,7 @@ import {
type SpaceProfilePost,
} from "services/space";
import { useSpaceAppState, type OnboardingEntrySource } from "state/app-state";
+import { spaceAppBackground, spaceAppBackgroundColor } from "styles/colors";
import { profilePostItemsFromPosts } from "utils/post-display";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -125,7 +126,7 @@ const PublicFriendRequestScreen: React.FC<PublicFriendRequestScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: "white",
+ background: spaceAppBackground,
boxSizing: "border-box",
display: "grid",
minHeight: "100svh",
@@ -522,7 +523,7 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
if (hasProfileLoadError) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
message={profileLoadError}
/>
);
@@ -535,7 +536,7 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
) {
return (
<SpaceRouteFallback
- background={profileBackground}
+ background={spaceAppBackgroundColor}
preview={invitePreview ? "invite" : "home"}
/>
);
@@ -546,7 +547,7 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
return (
<>
<SpacePageMeta
- themeColor={profileBackground}
+ themeColor={spaceAppBackgroundColor}
preview="invite"
/>
<PublicProfileUnavailable />
@@ -558,7 +559,7 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
profileLoadStatus == "loading" ||
(profile && authenticatedProfileRouteStatus != "complete")
) {
- return <SpaceRouteFallback background={profileBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
if (authenticatedProfileRoute == "friend" && publicIdentity) {
@@ -571,11 +572,11 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
}
if (authenticatedProfileRoute == "self") {
- return <SpaceRouteFallback background={profileBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
if (!publicIdentity) {
- return <SpaceRouteFallback background={profileBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
const inviteFriend = {
@@ -629,7 +630,7 @@ export const Page: React.FC<PageProps> = ({ invitePreview }) => {
return (
<>
<SpacePageMeta
- themeColor={profileBackground}
+ themeColor={spaceAppBackgroundColor}
preview="invite"
/>
{publicLink ? (
diff --git a/web/apps/space/src/pages/layout-demo.tsx b/web/apps/space/src/pages/layout-demo.tsx
index ecfd2d7f25..e2f0737f74 100644
--- a/web/apps/space/src/pages/layout-demo.tsx
+++ b/web/apps/space/src/pages/layout-demo.tsx
@@ -5,6 +5,7 @@ import { SpaceAvatarImage } from "components/AvatarImage";
import { SpacePostFloatingActionButton } from "components/PostFloatingActionButton";
import { SpacePostUnreadBadge } from "components/PostUnreadBadge";
import React from "react";
+import { spaceAppBackground } from "styles/colors";
import {
homeCircleGridLayout,
homeCirclePlacements,
@@ -12,7 +13,6 @@ import {
type HomeCirclePlacement,
} from "utils/home-circle-layout";
-const background = "#0C1014";
const headerChromeColor = "#202825";
const headerHeight = 64;
const layoutVerticalInset =
@@ -127,7 +127,7 @@ const LayoutDemoPage: React.FC = () => {
<Box
component="main"
sx={{
- bgcolor: background,
+ background: spaceAppBackground,
color: "#FFF",
height: "100svh",
overflow: "hidden",
diff --git a/web/apps/space/src/pages/login.tsx b/web/apps/space/src/pages/login.tsx
index a602047f14..7459c1d83e 100644
--- a/web/apps/space/src/pages/login.tsx
+++ b/web/apps/space/src/pages/login.tsx
@@ -1,14 +1,11 @@
import { SpacePageMeta } from "components/PageMeta";
import React, { useState } from "react";
-import {
- LoginScreen,
- loginBackground,
- type SpaceLoginCredentials,
-} from "screens/LoginScreen";
+import { LoginScreen, type SpaceLoginCredentials } from "screens/LoginScreen";
import { spaceAuthErrorMessage } from "services/auth-error";
import { beginSpaceLogin, type SpaceLoginResult } from "services/login";
import { savePendingSpacePasskeyVerification } from "services/passkey-verification";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { routeAfterCompletedLogin } from "utils/login-navigation";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -62,7 +59,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={loginBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<LoginScreen
errorMessage={loginError}
isSubmitting={isSubmitting}
diff --git a/web/apps/space/src/pages/passkeys/finish.tsx b/web/apps/space/src/pages/passkeys/finish.tsx
index 7b30629446..3f05daa830 100644
--- a/web/apps/space/src/pages/passkeys/finish.tsx
+++ b/web/apps/space/src/pages/passkeys/finish.tsx
@@ -1,10 +1,10 @@
import { SpaceRouteFallback } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useRef } from "react";
-import { verifyEmailBackground } from "screens/VerifyEmailScreen";
import { completeSpaceLoginPasskey } from "services/login";
import { clearPendingSpacePasskeyVerification } from "services/passkey-verification";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { routeAfterCompletedLogin } from "utils/login-navigation";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -45,7 +45,7 @@ const Page: React.FC = () => {
})();
}, [refreshProfile, router, setPendingPasskeyVerification]);
- return <SpaceRouteFallback background={verifyEmailBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
};
export default Page;
diff --git a/web/apps/space/src/pages/passkeys/verify.tsx b/web/apps/space/src/pages/passkeys/verify.tsx
index f650d1fb22..964ddac0da 100644
--- a/web/apps/space/src/pages/passkeys/verify.tsx
+++ b/web/apps/space/src/pages/passkeys/verify.tsx
@@ -6,7 +6,6 @@ import log from "ente-base/log";
import React, { useEffect, useState } from "react";
import {
PasskeyVerificationScreen,
- passkeyVerificationBackground,
type PasskeyVerificationStatus,
} from "screens/PasskeyVerificationScreen";
import { spaceAuthErrorMessage } from "services/auth-error";
@@ -22,6 +21,7 @@ import {
type PendingSpacePasskeyVerification,
} from "services/passkey-verification";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { routeAfterCompletedLogin } from "utils/login-navigation";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -110,14 +110,12 @@ const Page: React.FC = () => {
};
if (!verification) {
- return (
- <SpaceRouteFallback background={passkeyVerificationBackground} />
- );
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
return (
<>
- <SpacePageMeta themeColor={passkeyVerificationBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<PasskeyVerificationScreen
canUseTwoFactor={verification.hasTwoFactorFallback}
errorMessage={errorMessage}
diff --git a/web/apps/space/src/pages/signup.tsx b/web/apps/space/src/pages/signup.tsx
index 7732126d05..df4885fe6b 100644
--- a/web/apps/space/src/pages/signup.tsx
+++ b/web/apps/space/src/pages/signup.tsx
@@ -2,11 +2,11 @@ import { SpacePageMeta } from "components/PageMeta";
import React, { useState } from "react";
import {
CreateAccountScreen,
- createAccountBackground,
type CreateAccountInput,
} from "screens/CreateAccountScreen";
import { beginSpaceSignup, spaceSignupErrorMessage } from "services/signup";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -32,7 +32,7 @@ const Page: React.FC = () => {
return (
<>
- <SpacePageMeta themeColor={createAccountBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<CreateAccountScreen
errorMessage={signupError}
isSubmitting={isSubmitting}
diff --git a/web/apps/space/src/pages/two-factor/verify.tsx b/web/apps/space/src/pages/two-factor/verify.tsx
index 34e22057ab..d3227dab43 100644
--- a/web/apps/space/src/pages/two-factor/verify.tsx
+++ b/web/apps/space/src/pages/two-factor/verify.tsx
@@ -4,13 +4,11 @@ import { savedPartialLocalUser } from "ente-accounts/services/accounts-db";
import { isHTTPErrorWithStatus } from "ente-base/http";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
-import {
- VerifyTwoFactorScreen,
- verifyTwoFactorBackground,
-} from "screens/VerifyTwoFactorScreen";
+import { VerifyTwoFactorScreen } from "screens/VerifyTwoFactorScreen";
import { spaceAuthErrorMessage } from "services/auth-error";
import { completeSpaceLoginSecondFactor } from "services/login";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { routeAfterCompletedLogin } from "utils/login-navigation";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes } from "utils/routes";
@@ -70,12 +68,12 @@ const Page: React.FC = () => {
};
if (!twoFactorSessionID) {
- return <SpaceRouteFallback background={verifyTwoFactorBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
return (
<>
- <SpacePageMeta themeColor={verifyTwoFactorBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<VerifyTwoFactorScreen
codeResetKey={codeResetKey}
errorMessage={errorMessage}
diff --git a/web/apps/space/src/pages/verify.tsx b/web/apps/space/src/pages/verify.tsx
index 0fbfbe94bc..8bef10b35b 100644
--- a/web/apps/space/src/pages/verify.tsx
+++ b/web/apps/space/src/pages/verify.tsx
@@ -3,10 +3,7 @@ import { SpaceRouteFallback } from "components/RouteFallback";
import { isHTTPErrorWithStatus } from "ente-base/http";
import log from "ente-base/log";
import React, { useEffect, useState } from "react";
-import {
- VerifyEmailScreen,
- verifyEmailBackground,
-} from "screens/VerifyEmailScreen";
+import { VerifyEmailScreen } from "screens/VerifyEmailScreen";
import { spaceAuthErrorMessage } from "services/auth-error";
import {
completeSpaceLoginEmailVerification,
@@ -18,6 +15,7 @@ import {
import { savePendingSpacePasskeyVerification } from "services/passkey-verification";
import { completeSpaceSignup, resendSpaceSignupCode } from "services/signup";
import { useSpaceAppState } from "state/app-state";
+import { spaceAppBackgroundColor } from "styles/colors";
import { routeAfterCompletedLogin } from "utils/login-navigation";
import { useSpaceRouter } from "utils/route-transitions";
import { spaceRoutes, verifyFlowFromQuery } from "utils/routes";
@@ -205,12 +203,12 @@ const Page: React.FC = () => {
};
if (!router.isReady || !email) {
- return <SpaceRouteFallback background={verifyEmailBackground} />;
+ return <SpaceRouteFallback background={spaceAppBackgroundColor} />;
}
return (
<>
- <SpacePageMeta themeColor={verifyEmailBackground} />
+ <SpacePageMeta themeColor={spaceAppBackgroundColor} />
<VerifyEmailScreen
codeResetKey={codeResetKey}
email={email}
diff --git a/web/apps/space/src/screens/CreateAccountScreen.tsx b/web/apps/space/src/screens/CreateAccountScreen.tsx
index 79ea5ef09e..6464ce86d9 100644
--- a/web/apps/space/src/screens/CreateAccountScreen.tsx
+++ b/web/apps/space/src/screens/CreateAccountScreen.tsx
@@ -6,13 +6,17 @@ import {
type PasswordStrength,
} from "ente-accounts/utils/password";
import React, { useId, useMemo, useState } from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const createAccountBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const textLight = "#969696";
+const textBase = spaceText;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
const caution = "#B65F00";
const createAccountFormID = "space-create-account-form";
@@ -203,7 +207,7 @@ const TextInput: React.FC<TextInputProps> = ({
<Box
sx={{
alignItems: "center",
- bgcolor: "white",
+ bgcolor: spaceSurface,
borderRadius: "16px",
display: "flex",
height: 52,
@@ -333,7 +337,7 @@ export const CreateAccountScreen: React.FC<CreateAccountScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: createAccountBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -343,7 +347,7 @@ export const CreateAccountScreen: React.FC<CreateAccountScreenProps> = ({
>
<Box
sx={{
- bgcolor: createAccountBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -592,7 +596,7 @@ export const CreateAccountScreen: React.FC<CreateAccountScreenProps> = ({
<Box
sx={{
- bgcolor: createAccountBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
display: "flex",
@@ -622,7 +626,7 @@ export const CreateAccountScreen: React.FC<CreateAccountScreenProps> = ({
alignItems: "center",
bgcolor: isCreateAccountButtonActive
? green
- : "#F5F5F5",
+ : spaceSurface,
border: 0,
borderRadius: "20px",
color: isCreateAccountButtonActive
diff --git a/web/apps/space/src/screens/EditProfilePhotoScreen.tsx b/web/apps/space/src/screens/EditProfilePhotoScreen.tsx
index a0deb72c8d..3e09aa68b3 100644
--- a/web/apps/space/src/screens/EditProfilePhotoScreen.tsx
+++ b/web/apps/space/src/screens/EditProfilePhotoScreen.tsx
@@ -6,7 +6,7 @@ import { SpaceLoadingSpinner } from "components/RouteFallback";
import log from "ente-base/log";
import React, { useEffect, useRef, useState } from "react";
import type { Area, Point } from "react-easy-crop";
-import { profileBackground } from "screens/ProfileScreen";
+import { spaceAppBackground, spaceText } from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import {
prepareSpaceAvatarImageFromCrop,
@@ -21,7 +21,7 @@ import {
} from "utils/post-image";
const green = "#08C225";
-const textBase = "#000";
+const textBase = spaceText;
const warning = "#F63A3A";
interface AvatarCropImage {
@@ -48,7 +48,7 @@ const EditProfilePhotoShell: React.FC<
<Box
component="main"
sx={{
- bgcolor: profileBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -58,7 +58,7 @@ const EditProfilePhotoShell: React.FC<
>
<Box
sx={{
- bgcolor: profileBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -359,7 +359,6 @@ export const EditProfilePhotoScreen: React.FC<EditProfilePhotoScreenProps> = ({
<>
{avatarFileInput}
<SpaceAvatarCropPage
- background={profileBackground}
crop={avatarCrop}
errorMessage={avatarError}
headerVariant="app"
diff --git a/web/apps/space/src/screens/FriendsScreen.tsx b/web/apps/space/src/screens/FriendsScreen.tsx
index 3c603719a5..e7af6d3591 100644
--- a/web/apps/space/src/screens/FriendsScreen.tsx
+++ b/web/apps/space/src/screens/FriendsScreen.tsx
@@ -33,15 +33,21 @@ import {
spaceUsernameValidationError,
} from "services/profile";
import type { SpaceFriendRequest } from "services/space";
+import {
+ spaceAppBackground,
+ spaceAppBackgroundColor,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const friendsBackground = "#FFFFFF";
-
const green = "#08C225";
-const avatarSkeletonBackground = "#E6E6E6";
-const textBase = "#000";
-const textStrong = "#303030";
-const textSoft = "#777777";
+const avatarSkeletonBackground = spaceSurface;
+const textBase = spaceText;
+const textStrong = spaceText;
+const textSoft = spaceTextMuted;
const dangerColor = "#F63A3A";
const friendAvatarLoadRootMargin = "800px 0px";
@@ -328,6 +334,7 @@ const FriendRow: React.FC<FriendRowProps> = ({
slotProps={{
paper: {
sx: {
+ bgcolor: spaceSurface,
borderRadius: "14px",
boxShadow: "0 14px 40px rgba(0, 0, 0, 0.16)",
mt: "6px",
@@ -353,10 +360,12 @@ const FriendRow: React.FC<FriendRowProps> = ({
py: "4px",
whiteSpace: "nowrap",
"&.Mui-focusVisible": {
- bgcolor: "rgba(0, 0, 0, 0.04)",
+ bgcolor: "rgba(255, 255, 255, 0.06)",
+ },
+ "&:active": {
+ bgcolor: "rgba(255, 255, 255, 0.06)",
},
- "&:active": { bgcolor: "rgba(0, 0, 0, 0.04)" },
- "&:hover": { bgcolor: "rgba(0, 0, 0, 0.04)" },
+ "&:hover": { bgcolor: "rgba(255, 255, 255, 0.06)" },
}}
>
<HugeiconsIcon
@@ -545,7 +554,7 @@ const FriendRequestRow: React.FC<FriendRequestRowProps> = ({
},
"&:hover": isBusy
? undefined
- : { bgcolor: "#F1F1F1" },
+ : { bgcolor: spaceSurfaceHover },
}}
>
{action == "delete" ? (
@@ -571,7 +580,7 @@ const FriendRequestRow: React.FC<FriendRequestRowProps> = ({
onClick={() => runAction("delete", onDelete)}
sx={{
alignItems: "center",
- bgcolor: "#F2F2F2",
+ bgcolor: spaceSurface,
border: 0,
borderRadius: "12px",
color: textBase,
@@ -591,7 +600,7 @@ const FriendRequestRow: React.FC<FriendRequestRowProps> = ({
},
"&:hover": isBusy
? undefined
- : { bgcolor: "#E8E8E8" },
+ : { bgcolor: spaceSurfaceHover },
}}
>
{action == "delete" ? (
@@ -728,7 +737,7 @@ const AddFriendSheet: React.FC<AddFriendSheetProps> = ({
slotProps={{
paper: {
sx: {
- bgcolor: "#FAFAFA",
+ bgcolor: spaceAppBackgroundColor,
borderRadius: "28px 28px 0 0",
bottom: 0,
boxShadow: "none",
@@ -791,7 +800,7 @@ const AddFriendSheet: React.FC<AddFriendSheetProps> = ({
</Box>
<Box
sx={{
- color: "#666666",
+ color: textSoft,
fontFamily: '"Inter Variable", Inter, sans-serif',
fontSize: 13,
lineHeight: "18px",
@@ -808,7 +817,7 @@ const AddFriendSheet: React.FC<AddFriendSheetProps> = ({
<Box
sx={{
alignItems: "center",
- bgcolor: "#F2F2F2",
+ bgcolor: spaceSurface,
border: `1px solid ${errorMessage ? dangerColor : "transparent"}`,
borderRadius: "14px",
display: "flex",
@@ -870,7 +879,10 @@ const AddFriendSheet: React.FC<AddFriendSheetProps> = ({
minWidth: 0,
outline: 0,
p: 0,
- "&::placeholder": { color: "#888", opacity: 1 },
+ "&::placeholder": {
+ color: textSoft,
+ opacity: 1,
+ },
}}
/>
</Box>
@@ -1049,7 +1061,7 @@ export const FriendsScreen: React.FC<FriendsScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: friendsBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
boxSizing: "border-box",
@@ -1060,7 +1072,7 @@ export const FriendsScreen: React.FC<FriendsScreenProps> = ({
>
<Box
sx={{
- bgcolor: friendsBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
minHeight: "100svh",
mx: "auto",
@@ -1245,7 +1257,7 @@ export const FriendsScreen: React.FC<FriendsScreenProps> = ({
onSharingChange={setIsInviteSharing}
sx={{
alignItems: "center",
- bgcolor: "#E8E8E8",
+ bgcolor: spaceSurface,
border: 0,
borderRadius: "18px",
color: textBase,
@@ -1273,7 +1285,7 @@ export const FriendsScreen: React.FC<FriendsScreenProps> = ({
},
"&:hover":
profileLink && !isInviteSharing
- ? { bgcolor: "#DEDEDE" }
+ ? { bgcolor: spaceSurfaceHover }
: undefined,
}}
/>
diff --git a/web/apps/space/src/screens/HomeScreen.tsx b/web/apps/space/src/screens/HomeScreen.tsx
index a18fb70c1f..190a2e948b 100644
--- a/web/apps/space/src/screens/HomeScreen.tsx
+++ b/web/apps/space/src/screens/HomeScreen.tsx
@@ -28,6 +28,13 @@ import {
type SpacePost,
type SpacePostAssetURLLoader,
} from "services/space";
+import {
+ spaceAppBackground,
+ spaceAppBackgroundColor,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { firstNameFrom } from "utils/display";
import {
@@ -45,11 +52,9 @@ import {
} from "utils/post-image";
import { thumbHashDataURLFromBase64 } from "utils/thumbhash";
-export const homeBackground = "#0C1014";
-
const green = "#08C225";
-const textBase = "#000";
-const textSecondary = "#6B6B6B";
+const textBase = spaceText;
+const textSecondary = spaceTextMuted;
const dangerColor = "#F63A3A";
const headerActionSize = spaceTouchTargetSize;
const headerAvatarSize = 36;
@@ -587,7 +592,7 @@ const AddedFriendToast: React.FC<AddedFriendToastProps> = ({
aria-live="polite"
sx={{
alignItems: "center",
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "18px",
boxShadow: "0 12px 32px rgba(0, 0, 0, 0.18)",
boxSizing: "border-box",
@@ -645,7 +650,7 @@ const AddedFriendToast: React.FC<AddedFriendToastProps> = ({
p: 0,
width: spaceTouchTargetSize,
"&:focus-visible": {
- outline: "2px solid rgba(0 0 0 / 0.72)",
+ outline: "2px solid rgba(255 255 255 / 0.72)",
outlineOffset: 2,
},
}}
@@ -1232,8 +1237,7 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
<Box
component="main"
sx={{
- background:
- "radial-gradient(ellipse 120% 95% at 50% 58%, rgba(38, 78, 52, 0.16), transparent 72%), #0C1014",
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -1281,7 +1285,7 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({
WebkitMaskImage:
"linear-gradient(to bottom, #000 0%, transparent 100%)",
backdropFilter: "blur(4px)",
- background: `linear-gradient(to bottom, ${homeBackground}, rgba(0, 0, 0, 0.35) 75%, transparent)`,
+ background: `linear-gradient(to bottom, ${spaceAppBackgroundColor}, rgba(0, 0, 0, 0.35) 75%, transparent)`,
content: '""',
height: "calc(100% + 28px)",
left: 0,
diff --git a/web/apps/space/src/screens/LoginScreen.tsx b/web/apps/space/src/screens/LoginScreen.tsx
index f92526f37a..17518e33d4 100644
--- a/web/apps/space/src/screens/LoginScreen.tsx
+++ b/web/apps/space/src/screens/LoginScreen.tsx
@@ -2,13 +2,17 @@ import { Box } from "@mui/material";
import { SpaceBackIcon } from "components/BackIcon";
import { SpaceButtonSpinner } from "components/ButtonSpinner";
import React, { useEffect, useRef, useState } from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const loginBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const textLight = "#969696";
+const textBase = spaceText;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
const loginFormID = "space-login-form";
@@ -124,7 +128,7 @@ const TextInput: React.FC<TextInputProps> = ({
<Box
sx={{
alignItems: "center",
- bgcolor: readOnly ? "#F5F5F5" : "white",
+ bgcolor: spaceSurface,
borderRadius: "16px",
display: "flex",
height: 52,
@@ -212,7 +216,7 @@ const FooterLinkButton: React.FC<{
alignItems: "center",
bgcolor: "transparent",
border: 0,
- color: "#666",
+ color: textLight,
cursor: disabled ? "default" : "pointer",
display: "flex",
fontFamily: '"Inter Variable", Inter, sans-serif',
@@ -306,7 +310,7 @@ export const LoginScreen: React.FC<LoginScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: loginBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -315,7 +319,7 @@ export const LoginScreen: React.FC<LoginScreenProps> = ({
>
<Box
sx={{
- bgcolor: loginBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -435,7 +439,7 @@ export const LoginScreen: React.FC<LoginScreenProps> = ({
<Box
sx={{
- bgcolor: loginBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -459,7 +463,9 @@ export const LoginScreen: React.FC<LoginScreenProps> = ({
onPointerDown={handleContinuePointerDown}
sx={{
alignItems: "center",
- bgcolor: isContinueButtonActive ? green : "#F5F5F5",
+ bgcolor: isContinueButtonActive
+ ? green
+ : spaceSurface,
border: 0,
borderRadius: "20px",
color: isContinueButtonActive ? "white" : textLight,
diff --git a/web/apps/space/src/screens/MessagesScreen.tsx b/web/apps/space/src/screens/MessagesScreen.tsx
index af032b4466..4f100f2cf1 100644
--- a/web/apps/space/src/screens/MessagesScreen.tsx
+++ b/web/apps/space/src/screens/MessagesScreen.tsx
@@ -28,28 +28,34 @@ import type {
SpaceMessageConversation,
SpaceMessageQuote,
} from "services/space";
+import {
+ spaceAppBackground,
+ spaceAppBackgroundColor,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { firstNameFrom } from "utils/display";
import { clampSpaceMessageText } from "utils/message-limits";
import { spacePostImageInputAccept } from "utils/post-image";
-export const messagesBackground = "#FFFFFF";
-
const green = "#08C225";
-const textBase = "#000000";
-const textSecondary = "#777777";
-const lightSurface = "#F2F2F2";
-const lightSurfaceHover = "#E8E8E8";
+const textBase = spaceText;
+const textSecondary = spaceTextMuted;
+const lightSurface = spaceSurface;
+const lightSurfaceHover = spaceSurfaceHover;
const composerSurface = lightSurface;
const outgoingBubble = "#0DAF35";
const incomingBubble = lightSurface;
const outgoingMessageText = "#FFFFFF";
-const incomingMessageText = "#111111";
+const incomingMessageText = spaceText;
const outgoingQuoteBubble = "#9EDFAE";
-const incomingQuoteBubble = "#FAFAFA";
-const incomingQuoteText = "#BDBDBD";
+const incomingQuoteBubble = spaceSurfaceHover;
+const incomingQuoteText = spaceTextMuted;
const outgoingQuoteText = "#FFFFFF";
-const quoteRule = "#EEEEEE";
+const quoteRule = "rgba(255, 255, 255, 0.16)";
const dangerColor = "#F63A3A";
const composerHeight = 48;
const composerMaxHeight = 112;
@@ -562,7 +568,7 @@ const ConversationListItem: React.FC<{
alignItems: "center",
bgcolor: dangerColor,
borderRadius: "8px",
- boxShadow: `0 0 0 2px ${messagesBackground}`,
+ boxShadow: `0 0 0 2px ${spaceAppBackgroundColor}`,
color: "#FFFFFF",
display: "inline-flex",
flexShrink: 0,
@@ -967,7 +973,7 @@ const MessageLikeHeartIcon: React.FC = () => (
<path
d="M6.63749 12.3742C4.66259 10.885 0.75 7.4804 0.75 4.41664C0.75 2.39161 2.22368 0.75 4.25 0.75C5.3 0.75 6.35 1.10294 7.75 2.51469C9.15 1.10294 10.2 0.75 11.25 0.75C13.2763 0.75 14.75 2.39161 14.75 4.41664C14.75 7.4804 10.8374 10.885 8.86251 12.3742C8.19793 12.8753 7.30207 12.8753 6.63749 12.3742Z"
fill={green}
- stroke={messagesBackground}
+ stroke={spaceAppBackgroundColor}
strokeWidth="4"
strokeLinecap="round"
strokeLinejoin="round"
@@ -2110,7 +2116,7 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: messagesBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
height: isThreadOpen ? "100dvh" : undefined,
@@ -2122,7 +2128,7 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
>
<Box
sx={{
- bgcolor: "inherit",
+ bgcolor: "transparent",
boxSizing: "border-box",
display: isThreadOpen ? "grid" : undefined,
gridTemplateRows: isThreadOpen
@@ -2526,7 +2532,7 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
sx={{
WebkitTapHighlightColor:
"transparent",
- bgcolor: messagesBackground,
+ bgcolor: "transparent",
borderRadius: "16px",
boxShadow:
"0 14px 40px rgba(0, 0, 0, 0.14)",
@@ -2562,7 +2568,7 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
{!isThreadReadOnly && (
<Box
sx={{
- bgcolor: messagesBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "grid",
gap: "8px",
@@ -2870,7 +2876,7 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
onSharingChange={setIsInviteSharing}
sx={{
alignItems: "center",
- bgcolor: "#F2F2F2",
+ bgcolor: spaceSurface,
border: 0,
borderRadius: "18px",
color: textBase,
@@ -2899,7 +2905,10 @@ export const MessagesScreen: React.FC<MessagesScreenProps> = ({
"&:hover":
profileLink &&
!isInviteSharing
- ? { bgcolor: "#E8E8E8" }
+ ? {
+ bgcolor:
+ spaceSurfaceHover,
+ }
: undefined,
}}
/>
diff --git a/web/apps/space/src/screens/PasskeyVerificationScreen.tsx b/web/apps/space/src/screens/PasskeyVerificationScreen.tsx
index 69c5a50d49..f9f246a6ac 100644
--- a/web/apps/space/src/screens/PasskeyVerificationScreen.tsx
+++ b/web/apps/space/src/screens/PasskeyVerificationScreen.tsx
@@ -2,14 +2,13 @@ import { Box } from "@mui/material";
import { SpaceBackIcon } from "components/BackIcon";
import { SpaceButtonSpinner } from "components/ButtonSpinner";
import React from "react";
+import { spaceAppBackground, spaceText } from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const passkeyVerificationBackground = "#FAFAFA";
-
const green = "#08C225";
const primaryLight = "#DDEEDF";
const primaryDark = "#069D1E";
-const textBase = "#000";
+const textBase = spaceText;
const warning = "#F63A3A";
export type PasskeyVerificationStatus = "waiting" | "checking" | "pending";
@@ -52,7 +51,7 @@ export const PasskeyVerificationScreen: React.FC<
<Box
component="main"
sx={{
- bgcolor: passkeyVerificationBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -62,7 +61,7 @@ export const PasskeyVerificationScreen: React.FC<
>
<Box
sx={{
- bgcolor: passkeyVerificationBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -205,7 +204,7 @@ export const PasskeyVerificationScreen: React.FC<
<Box
sx={{
- bgcolor: passkeyVerificationBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
display: "flex",
diff --git a/web/apps/space/src/screens/ProfileImageViewerScreen.tsx b/web/apps/space/src/screens/ProfileImageViewerScreen.tsx
index 0259bbebf7..fad1c8930f 100644
--- a/web/apps/space/src/screens/ProfileImageViewerScreen.tsx
+++ b/web/apps/space/src/screens/ProfileImageViewerScreen.tsx
@@ -5,6 +5,7 @@ import { spaceAppAvatarCropSize } from "components/AvatarCropPage";
import { SpaceAvatarImage } from "components/AvatarImage";
import React, { useEffect, useRef } from "react";
import type { SetupProfile } from "screens/SetupProfileScreen";
+import { spaceAppBackground, spaceSurface, spaceText } from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import {
spaceAvatarImageInputAccept,
@@ -14,10 +15,9 @@ import {
} from "utils/post-image";
const green = "#08C225";
-const textBase = "#000";
-const profileBackground = "#FFFFFF";
+const textBase = spaceText;
const profileCoverBackground = "#1F1F1F";
-const profileAvatarSkeletonBackground = "#E6E6E6";
+const profileAvatarSkeletonBackground = spaceSurface;
export const friendProfileImageViewerBackground = "#000000";
interface FriendProfileImageViewerScreenProps {
@@ -162,7 +162,7 @@ export const ProfileImageViewerScreen: React.FC<
<Box
component="main"
sx={{
- bgcolor: profileBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -172,7 +172,7 @@ export const ProfileImageViewerScreen: React.FC<
>
<Box
sx={{
- bgcolor: profileBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "grid",
gridTemplateRows: "56px minmax(0, 1fr) auto",
diff --git a/web/apps/space/src/screens/ProfileScreen.tsx b/web/apps/space/src/screens/ProfileScreen.tsx
index 1f66ce7e24..4fa02e40af 100644
--- a/web/apps/space/src/screens/ProfileScreen.tsx
+++ b/web/apps/space/src/screens/ProfileScreen.tsx
@@ -32,6 +32,13 @@ import type { SetupProfile } from "screens/SetupProfileScreen";
import type { SpaceInviteIntent } from "services/invite";
import { openSpaceShareLinkDialog } from "services/share-link";
import { isSpaceContentError, type SpacePostAsset } from "services/space";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { firstNameFrom } from "utils/display";
import { createLoadedLocalPostPhoto } from "utils/local-post-photo";
@@ -44,25 +51,23 @@ import {
} from "utils/post-image";
import { thumbHashDataURLFromBase64 } from "utils/thumbhash";
-export const profileBackground = "#FFFFFF";
-
const green = "#08C225";
const dangerColor = "#F63A3A";
-const textBase = "#000";
-const textStrong = "#303030";
-const textSoft = "#777777";
+const textBase = spaceText;
+const textStrong = spaceText;
+const textSoft = spaceTextMuted;
const coverForeground = "#FFFFFF";
const profileCoverBackground = "#1F1F1F";
const profileCoverTopShadow =
"linear-gradient(180deg, rgba(0, 0, 0, 0.26) 0%, rgba(0, 0, 0, 0.18) 36%, rgba(0, 0, 0, 0.08) 72%, rgba(0, 0, 0, 0) 100%)";
-const profileCoverSkeletonBackground = "#E6E6E6";
+const profileCoverSkeletonBackground = spaceSurface;
const profileHeaderHeight = 56;
const profileAvatarTopOffset = 54;
const profileAvatarSize = 120;
const profileCoverHeight =
profileHeaderHeight + profileAvatarTopOffset + profileAvatarSize / 2;
const photoMasonryGap = "8px";
-const photoMasonryPlaceholderBackground = "#F2F2F2";
+const photoMasonryPlaceholderBackground = spaceSurface;
const photoMasonryRadius = "14px";
const profileCoverRadius = "12px";
const photoMasonryLoadRootMargin = "800px 0px";
@@ -1017,7 +1022,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: profileBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -1031,7 +1036,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
)}
<Box
sx={{
- bgcolor: profileBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -1516,7 +1521,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
slotProps={{
paper: {
sx: {
- bgcolor: "#FFFFFF",
+ bgcolor: spaceSurface,
borderRadius: "14px",
boxShadow:
"0 14px 40px rgba(0, 0, 0, 0.16)",
@@ -1549,16 +1554,13 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({
py: "4px",
whiteSpace: "nowrap",
"&.Mui-focusVisible": {
- bgcolor:
- "rgba(0, 0, 0, 0.04)",
+ bgcolor: spaceSurfaceHover,
},
"&:active": {
- bgcolor:
- "rgba(0, 0, 0, 0.04)",
+ bgcolor: spaceSurfaceHover,
},
"&:hover": {
- bgcolor:
- "rgba(0, 0, 0, 0.04)",
+ bgcolor: spaceSurfaceHover,
},
}}
>
diff --git a/web/apps/space/src/screens/SettingsScreen.tsx b/web/apps/space/src/screens/SettingsScreen.tsx
index d0f2cec53c..44a4c2e1cd 100644
--- a/web/apps/space/src/screens/SettingsScreen.tsx
+++ b/web/apps/space/src/screens/SettingsScreen.tsx
@@ -24,16 +24,21 @@ import {
} from "hooks/use-pwa-install-prompt";
import { useSpaceWebPushPrompt } from "hooks/use-web-push-prompt";
import React from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const settingsBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const rowBackground = "#FFFFFF";
+const textBase = spaceText;
+const rowBackground = spaceSurface;
const dangerColor = "#F63A3A";
-const iconMuted = "#8C8C8C";
-const textLight = "#969696";
+const iconMuted = spaceTextMuted;
+const textLight = spaceTextMuted;
const supportMailURL = "mailto:[email protected]";
const spaceLinks = [
{
@@ -144,12 +149,12 @@ const SettingsRow: React.FC<SettingsRowProps> = ({
transition: "background-color 120ms ease",
width: "100%",
...(rowInteractive && {
- "&:active": { bgcolor: "rgba(0, 0, 0, 0.025)" },
+ "&:active": { bgcolor: spaceSurfaceHover },
"&:focus-visible": {
outline: `2px solid ${green}`,
outlineOffset: 2,
},
- "&:hover": { bgcolor: "rgba(0, 0, 0, 0.025)" },
+ "&:hover": { bgcolor: spaceSurfaceHover },
}),
}}
>
@@ -298,12 +303,12 @@ const SpaceIcon: React.FC<SpaceIconProps> = ({ label, src, url }) => (
textDecoration: "none",
transition: "background-color 120ms ease",
width: spaceTouchTargetSize,
- "&:active": { bgcolor: "rgba(0, 0, 0, 0.025)" },
+ "&:active": { bgcolor: spaceSurfaceHover },
"&:focus-visible": {
outline: `2px solid ${green}`,
outlineOffset: 2,
},
- "&:hover": { bgcolor: "rgba(0, 0, 0, 0.025)" },
+ "&:hover": { bgcolor: spaceSurfaceHover },
}}
>
<Box
@@ -402,7 +407,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: settingsBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -412,7 +417,7 @@ export const SettingsScreen: React.FC<SettingsScreenProps> = ({
>
<Box
sx={{
- bgcolor: settingsBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -631,7 +636,7 @@ export const ChangeNameSettingsScreen: React.FC<
<Box
component="main"
sx={{
- bgcolor: settingsBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -641,7 +646,7 @@ export const ChangeNameSettingsScreen: React.FC<
>
<Box
sx={{
- bgcolor: settingsBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
diff --git a/web/apps/space/src/screens/SetupProfilePhotoScreen.tsx b/web/apps/space/src/screens/SetupProfilePhotoScreen.tsx
index 2fecafaf0b..903e2152bc 100644
--- a/web/apps/space/src/screens/SetupProfilePhotoScreen.tsx
+++ b/web/apps/space/src/screens/SetupProfilePhotoScreen.tsx
@@ -10,7 +10,13 @@ import { SpaceButtonSpinner } from "components/ButtonSpinner";
import log from "ente-base/log";
import React, { useEffect, useRef, useState } from "react";
import type { Area, Point } from "react-easy-crop";
-import { setupProfileBackground } from "screens/SetupProfileScreen";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceSurfaceHover,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import {
prepareSpaceAvatarImageFromCrop,
@@ -20,9 +26,9 @@ import {
} from "utils/post-image";
const green = "#08C225";
-const textBase = "#000";
-const textLight = "#969696";
-const textMuted = "#666";
+const textBase = spaceText;
+const textLight = spaceTextMuted;
+const textMuted = spaceTextMuted;
const warning = "#F63A3A";
interface AvatarCropImage {
@@ -170,7 +176,6 @@ export const SetupProfilePhotoScreen: React.FC<
<>
{avatarFileInput}
<SpaceAvatarCropPage
- background={setupProfileBackground}
crop={avatarCrop}
errorMessage={errorMessage ?? avatarError}
imageURL={avatarCropImage.url}
@@ -196,7 +201,7 @@ export const SetupProfilePhotoScreen: React.FC<
<Box
component="main"
sx={{
- bgcolor: setupProfileBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
height: "100dvh",
@@ -209,7 +214,7 @@ export const SetupProfilePhotoScreen: React.FC<
>
<Box
sx={{
- bgcolor: setupProfileBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "grid",
gridTemplateRows: `42px minmax(0, 1fr) auto ${spaceSetupAvatarCropFooterHeight}`,
@@ -344,7 +349,7 @@ export const SetupProfilePhotoScreen: React.FC<
<Box
sx={{
- bgcolor: setupProfileBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
display: "flex",
@@ -406,7 +411,7 @@ export const SetupProfilePhotoScreen: React.FC<
onClick={() => void skipProfilePicture()}
sx={{
alignItems: "center",
- bgcolor: "#F2F2F2",
+ bgcolor: spaceSurface,
border: 0,
borderRadius: "20px",
color: textMuted,
@@ -426,7 +431,7 @@ export const SetupProfilePhotoScreen: React.FC<
outlineOffset: 2,
},
"&:hover": canSkip
- ? { bgcolor: "#ECECEC" }
+ ? { bgcolor: spaceSurfaceHover }
: undefined,
}}
>
diff --git a/web/apps/space/src/screens/SetupProfileScreen.tsx b/web/apps/space/src/screens/SetupProfileScreen.tsx
index 768491e9e1..9254752148 100644
--- a/web/apps/space/src/screens/SetupProfileScreen.tsx
+++ b/web/apps/space/src/screens/SetupProfileScreen.tsx
@@ -1,13 +1,17 @@
import { Box } from "@mui/material";
import { SpaceBackIcon } from "components/BackIcon";
import React, { useState } from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
-export const setupProfileBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const textLight = "#969696";
+const textBase = spaceText;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
const setupProfileFormID = "space-setup-profile-form";
@@ -153,7 +157,7 @@ const TextInput: React.FC<TextInputProps> = ({
<Box
sx={{
alignItems: "center",
- bgcolor: "white",
+ bgcolor: spaceSurface,
borderRadius: "16px",
display: "flex",
height: 52,
@@ -227,7 +231,7 @@ export const SetupProfileScreen: React.FC<SetupProfileScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: setupProfileBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -237,7 +241,7 @@ export const SetupProfileScreen: React.FC<SetupProfileScreenProps> = ({
>
<Box
sx={{
- bgcolor: setupProfileBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -356,7 +360,7 @@ export const SetupProfileScreen: React.FC<SetupProfileScreenProps> = ({
<Box
sx={{
- bgcolor: setupProfileBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
left: "50%",
@@ -375,7 +379,7 @@ export const SetupProfileScreen: React.FC<SetupProfileScreenProps> = ({
disabled={!canContinue}
sx={{
alignItems: "center",
- bgcolor: canContinue ? green : "#F5F5F5",
+ bgcolor: canContinue ? green : spaceSurface,
border: 0,
borderRadius: "20px",
color: canContinue ? "white" : textLight,
diff --git a/web/apps/space/src/screens/VerifyEmailScreen.tsx b/web/apps/space/src/screens/VerifyEmailScreen.tsx
index c9c65c08d5..2bd95f6931 100644
--- a/web/apps/space/src/screens/VerifyEmailScreen.tsx
+++ b/web/apps/space/src/screens/VerifyEmailScreen.tsx
@@ -3,15 +3,19 @@ import { SpaceBackIcon } from "components/BackIcon";
import { SpaceButtonSpinner } from "components/ButtonSpinner";
import { SpaceOtpInput } from "components/OtpInput";
import React, { useEffect, useRef, useState } from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { sanitizeSpaceOTP, spaceOTPCodeLength } from "utils/otp";
-export const verifyEmailBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const textMuted = "#666";
-const textLight = "#969696";
+const textBase = spaceText;
+const textMuted = spaceTextMuted;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
const verifyEmailFormID = "space-verify-email-form";
@@ -85,7 +89,7 @@ export const VerifyEmailScreen: React.FC<VerifyEmailScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: verifyEmailBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -95,7 +99,7 @@ export const VerifyEmailScreen: React.FC<VerifyEmailScreenProps> = ({
>
<Box
sx={{
- bgcolor: verifyEmailBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -326,7 +330,7 @@ export const VerifyEmailScreen: React.FC<VerifyEmailScreenProps> = ({
<Box
sx={{
- bgcolor: verifyEmailBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
left: "50%",
@@ -349,7 +353,9 @@ export const VerifyEmailScreen: React.FC<VerifyEmailScreenProps> = ({
aria-busy={isSubmitting ? true : undefined}
sx={{
alignItems: "center",
- bgcolor: isVerifyButtonActive ? green : "#F5F5F5",
+ bgcolor: isVerifyButtonActive
+ ? green
+ : spaceSurface,
border: 0,
borderRadius: "20px",
color: isVerifyButtonActive ? "white" : textLight,
diff --git a/web/apps/space/src/screens/VerifyTwoFactorScreen.tsx b/web/apps/space/src/screens/VerifyTwoFactorScreen.tsx
index cfa2a4daab..917ec9df86 100644
--- a/web/apps/space/src/screens/VerifyTwoFactorScreen.tsx
+++ b/web/apps/space/src/screens/VerifyTwoFactorScreen.tsx
@@ -5,15 +5,19 @@ import { SpaceBackIcon } from "components/BackIcon";
import { SpaceButtonSpinner } from "components/ButtonSpinner";
import { SpaceOtpInput } from "components/OtpInput";
import React, { useEffect, useRef, useState } from "react";
+import {
+ spaceAppBackground,
+ spaceSurface,
+ spaceText,
+ spaceTextMuted,
+} from "styles/colors";
import { spaceTouchTargetSize } from "styles/touch-targets";
import { sanitizeSpaceOTP, spaceOTPCodeLength } from "utils/otp";
-export const verifyTwoFactorBackground = "#FAFAFA";
-
const green = "#08C225";
-const textBase = "#000";
-const textMuted = "#666";
-const textLight = "#969696";
+const textBase = spaceText;
+const textMuted = spaceTextMuted;
+const textLight = spaceTextMuted;
const warning = "#F63A3A";
const verifyTwoFactorFormID = "space-verify-two-factor-form";
@@ -71,7 +75,7 @@ export const VerifyTwoFactorScreen: React.FC<VerifyTwoFactorScreenProps> = ({
<Box
component="main"
sx={{
- bgcolor: verifyTwoFactorBackground,
+ background: spaceAppBackground,
color: textBase,
display: "grid",
minHeight: "100svh",
@@ -81,7 +85,7 @@ export const VerifyTwoFactorScreen: React.FC<VerifyTwoFactorScreenProps> = ({
>
<Box
sx={{
- bgcolor: verifyTwoFactorBackground,
+ bgcolor: "transparent",
boxSizing: "border-box",
display: "flex",
flexDirection: "column",
@@ -232,7 +236,7 @@ export const VerifyTwoFactorScreen: React.FC<VerifyTwoFactorScreenProps> = ({
<Box
sx={{
- bgcolor: verifyTwoFactorBackground,
+ bgcolor: "transparent",
bottom: 0,
boxSizing: "border-box",
left: "50%",
@@ -255,7 +259,9 @@ export const VerifyTwoFactorScreen: React.FC<VerifyTwoFactorScreenProps> = ({
aria-busy={isSubmitting ? true : undefined}
sx={{
alignItems: "center",
- bgcolor: isVerifyButtonActive ? green : "#F5F5F5",
+ bgcolor: isVerifyButtonActive
+ ? green
+ : spaceSurface,
border: 0,
borderRadius: "20px",
color: isVerifyButtonActive ? "white" : textLight,
diff --git a/web/apps/space/src/styles/colors.ts b/web/apps/space/src/styles/colors.ts
new file mode 100644
index 0000000000..e20989e9bc
--- /dev/null
+++ b/web/apps/space/src/styles/colors.ts
@@ -0,0 +1,9 @@
+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 spaceSurface = "#202825";
+export const spaceSurfaceHover = "#29322F";
+export const spaceText = "#F4F4F4";
+export const spaceTextMuted = "#A6A6A6";