π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add Space desktop mobile hint toast
Anand Baburajanf9522b5fc8ac
diff --git a/web/apps/space/src/components/SpaceMobileBestToast.tsx b/web/apps/space/src/components/SpaceMobileBestToast.tsxnew file mode 100644index 0000000000..281a0a5fc7--- /dev/null+++ b/web/apps/space/src/components/SpaceMobileBestToast.tsx@@ -0,0 +1,98 @@+import {+ MultiplicationSignIcon,+ SmartPhone01Icon,+} from "@hugeicons/core-free-icons";+import { HugeiconsIcon } from "@hugeicons/react";+import { Box } from "@mui/material";+import React from "react";++const green = "#08C225";++export const SpaceMobileBestToast: React.FC = () => {+ const [open, setOpen] = React.useState(true);++ if (!open) return null;++ return (+ <Box+ role="status"+ aria-live="polite"+ sx={{+ alignItems: "center",+ bgcolor: "#FFFFFF",+ borderRadius: "18px",+ bottom: "calc(env(safe-area-inset-bottom) + 24px)",+ boxShadow: "0 12px 32px rgba(0, 0, 0, 0.18)",+ boxSizing: "border-box",+ color: "#000000",+ display: { xs: "none", sm: "flex" },+ fontFamily: '"Inter Variable", Inter, sans-serif',+ fontSize: 14,+ fontWeight: 650,+ gap: "12px",+ lineHeight: "20px",+ minHeight: 52,+ pl: "12px",+ position: "fixed",+ pr: "6px",+ py: "4px",+ right: "calc(env(safe-area-inset-right) + 24px)",+ width: 336,+ zIndex: 20,+ }}+ >+ <Box+ component="span"+ sx={{+ alignItems: "center",+ color: green,+ display: "flex",+ flexShrink: 0,+ height: 24,+ justifyContent: "center",+ width: 24,+ }}+ >+ <HugeiconsIcon+ icon={SmartPhone01Icon}+ size={22}+ strokeWidth={1.8}+ />+ </Box>+ <Box component="span" sx={{ flex: "1 1 auto", minWidth: 0 }}>+ Space works best on your phone.+ </Box>+ <Box+ component="button"+ type="button"+ aria-label="Close"+ onClick={() => setOpen(false)}+ sx={{+ alignItems: "center",+ appearance: "none",+ bgcolor: "transparent",+ border: 0,+ color: "#000000",+ cursor: "pointer",+ display: "flex",+ flexShrink: 0,+ height: 40,+ justifyContent: "center",+ opacity: 0.9,+ p: 0,+ width: 40,+ "&:focus-visible": {+ outline: "2px solid rgba(0 0 0 / 0.72)",+ outlineOffset: 2,+ },+ }}+ >+ <HugeiconsIcon+ icon={MultiplicationSignIcon}+ size={16}+ strokeWidth={2}+ />+ </Box>+ </Box>+ );+};diff --git a/web/apps/space/src/pages/index.tsx b/web/apps/space/src/pages/index.tsxindex dc819c19f9..58753d3995 100644--- a/web/apps/space/src/pages/index.tsx+++ b/web/apps/space/src/pages/index.tsx@@ -1,4 +1,5 @@import { Box } from "@mui/material";+import { SpaceMobileBestToast } from "components/SpaceMobileBestToast";import { SpacePageMeta } from "components/SpacePageMeta";import { SpaceRouteFallback } from "components/SpaceRouteFallback";import React, { useEffect, useState } from "react";@@ -71,6 +72,7 @@ const PublicProfileUnavailable: React.FC = () => (Profile unavailable</Box></Box>+ <SpaceMobileBestToast /></Box>);@@ -255,6 +257,7 @@ const PublicFriendRequestScreen: React.FC<PublicFriendRequestScreenProps> = ({</Box></Box></Box>+ <SpaceMobileBestToast /></Box>);diff --git a/web/apps/space/src/screens/OnboardingScreen.tsx b/web/apps/space/src/screens/OnboardingScreen.tsxindex 6087ddf66c..793656b804 100644--- a/web/apps/space/src/screens/OnboardingScreen.tsx+++ b/web/apps/space/src/screens/OnboardingScreen.tsx@@ -1,4 +1,5 @@import { Box } from "@mui/material";+import { SpaceMobileBestToast } from "components/SpaceMobileBestToast";import React from "react";export const onboardingGreen = "#08C225";@@ -230,6 +231,7 @@ export const OnboardingScreen: React.FC<OnboardingScreenProps> = ({</ActionButton></Box></Box>+ <SpaceMobileBestToast /></Box>);};