From a026c6e34c0eeac1ee6acec1c8181c009ca0ab36 Mon Sep 17 00:00:00 2001 From: Innei Date: Sun, 22 Sep 2024 22:10:20 +0800 Subject: [PATCH] fix: transcation table text overflow Signed-off-by: Innei --- .../src/modules/settings/modal/layout.tsx | 2 +- .../tabs/wallet/transaction-section/index.tsx | 44 +++++++++++-------- apps/renderer/src/pages/(main)/layout.tsx | 2 +- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/apps/renderer/src/modules/settings/modal/layout.tsx b/apps/renderer/src/modules/settings/modal/layout.tsx index 5c8b4c13a..49fd5d165 100644 --- a/apps/renderer/src/modules/settings/modal/layout.tsx +++ b/apps/renderer/src/modules/settings/modal/layout.tsx @@ -122,7 +122,7 @@ export function SettingModalLayout( -
+
{children}
diff --git a/apps/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx b/apps/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx index 42f0fd9d8..d4d866a24 100644 --- a/apps/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx +++ b/apps/renderer/src/modules/settings/tabs/wallet/transaction-section/index.tsx @@ -6,7 +6,6 @@ import { Avatar, AvatarFallback, AvatarImage } from "~/components/ui/avatar" import { MotionButtonBase } from "~/components/ui/button" import { RelativeTime } from "~/components/ui/datetime" import { LoadingCircle } from "~/components/ui/loading" -import { ScrollArea } from "~/components/ui/scroll-area" import { Table, TableBody, @@ -16,6 +15,7 @@ import { TableRow, } from "~/components/ui/table" import { Tooltip, TooltipContent, TooltipPortal, TooltipTrigger } from "~/components/ui/tooltip" +import { EllipsisHorizontalTextWithTooltip } from "~/components/ui/typography" import { cn } from "~/lib/utils" import { usePresentUserProfileModal } from "~/modules/profile/hooks" import { SettingSectionTitle } from "~/modules/settings/section" @@ -41,14 +41,14 @@ export const TransactionsSection = () => { } return ( -
+
- - +
+
- + {t("wallet.transactions.type")} @@ -63,7 +63,7 @@ export const TransactionsSection = () => { {t("wallet.transactions.date")} - + {t("wallet.transactions.tx")} @@ -83,12 +83,14 @@ export const TransactionsSection = () => { - + - - + + + + @@ -106,12 +108,12 @@ export const TransactionsSection = () => { ))}
- {!transactions.data?.length && ( -
- {t("wallet.transactions.noTransactions")} -
- )} -
+
+ {!transactions.data?.length && ( +
+ {t("wallet.transactions.noTransactions")} +
+ )}
) } @@ -174,7 +176,7 @@ const UserRenderer = ({ onClick={() => { if (user?.id) presentUserModal(user.id) }} - className="flex cursor-button items-center" + className="flex w-full min-w-0 cursor-button items-center" > {name === APP_NAME ? ( @@ -185,8 +187,14 @@ const UserRenderer = ({ )} -
- {isMe ? {t("wallet.transactions.you")} : name} +
+ + {isMe ? ( + {t("wallet.transactions.you")} + ) : ( + {name} + )} +
) diff --git a/apps/renderer/src/pages/(main)/layout.tsx b/apps/renderer/src/pages/(main)/layout.tsx index 9f08904e9..5350aabf1 100644 --- a/apps/renderer/src/pages/(main)/layout.tsx +++ b/apps/renderer/src/pages/(main)/layout.tsx @@ -80,7 +80,7 @@ export function Component() { useDailyTask() - const isNotSupportWidth = useViewport((v) => v.w < 1024) + const isNotSupportWidth = useViewport((v) => v.w < 1024 && v.w !== 0) if (isNotSupportWidth) { return (