From 618a44fdd010d4693bc0d943072815e07d2477d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Fri, 5 Apr 2024 11:42:23 +0800 Subject: [PATCH] =?UTF-8?q?enhance(ui):=E8=B0=83=E6=95=B4=E6=8E=88?= =?UTF-8?q?=E6=9D=83=E7=A0=81=E9=83=A8=E5=88=86=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/LicenseCode.module.css | 3 +++ license_ui/src/components/LicenseCode.tsx | 8 +++++-- .../src/components/ProductList.module.css | 6 +++++ license_ui/src/components/ProductList.tsx | 15 ++++++++++-- license_ui/src/hooks/use-license-code.ts | 6 +++++ license_ui/src/hooks/use-products.ts | 24 +++++++++++++++++++ 6 files changed, 58 insertions(+), 4 deletions(-) create mode 100644 license_ui/src/hooks/use-license-code.ts create mode 100644 license_ui/src/hooks/use-products.ts diff --git a/license_ui/src/components/LicenseCode.module.css b/license_ui/src/components/LicenseCode.module.css index f8a43fd..29a03bf 100644 --- a/license_ui/src/components/LicenseCode.module.css +++ b/license_ui/src/components/LicenseCode.module.css @@ -3,4 +3,7 @@ } .license-code-area { flex-grow: 1; + overflow-x: hidden; + overflow-y: auto; + overflow-wrap: break-word; } diff --git a/license_ui/src/components/LicenseCode.tsx b/license_ui/src/components/LicenseCode.tsx index 23dd572..b19138d 100644 --- a/license_ui/src/components/LicenseCode.tsx +++ b/license_ui/src/components/LicenseCode.tsx @@ -1,8 +1,10 @@ -import { ActionIcon, Flex, Group, Paper, Textarea, Title, Tooltip } from "@mantine/core"; +import { useLicenseCode } from "@/hooks/use-license-code"; +import { ActionIcon, Box, Flex, Group, Paper, Title, Tooltip } from "@mantine/core"; import { IconCopy } from "@tabler/icons-react"; import classes from "./LicenseCode.module.css"; export function LicenseCode() { + const [licenseCode] = useLicenseCode(); return ( @@ -14,7 +16,9 @@ export function LicenseCode() { -