From 0d5c3c23542e4b2f05d086cd134e95d76ab8d56b Mon Sep 17 00:00:00 2001 From: MartinBraquet Date: Sat, 9 May 2026 11:35:10 +0200 Subject: [PATCH] Redesign private messages UI: update empty state, error messaging, modal layout, and typography for improved consistency and user experience. --- web/pages/messages/[channelId].tsx | 55 +++++++++++++++++++++--------- 1 file changed, 39 insertions(+), 16 deletions(-) diff --git a/web/pages/messages/[channelId].tsx b/web/pages/messages/[channelId].tsx index 924dd6a1..6f5f8704 100644 --- a/web/pages/messages/[channelId].tsx +++ b/web/pages/messages/[channelId].tsx @@ -83,8 +83,15 @@ export function PrivateMessagesContent(props: {user: User; channelId: number}) { thisChannel ? ( ) : ( -
- {t('messages.no_access', 'You do not have access to this conversation.')} +
+
+

+ {t('messages.no_access', 'You do not have access to this conversation.')} +

+

+ {t('messages.no_access_hint', 'You may have been removed from this chat.')} +

+
) ) : ( @@ -256,8 +263,10 @@ export const PrivateChat = (props: { return ( - - + + {members && members.length > 0 ? ( 0 ? ( members.length === 1 ? router.push(`/${members[0].username}`) : setShowUsers(true) } @@ -287,7 +299,9 @@ export const PrivateChat = (props: { {members.length > 2 && ` & ${members.length - 2} more`} ) : ( - {t('messages.deleted_user', 'Deleted user')} + + {t('messages.deleted_user', 'Deleted user')} + )} {members?.length == 1 && members[0].isBannedFromPosting && } @@ -352,10 +366,16 @@ export const PrivateChat = (props: { {showUsers && ( +

+ {t('messages.members', 'Members')} +

{members?.map((user) => ( - +
- +
))}
@@ -423,16 +443,19 @@ export const PrivateChat = (props: { )} {messages && messages.length === 0 && ( -
- {t('messages.empty', 'No messages yet.')} +
+

{t('messages.empty', 'No messages yet.')}

+

+ {t('messages.empty_hint', 'Be the first to start the conversation!')} +

)}
{noOtherUser ? ( -
- +
+ {t( 'messages.cannot_message_deleted', "You can't text them as they deleted their account.", @@ -440,14 +463,14 @@ export const PrivateChat = (props: {
) : allUsersBanned ? ( -
- +
+ {t('messages.cannot_message_banned', "You can't text them as they got banned.")}
) : user.isBannedFromPosting ? ( -
- +
+ {t('messages.cannot_message_you_banned', "You can't text them as you got banned.")}