π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update Space post indicators
Anand Baburajand7e633175796
diff --git a/web/apps/space/src/components/FileViewer.tsx b/web/apps/space/src/components/FileViewer.tsxindex ada7a84223..3f8e02710f 100644--- a/web/apps/space/src/components/FileViewer.tsx+++ b/web/apps/space/src/components/FileViewer.tsx@@ -1452,7 +1452,7 @@ export const SpaceFileViewer: React.FC<SpaceFileViewerProps> = ({px: "9px",}}>- <Box component="span" sx={{ color: "#70EC80" }}>+ <Box component="span" sx={{ color: textBase }}>{activePhotoIndex + 1}</Box><Box component="span" sx={{ color: textTertiary }}>diff --git a/web/apps/space/src/components/PostUnreadBadge.tsx b/web/apps/space/src/components/PostUnreadBadge.tsxnew file mode 100644index 0000000000..def000ea49--- /dev/null+++ b/web/apps/space/src/components/PostUnreadBadge.tsx@@ -0,0 +1,35 @@+import { Box } from "@mui/material";+import React from "react";++export const SpacePostUnreadBadge: React.FC<{ count: number }> = ({+ count,+}) => (+ <Box+ component="span"+ aria-hidden+ sx={{+ alignItems: "center",+ bgcolor: "#F63A3A",+ borderRadius: "999px",+ color: "#FFFFFF",+ display: "inline-flex",+ fontFamily: '"Inter Variable", Inter, sans-serif',+ fontSize: 10,+ fontVariantNumeric: "tabular-nums",+ fontWeight: 700,+ height: 20,+ justifyContent: "center",+ lineHeight: 1,+ minWidth: 20,+ pointerEvents: "none",+ position: "absolute",+ px: "7px",+ right: "8%",+ top: "8%",+ whiteSpace: "nowrap",+ zIndex: 1,+ }}+ >+ {count}+ </Box>+);diff --git a/web/apps/space/src/pages/layout-demo.tsx b/web/apps/space/src/pages/layout-demo.tsxindex 26b6c568e7..ecfd2d7f25 100644--- a/web/apps/space/src/pages/layout-demo.tsx+++ b/web/apps/space/src/pages/layout-demo.tsx@@ -3,6 +3,7 @@ import { HugeiconsIcon } from "@hugeicons/react";import { Box } from "@mui/material";import { SpaceAvatarImage } from "components/AvatarImage";import { SpacePostFloatingActionButton } from "components/PostFloatingActionButton";+import { SpacePostUnreadBadge } from "components/PostUnreadBadge";import React from "react";import {homeCircleGridLayout,@@ -45,11 +46,14 @@ const LayoutDemoPost: React.FC<{ placement?: HomeCirclePlacement }> = ({bgcolor: "#1A211F",borderRadius: "20%",height: "100%",+ overflow: "hidden",position: "relative",width: "100%",zIndex: 1,}}- />+ >+ <SpacePostUnreadBadge count={2} />+ </Box><Boxaria-hiddensx={{diff --git a/web/apps/space/src/screens/HomeScreen.tsx b/web/apps/space/src/screens/HomeScreen.tsxindex f54a2e6c9c..958fb828bb 100644--- a/web/apps/space/src/screens/HomeScreen.tsx+++ b/web/apps/space/src/screens/HomeScreen.tsx@@ -14,6 +14,7 @@ import {type SpaceViewerPostActionMode,} from "components/FileViewer";import { SpacePostFloatingActionButton } from "components/PostFloatingActionButton";+import { SpacePostUnreadBadge } from "components/PostUnreadBadge";import { SpacePWAInstallPrompt } from "components/PWAInstallPrompt";import { SpaceLoadingSpinner } from "components/RouteFallback";import type { FriendProfile } from "data/friends";@@ -413,7 +414,7 @@ const FriendPostCircle: React.FC<FriendPostCircleProps> = ({alignItems: "center",appearance: "none",aspectRatio: "1",- bgcolor: post && isRead ? "#000" : "#E5E7EA",+ bgcolor: "#E5E7EA",border: 0,borderRadius: "20%",color: textBase,@@ -459,9 +460,7 @@ const FriendPostCircle: React.FC<FriendPostCircleProps> = ({aria-hiddensrc={thumbHashDataURL}sx={{- filter: isRead- ? "blur(14px) brightness(0.2)"- : "blur(14px)",+ filter: "blur(14px)",height: "100%",inset: 0,objectFit: "cover",@@ -480,7 +479,6 @@ const FriendPostCircle: React.FC<FriendPostCircleProps> = ({animation: isRead? "none": "spaceNewPostImageFade 520ms cubic-bezier(0.16, 1, 0.3, 1) both",- filter: isRead ? "brightness(0.2)" : "none",height: "100%",inset: 0,objectFit: "cover",@@ -515,6 +513,7 @@ const FriendPostCircle: React.FC<FriendPostCircleProps> = ({{initial}</Box>)}+ {!isRead && <SpacePostUnreadBadge count={posts.length} />}</Box><Boxcomponent="button"@@ -542,6 +541,7 @@ const FriendPostCircle: React.FC<FriendPostCircleProps> = ({><SpaceAvatarImagearia-hidden+ border="2px solid rgba(255, 255, 255, 0.36)"borderRadius="50%"src={displayAvatarUrl}/>