💚 End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Add sample social feed
Anand Baburajan96ec9cd7937a
diff --git a/web/apps/social/public/images/sample-feed-1.jpg b/web/apps/social/public/images/sample-feed-1.jpgnew file mode 100644index 0000000000..ac4f49e874Binary files /dev/null and b/web/apps/social/public/images/sample-feed-1.jpg differdiff --git a/web/apps/social/public/images/sample-feed-2.jpg b/web/apps/social/public/images/sample-feed-2.jpgnew file mode 100644index 0000000000..37899c8ce9Binary files /dev/null and b/web/apps/social/public/images/sample-feed-2.jpg differdiff --git a/web/apps/social/public/images/sample-feed-3.jpg b/web/apps/social/public/images/sample-feed-3.jpgnew file mode 100644index 0000000000..24cb37607eBinary files /dev/null and b/web/apps/social/public/images/sample-feed-3.jpg differdiff --git a/web/apps/social/public/images/sample-feed-4.jpg b/web/apps/social/public/images/sample-feed-4.jpgnew file mode 100644index 0000000000..1ebdbd3acdBinary files /dev/null and b/web/apps/social/public/images/sample-feed-4.jpg differdiff --git a/web/apps/social/public/images/sample-feed-5.jpg b/web/apps/social/public/images/sample-feed-5.jpgnew file mode 100644index 0000000000..f47ebbf577Binary files /dev/null and b/web/apps/social/public/images/sample-feed-5.jpg differdiff --git a/web/apps/social/public/images/sample-feed-6.jpg b/web/apps/social/public/images/sample-feed-6.jpgnew file mode 100644index 0000000000..4d146de3c2Binary files /dev/null and b/web/apps/social/public/images/sample-feed-6.jpg differdiff --git a/web/apps/social/src/screens/HomeScreen.tsx b/web/apps/social/src/screens/HomeScreen.tsxindex ba7f2b86ac..a00a27c243 100644--- a/web/apps/social/src/screens/HomeScreen.tsx+++ b/web/apps/social/src/screens/HomeScreen.tsx@@ -8,17 +8,64 @@ export const homeBackground = "#FFFFFF";const green = "#08C225";const paleGreen = "#E7F6E9";const textBase = "#000";+const textMuted = "#777";++const sampleFeedItems = [+ {+ avatarUrl: "/images/sample-feed-4.jpg",+ imageUrl: "/images/sample-feed-1.jpg",+ name: "Aparna Bhatnagar",+ meta: "@aparnabhatnagar · 4 hours ago",+ },+ {+ avatarUrl: "/images/sample-feed-3.jpg",+ imageUrl: "/images/sample-feed-2.jpg",+ name: "Mira Sen",+ meta: "@mirasen · 6 hours ago",+ },+ {+ avatarUrl: "/images/sample-feed-5.jpg",+ imageUrl: "/images/sample-feed-3.jpg",+ name: "Nikhil Rao",+ meta: "@nikhil · 8 hours ago",+ },+ {+ avatarUrl: "/images/sample-feed-2.jpg",+ imageUrl: "/images/sample-feed-4.jpg",+ name: "Sara Thomas",+ meta: "@sara · 12 hours ago",+ },+ {+ avatarUrl: "/images/sample-feed-6.jpg",+ imageUrl: "/images/sample-feed-5.jpg",+ name: "Arjun Menon",+ meta: "@arjun · yesterday",+ },+ {+ avatarUrl: "/images/sample-feed-4.jpg",+ imageUrl: "/images/sample-feed-6.jpg",+ name: "Leah Kapoor",+ meta: "@leah · yesterday",+ },+];interface HomeScreenProps {profile: SetupProfile;}+interface FeedItemProps {+ avatarUrl: string;+ imageUrl: string;+ meta: string;+ name: string;+}+const PlusIcon: React.FC = () => (<Boxcomponent="svg"- viewBox="0 0 24 24"+ viewBox="4 4 16 16"aria-hidden- sx={{ display: "block", height: 28, width: 28 }}+ sx={{ display: "block", height: 20, width: 20 }}><pathd="M12 5V19M5 12H19"@@ -31,6 +78,101 @@ const PlusIcon: React.FC = () => (</Box>);+const FeedItem: React.FC<FeedItemProps> = ({+ avatarUrl,+ imageUrl,+ meta,+ name,+}) => (+ <Box+ component="article"+ sx={{+ display: "flex",+ flexDirection: "column",+ gap: "10px",+ width: "100%",+ }}+ >+ <Box+ sx={{+ alignItems: "center",+ display: "flex",+ gap: "10px",+ minHeight: 36,+ width: "100%",+ }}+ >+ <Box+ sx={{+ bgcolor: paleGreen,+ borderRadius: "50%",+ flexShrink: 0,+ height: 32,+ overflow: "hidden",+ width: 32,+ }}+ >+ <Box+ component="img"+ alt=""+ src={avatarUrl}+ sx={{+ display: "block",+ height: "100%",+ objectFit: "cover",+ objectPosition: "center",+ width: "100%",+ }}+ />+ </Box>+ <Box sx={{ minWidth: 0 }}>+ <Box+ sx={{+ color: textBase,+ fontFamily: '"Inter Variable", Inter, sans-serif',+ fontSize: 14,+ fontWeight: 600,+ lineHeight: "18px",+ overflow: "hidden",+ textOverflow: "ellipsis",+ whiteSpace: "nowrap",+ }}+ >+ {name}+ </Box>+ <Box+ sx={{+ color: textMuted,+ fontFamily: '"Inter Variable", Inter, sans-serif',+ fontSize: 11,+ fontWeight: 500,+ lineHeight: "15px",+ overflow: "hidden",+ textOverflow: "ellipsis",+ whiteSpace: "nowrap",+ }}+ >+ {meta}+ </Box>+ </Box>+ </Box>+ <Box+ component="img"+ alt=""+ src={imageUrl}+ sx={{+ aspectRatio: "375 / 250",+ borderRadius: "8px",+ display: "block",+ ml: "-8px",+ objectFit: "cover",+ objectPosition: "center",+ width: "calc(100% + 16px)",+ }}+ />+ </Box>+);+export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {const initialsSource = profile.fullName.trim() || profile.username.trim();const initials = initialsSource@@ -47,7 +189,7 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {color: textBase,display: "grid",minHeight: "100svh",- overflow: "hidden",+ overflowX: "hidden",placeItems: { xs: "stretch", sm: "start center" },}}>@@ -57,7 +199,6 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {boxSizing: "border-box",minHeight: "100svh",mx: "auto",- px: 3,width: "100%","@media (min-width: 600px)": { maxWidth: 375 },}}@@ -67,9 +208,8 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {sx={{alignItems: "center",display: "grid",- gridTemplateColumns: "40px 1fr 40px",- height: 40,- mt: "20px",+ gridTemplateColumns: "24px 1fr 24px",+ p: 2,width: "100%",}}>@@ -78,9 +218,9 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {alignItems: "center",color: textBase,display: "flex",- height: 40,+ height: 24,justifyContent: "flex-start",- width: 40,+ width: 24,}}><PlusIcon />@@ -91,6 +231,9 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {color: textBase,justifySelf: "center",lineHeight: 0,+ overflow: "visible",+ width: 78,+ "& svg": { display: "block", overflow: "visible" },}}><EnteLogo height={24} />@@ -141,6 +284,34 @@ export const HomeScreen: React.FC<HomeScreenProps> = ({ profile }) => {)}</Box></Box>+ <Box+ sx={{+ bgcolor: "rgba(0, 0, 0, 0.08)",+ height: "1px",+ width: "100%",+ }}+ />+ <Box+ sx={{+ display: "flex",+ flexDirection: "column",+ gap: "32px",+ mt: "22px",+ pb: "4px",+ px: "12px",+ width: "100%",+ }}+ >+ {sampleFeedItems.map((item) => (+ <FeedItem+ key={item.imageUrl}+ avatarUrl={item.avatarUrl}+ imageUrl={item.imageUrl}+ meta={item.meta}+ name={item.name}+ />+ ))}+ </Box></Box></Box>);