From 8a72a97c0ce145a65583fafe792ae99a634c52c3 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 1 Nov 2024 16:18:01 +0800 Subject: [PATCH] fix(profile-menu): limit max-char Signed-off-by: Innei --- apps/renderer/src/modules/user/ProfileButton.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/modules/user/ProfileButton.tsx b/apps/renderer/src/modules/user/ProfileButton.tsx index a67ee26af..b9f98ab43 100644 --- a/apps/renderer/src/modules/user/ProfileButton.tsx +++ b/apps/renderer/src/modules/user/ProfileButton.tsx @@ -1,9 +1,11 @@ import { ActionButton } from "@follow/components/ui/button/index.js" import { RootPortal } from "@follow/components/ui/portal/index.js" +import { EllipsisHorizontalTextWithTooltip } from "@follow/components/ui/typography/EllipsisWithTooltip.js" import { UserRole } from "@follow/constants" import { useMeasure } from "@follow/hooks" import type { WalletModel } from "@follow/models/types" import { nextFrame } from "@follow/utils/dom" +import { UrlBuilder } from "@follow/utils/url-builder" import { cn } from "@follow/utils/utils" import { repository } from "@pkg" import type { FC } from "react" @@ -75,8 +77,16 @@ export const ProfileButton: FC = memo((props) => { >
-
{user?.name}
-
{user?.handle}
+ + {user?.name} + + {!!user?.handle && ( + + + @{user.handle} + + + )}