π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Tweak space feed and notification avatars
Anand Baburajan2d6619ff130e
diff --git a/web/apps/space/src/screens/HomeScreen.tsx b/web/apps/space/src/screens/HomeScreen.tsxindex c149391eab..36539475a9 100644--- a/web/apps/space/src/screens/HomeScreen.tsx+++ b/web/apps/space/src/screens/HomeScreen.tsx@@ -197,6 +197,7 @@ interface FeedItemProps {interface FeedSkeletonItemProps {aspectRatio: string;+ isOwnPost?: boolean;pb?: string;rootRef?: React.Ref<HTMLElement>;showFooter?: boolean;@@ -364,6 +365,7 @@ const useHideHeaderOnScrollDirection = () => {const FeedSkeletonItem: React.FC<FeedSkeletonItemProps> = ({aspectRatio,+ isOwnPost = false,pb = "8px",rootRef,showFooter = true,@@ -467,7 +469,7 @@ const FeedSkeletonItem: React.FC<FeedSkeletonItemProps> = ({minHeight: feedLikeActionSize,mt: "8px",pl: "9px",- pr: 0,+ pr: isOwnPost ? "3px" : 0,width: "100%",}}>@@ -482,34 +484,49 @@ const FeedSkeletonItem: React.FC<FeedSkeletonItemProps> = ({width: "60%",}}/>- <Box- sx={{- alignItems: "center",- display: "flex",- gap: "6px",- justifyContent: "flex-end",- }}- >+ {isOwnPost ? (<Skeleton- variant="circular"+ variant="rectangular"sx={{bgcolor: feedActionBackground,- height: feedLikeActionSize,+ borderRadius: "999px",+ height: 14,+ justifySelf: "flex-end",+ mr: "4px",transform: "none",- width: feedLikeActionSize,+ width: 34,}}/>- <Skeleton- variant="circular"+ ) : (+ <Boxsx={{- bgcolor: feedActionBackground,- height: feedLikeActionSize,- mr: "9px",- transform: "none",- width: feedLikeActionSize,+ alignItems: "center",+ display: "flex",+ gap: "6px",+ justifyContent: "flex-end",}}- />- </Box>+ >+ <Skeleton+ variant="circular"+ sx={{+ bgcolor: feedActionBackground,+ height: feedLikeActionSize,+ transform: "none",+ width: feedLikeActionSize,+ }}+ />+ <Skeleton+ variant="circular"+ sx={{+ bgcolor: feedActionBackground,+ height: feedLikeActionSize,+ mr: "9px",+ transform: "none",+ width: feedLikeActionSize,+ }}+ />+ </Box>+ )}</Box>)}</Box>@@ -816,6 +833,7 @@ const FeedItem: React.FC<FeedItemProps> = ({return (<FeedSkeletonItemaspectRatio={`${feedPhotoFrameDimensions.width} / ${feedPhotoFrameDimensions.height}`}+ isOwnPost={isOwnPost}pb={isOwnPost ? "5px" : "8px"}rootRef={rootRef}showFooter={showFooter}@@ -981,9 +999,9 @@ const FeedItem: React.FC<FeedItemProps> = ({<Boxaria-hiddensx={{- border: "1px solid rgba(255, 255, 255, 0.5)",+ border: "2px solid rgba(255, 255, 255, 0.35)",borderRadius: "50%",- inset: -1,+ inset: -2,pointerEvents: "none",position: "absolute",}}diff --git a/web/apps/space/src/screens/NotificationsScreen.tsx b/web/apps/space/src/screens/NotificationsScreen.tsxindex 456c253fb6..20a154beb7 100644--- a/web/apps/space/src/screens/NotificationsScreen.tsx+++ b/web/apps/space/src/screens/NotificationsScreen.tsx@@ -1,4 +1,4 @@-import { ArrowLeft02Icon } from "@hugeicons/core-free-icons";+import { ArrowLeft02Icon, FavouriteIcon } from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import { Box } from "@mui/material";import { SpaceInviteFriendsDialog } from "components/SpaceInviteFriendsDialog";@@ -108,9 +108,10 @@ const NotificationText: React.FC<{ group: NotificationGroup }> = ({}};-const AvatarStack: React.FC<{ actors: SpaceNotification["actor"][] }> = ({- actors,-}) => {+const AvatarStack: React.FC<{+ actors: SpaceNotification["actor"][];+ showPostLikeBadge?: boolean;+}> = ({ actors, showPostLikeBadge = false }) => {const isPair = actors.length == 2;const displayedActors = isPair? [actors[1]!, actors[0]!]@@ -166,6 +167,33 @@ const AvatarStack: React.FC<{ actors: SpaceNotification["actor"][] }> = ({</Box>);})}+ {showPostLikeBadge && (+ <Box+ aria-hidden+ className="green-bg"+ sx={{+ alignItems: "center",+ border: `2px solid ${notificationsBackground}`,+ borderRadius: "50%",+ bottom: -1,+ display: "flex",+ height: 18,+ justifyContent: "center",+ position: "absolute",+ right: -1,+ width: 18,+ zIndex: 10,+ }}+ >+ <HugeiconsIcon+ fill="#FFFFFF"+ icon={FavouriteIcon}+ primaryColor="#FFFFFF"+ size={9}+ strokeWidth={2.4}+ />+ </Box>+ )}</Box>);};@@ -322,7 +350,10 @@ const NotificationRow: React.FC<{},}}>- <AvatarStack actors={avatarActors} />+ <AvatarStack+ actors={avatarActors}+ showPostLikeBadge={group.type == "post_like"}+ /><Box sx={{ minWidth: 0 }}><Boxcomponent="p"