From dc910f12f8841f8cc6adc2654ce830cd00c59019 Mon Sep 17 00:00:00 2001 From: speakeloudest Date: Fri, 1 Aug 2025 00:12:24 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../(main)/(content)/(user)/document/page.tsx | 19 +++-- .../(user)/document/tutorial-button.tsx | 11 ++- .../app/(main)/(content)/(user)/layout.tsx | 3 +- .../(user)/profile/notify-settings.tsx | 2 +- .../(main)/(content)/(user)/profile/page.tsx | 8 +- .../(main)/(content)/(user)/wallet/page.tsx | 85 ++++++++++++------- apps/user/components/subscribe/recharge.tsx | 2 +- 7 files changed, 84 insertions(+), 46 deletions(-) diff --git a/apps/user/app/(main)/(content)/(user)/document/page.tsx b/apps/user/app/(main)/(content)/(user)/document/page.tsx index c790fd5..ea103fa 100644 --- a/apps/user/app/(main)/(content)/(user)/document/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/document/page.tsx @@ -34,7 +34,7 @@ export default function Page() { }); return ( -
+
{DocumentList?.length > 0 && ( <>

{t('document')}

@@ -62,12 +62,19 @@ export default function Page() { )} {TutorialList && TutorialList?.length > 0 && ( - <> -

{t('tutorial')}

+
+
新手教程
+
选择对应操作系统,查看对应软件配置教程
- + {TutorialList?.map((tutorial) => ( - + {tutorial.title} ))} @@ -85,7 +92,7 @@ export default function Page() { ))} - +
)}
); diff --git a/apps/user/app/(main)/(content)/(user)/document/tutorial-button.tsx b/apps/user/app/(main)/(content)/(user)/document/tutorial-button.tsx index 8e667f3..4a74870 100644 --- a/apps/user/app/(main)/(content)/(user)/document/tutorial-button.tsx +++ b/apps/user/app/(main)/(content)/(user)/document/tutorial-button.tsx @@ -121,7 +121,7 @@ export function TutorialButton({ items }: { items: Item[] }) { layoutId={`card-${item.title}-${id}`} key={`card-${item.title}-${id}`} onClick={() => setActive(item)} - className='bg-background hover:bg-accent flex cursor-pointer items-center justify-between rounded border p-4' + className='bg-background hover:bg-accent flex cursor-pointer items-center justify-between rounded-[40px] border p-4' >
@@ -133,13 +133,16 @@ export function TutorialButton({ items }: { items: Item[] }) {
- + {item.title} {item.updated_at && ( {formatDate(new Date(item.updated_at), false)} @@ -152,7 +155,7 @@ export function TutorialButton({ items }: { items: Item[] }) { buttonVariants({ variant: 'secondary', }), - 'rounded-full', + 'min-w-[150px] rounded-full border-[#A8D4ED] bg-[#A8D4ED] px-[35px] py-[9px] text-center text-xl font-bold text-white hover:bg-[#225BA9] hover:text-white', )} > {t('read')} diff --git a/apps/user/app/(main)/(content)/(user)/layout.tsx b/apps/user/app/(main)/(content)/(user)/layout.tsx index dcc2aeb..3920b36 100644 --- a/apps/user/app/(main)/(content)/(user)/layout.tsx +++ b/apps/user/app/(main)/(content)/(user)/layout.tsx @@ -2,14 +2,13 @@ import Announcement from '@/components/announcement'; import { SidebarInset, SidebarProvider } from '@workspace/ui/components/sidebar'; import { cookies } from 'next/headers'; import { SidebarLeft } from './sidebar-left'; -import { SidebarRight } from './sidebar-right'; export default async function DashboardLayout({ children }: { children: React.ReactNode }) { return ( {children} - + {/**/} ); diff --git a/apps/user/app/(main)/(content)/(user)/profile/notify-settings.tsx b/apps/user/app/(main)/(content)/(user)/profile/notify-settings.tsx index f5d3276..c4cf6ed 100644 --- a/apps/user/app/(main)/(content)/(user)/profile/notify-settings.tsx +++ b/apps/user/app/(main)/(content)/(user)/profile/notify-settings.tsx @@ -39,7 +39,7 @@ export default function NotifySettings() { } return ( - +
{t('notify.notificationSettings')}
是否邮箱通知推送
diff --git a/apps/user/app/(main)/(content)/(user)/profile/page.tsx b/apps/user/app/(main)/(content)/(user)/profile/page.tsx index c389987..963cfeb 100644 --- a/apps/user/app/(main)/(content)/(user)/profile/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/profile/page.tsx @@ -4,12 +4,14 @@ import ThirdPartyAccounts from './third-party-accounts'; export default function Page() { return ( -
-
+
+
- +
+ +
); } diff --git a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx index fff3e06..b0a12e4 100644 --- a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx @@ -10,7 +10,11 @@ import { useRef } from 'react'; import { Empty } from '@/components/empty'; import Recharge from '@/components/subscribe/recharge'; -import { formatDate } from '@workspace/ui/utils'; +import { Button } from '@workspace/ui/components/button'; +import { formatDate, isBrowser } from '@workspace/ui/utils'; +import { Copy } from 'lucide-react'; +import { CopyToClipboard } from 'react-copy-to-clipboard'; +import { toast } from 'sonner'; export default function Page() { const t = useTranslations('wallet'); @@ -19,45 +23,68 @@ export default function Page() { const totalAssets = (user?.balance || 0) + (user?.commission || 0) + (user?.gift_amount || 0); return ( <> - - -

{t('assetOverview')}

+ + +

+ {t('assetOverview')} + +

-

{t('totalAssets')}

-

+

总资产

+

-
-
-
-

- {t('balance')} -

-

+

+
+

账户余额

+

-
-

- {t('giftAmount')} -

-

+

+

{t('giftAmount')}

+

-
-

- {t('commission')} -

-

+

+

{t('commission')}

+

+
+

+ 返佣邀请码 + 返佣详情 +

+

+ {user?.refer_code} + {isBrowser() && ( + { + if (result) { + toast.success(t('copySuccess')); + } + }} + > + + + )} +

+
@@ -72,26 +99,26 @@ export default function Page() { }} renderItem={(item) => { return ( - +
  • - {t('createdAt')} + {t('createdAt')}
  • - {t('type.0')} + {t('type.0')} {t(`type.${item.type}`)}
  • - {t('amount')} + {t('amount')}
  • -
  • - {t('balance')} +
  • + {t('balance')} diff --git a/apps/user/components/subscribe/recharge.tsx b/apps/user/components/subscribe/recharge.tsx index fa438e3..2a0ea05 100644 --- a/apps/user/components/subscribe/recharge.tsx +++ b/apps/user/components/subscribe/recharge.tsx @@ -36,7 +36,7 @@ export default function Recharge(props: Readonly) { return ( - +