From f8659b5ebc315098eb422c38ec847d11885fd55c Mon Sep 17 00:00:00 2001 From: zetaloop Date: Wed, 25 Feb 2026 15:01:15 +0800 Subject: [PATCH] style(cards): normalize card list layout and padding across pages --- app/(account)/notifications/page.tsx | 50 ++++++++++++++++------------ app/(main)/community/page.tsx | 12 +++---- app/(order)/chat/page.tsx | 8 ++--- 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/app/(account)/notifications/page.tsx b/app/(account)/notifications/page.tsx index cca0ba7..50ad49a 100644 --- a/app/(account)/notifications/page.tsx +++ b/app/(account)/notifications/page.tsx @@ -24,26 +24,34 @@ const typeLabels: Record = { function NotificationItem({ notification }: { notification: Notification }) { const Icon = typeIcons[notification.type] const content = ( - -
- -
-
-
- {notification.title} - {!notification.read && } + + +
+
-

{notification.content}

-

- {new Date(notification.createdAt).toLocaleString("zh-CN")} -

-
- - {typeLabels[notification.type]} - +
+
+ {notification.title} + {!notification.read && } +
+

{notification.content}

+

+ {new Date(notification.createdAt).toLocaleString("zh-CN")} +

+
+ + {typeLabels[notification.type]} + + ) - return notification.link ? {content} : content + return notification.link ? ( + + {content} + + ) : ( + content + ) } export default function NotificationsPage() { @@ -75,7 +83,7 @@ export default function NotificationsPage() { 系统 - + {notifications.length === 0 ? ( @@ -89,7 +97,7 @@ export default function NotificationsPage() { )} - + {orderNotifs.length === 0 ? ( @@ -101,7 +109,7 @@ export default function NotificationsPage() { )} - + {communityNotifs.length === 0 ? ( @@ -113,7 +121,7 @@ export default function NotificationsPage() { )} - + {systemNotifs.length === 0 ? ( diff --git a/app/(main)/community/page.tsx b/app/(main)/community/page.tsx index b09ffff..549d0f6 100644 --- a/app/(main)/community/page.tsx +++ b/app/(main)/community/page.tsx @@ -76,7 +76,7 @@ export default function CommunityPage() {
-
+
{filteredPosts.map((post) => (() => { const linkedOrder = post.linkedOrderId @@ -87,9 +87,9 @@ export default function CommunityPage() { : null return ( - - - + + +
@@ -109,7 +109,7 @@ export default function CommunityPage() {
- +

{post.title}

{post.content}

{post.tags.length > 0 && ( @@ -141,7 +141,7 @@ export default function CommunityPage() {
)} - +

消息

-
+
{sessions.map((session) => { const other = session.participants.find((participant) => participant.id !== userId) ?? session.participants[0] return ( - - - + + + {other.name[0]}