π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Update Space post badges and profile section sizing
Anand Baburajan081349de01c7
diff --git a/web/apps/space/src/components/PostUnreadBadge.tsx b/web/apps/space/src/components/PostUnreadBadge.tsxindex ba345c240f..003ea7572f 100644--- a/web/apps/space/src/components/PostUnreadBadge.tsx+++ b/web/apps/space/src/components/PostUnreadBadge.tsx@@ -1,11 +1,12 @@import { Box } from "@mui/material";import React from "react";-import { spaceTilePillInset } from "styles/tiles";+import { spaceTileCircleInset, spaceTilePillInset } from "styles/tiles";interface SpacePostBadgeProps extends React.PropsWithChildren {backgroundColor: string;color: string;placement?: "center" | "top-right";+ variant?: "default" | "unread";}export const SpacePostBadge: React.FC<SpacePostBadgeProps> = ({@@ -13,9 +14,13 @@ export const SpacePostBadge: React.FC<SpacePostBadgeProps> = ({children,color,placement = "top-right",+ variant = "default",}) => {- const height = placement == "center" ? 24 : 18;- const inset = spaceTilePillInset(height);+ const height = variant == "unread" || placement == "center" ? 24 : 18;+ const inset =+ variant == "unread"+ ? spaceTileCircleInset(height)+ : spaceTilePillInset(height);return (<Boxcomponent="span"@@ -52,6 +57,11 @@ export const SpacePostBadge: React.FC<SpacePostBadgeProps> = ({top: inset,maxWidth: `calc(100% - 2 * (${inset}))`,}),+ ...(variant == "unread" && {+ border: "1px solid #FFFFFF",+ fontSize: 12,+ px: "6px",+ }),}}><Box@@ -67,7 +77,7 @@ export const SpacePostBadge: React.FC<SpacePostBadgeProps> = ({export const SpacePostUnreadBadge: React.FC<{ count: number }> = ({count,}) => (- <SpacePostBadge backgroundColor="#F63A3A" color="#FFFFFF">- {count} new+ <SpacePostBadge backgroundColor="#F63A3A" color="#FFFFFF" variant="unread">+ {count}</SpacePostBadge>);diff --git a/web/apps/space/src/screens/HomeScreen.tsx b/web/apps/space/src/screens/HomeScreen.tsxindex 14ad2bb643..a74b97bc8a 100644--- a/web/apps/space/src/screens/HomeScreen.tsx+++ b/web/apps/space/src/screens/HomeScreen.tsx@@ -652,19 +652,9 @@ export const FriendPostTile: React.FC<FriendPostTileProps> = ({Unavailable</SpacePostBadge>)}- {!isLoading &&- post &&- !postUnavailable &&- (isRead ? (- <SpacePostBadge- backgroundColor={tileBadgeBackground}- color={textBase}- >- Seen- </SpacePostBadge>- ) : (- <SpacePostUnreadBadge count={posts.length} />- ))}+ {!isLoading && post && !postUnavailable && !isRead && (+ <SpacePostUnreadBadge count={posts.length} />+ )}</Box>{showPokeButton && (<FriendTilePokeButtondiff --git a/web/apps/space/src/screens/ProfileScreen.tsx b/web/apps/space/src/screens/ProfileScreen.tsxindex d61a5de447..27025a2e8c 100644--- a/web/apps/space/src/screens/ProfileScreen.tsx+++ b/web/apps/space/src/screens/ProfileScreen.tsx@@ -1949,11 +1949,7 @@ export const ProfileScreen: React.FC<ProfileScreenProps> = ({display: "flex",flex: hasProfilePosts ? "0 0 auto" : "1 1 0",flexDirection: "column",- minHeight: hasProfilePosts- ? initialSection == "latest"- ? "100svh"- : undefined- : 0,+ minHeight: 0,mt: "24px",pb: "16px",px: 0,