From bd8ef13cbb81c09b078b393add41290a0c19011a Mon Sep 17 00:00:00 2001 From: xiose Date: Mon, 16 Mar 2026 14:16:52 +0800 Subject: [PATCH] fix(web): prevent text overflow in token dialogs Add responsive text wrapping and overflow handling to token-related components to prevent layout breaking with long token names or descriptions. Changes: - Add min-w-0 to dialog headers to allow flex shrinking - Add break-all/break-words to prevent text overflow - Add overflow-hidden to token display container - Apply max-w-48 constraint to token name column --- web/src/features/token/create-token-dialog.tsx | 10 +++++----- web/src/features/token/token-list.tsx | 6 +++--- web/src/shared/components/confirm-dialog.tsx | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/src/features/token/create-token-dialog.tsx b/web/src/features/token/create-token-dialog.tsx index 8d967f72..ca167fb6 100644 --- a/web/src/features/token/create-token-dialog.tsx +++ b/web/src/features/token/create-token-dialog.tsx @@ -210,22 +210,22 @@ export function CreateTokenDialog({ children, existingNames = [] }: CreateTokenD ) : ( <> - + {t('createToken.successTitle')} - + {t('createToken.successDescription')} -
+
-
+
{createdToken.token}
-
{createdToken.name}
+
{createdToken.name}
diff --git a/web/src/features/token/token-list.tsx b/web/src/features/token/token-list.tsx index 561bd5bc..c2110064 100644 --- a/web/src/features/token/token-list.tsx +++ b/web/src/features/token/token-list.tsx @@ -204,7 +204,7 @@ export function TokenList() { {tokens.map((token) => ( - {token.name} + {token.name} {token.tokenPrefix}... @@ -257,9 +257,9 @@ export function TokenList() { setExpirationDialog((current) => ({ ...current, open }))}> - + {t('token.editExpirationTitle')} - + {t('token.editExpirationDescription', { name: expirationDialog.tokenName })} diff --git a/web/src/shared/components/confirm-dialog.tsx b/web/src/shared/components/confirm-dialog.tsx index c61ca284..5da8dea0 100644 --- a/web/src/shared/components/confirm-dialog.tsx +++ b/web/src/shared/components/confirm-dialog.tsx @@ -42,9 +42,9 @@ export function ConfirmDialog({ return ( - + {title} - {description && {description}} + {description && {description}}