diff --git a/README.md b/README.md index 17c2ea5..9fa816b 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ ### 熟练部署命令 ```shell -APP_NAME="ppanel-admin-web-dev" +APP_NAME="ppanel-admin-web" tar -xzvf ${APP_NAME}.tar.gz && pm2 start ${APP_NAME} && pm2 list unset APP_NAME # 显式销毁变量 ``` diff --git a/apps/user/app/(main)/(content)/(user)/Header.tsx b/apps/user/app/(main)/(content)/(user)/Header.tsx index 07984aa..19fd170 100644 --- a/apps/user/app/(main)/(content)/(user)/Header.tsx +++ b/apps/user/app/(main)/(content)/(user)/Header.tsx @@ -19,7 +19,7 @@ export function Header() { const items = useMemo(() => findNavByUrl(pathname), [pathname]); return (
- + {items.map((item, index) => { diff --git a/apps/user/app/(main)/(content)/(user)/dashboard/components/Announcement/Dialog.tsx b/apps/user/app/(main)/(content)/(user)/dashboard/components/Announcement/Dialog.tsx index 42b15b4..b99339a 100644 --- a/apps/user/app/(main)/(content)/(user)/dashboard/components/Announcement/Dialog.tsx +++ b/apps/user/app/(main)/(content)/(user)/dashboard/components/Announcement/Dialog.tsx @@ -51,8 +51,8 @@ export const AnnouncementDialog = ({ ref }: AnnouncementDialogProps) => { const response = await queryAnnouncement({ ...pagination, ...filter, - pinned: false, - popup: false, + // pinned: false, + // popup: false, }); return { list: response.data.data?.announcements || [], @@ -62,7 +62,7 @@ export const AnnouncementDialog = ({ ref }: AnnouncementDialogProps) => { renderItem={(item) => { return (

{

{/* 统计信息 */} -
+
-

+

{t('totalTraffic')}

-

+

{

-

+

{t('nextResetDays')}

-

+

{userSubscribeData.reset_time ? differenceInDays(new Date(userSubscribeData.reset_time), new Date()) : t('noReset')}

-

+

{t('expirationDays')}

-

+

{userSubscribeData.expire_time ? differenceInDays(new Date(userSubscribeData.expire_time), new Date()) || t('unknown') @@ -123,7 +123,7 @@ const SubscribeCard = (props: SubscribeCardProps) => { )}

-
+
{ value={userSubscribeProtocolCurrent} onValueChange={setUserSubscribeProtocolCurrent} > - + -
+
{t('subscriptionUrl')} {userSubscribeProtocolCurrent + 1}
-
+
@@ -158,8 +158,8 @@ const SubscribeCard = (props: SubscribeCardProps) => { -
-
+
+
{userSubscribeProtocol[userSubscribeProtocolCurrent]}
@@ -203,15 +203,9 @@ const SubscribeCard = (props: SubscribeCardProps) => {
- + @@ -235,7 +229,7 @@ const SubscribeCard = (props: SubscribeCardProps) => { diff --git a/apps/user/app/(main)/(content)/(user)/dashboard/content.tsx b/apps/user/app/(main)/(content)/(user)/dashboard/content.tsx index 4928e69..f1b2e09 100644 --- a/apps/user/app/(main)/(content)/(user)/dashboard/content.tsx +++ b/apps/user/app/(main)/(content)/(user)/dashboard/content.tsx @@ -64,9 +64,9 @@ export default function Content() { queryFn: async () => { const { data } = await queryAnnouncement({ page: 1, - size: 4, - pinned: false, - popup: false, + size: 5, + // pinned: false, + // popup: false, }); return data.data?.announcements || []; }, @@ -96,7 +96,7 @@ export default function Content() {
{/* 账户概况 Card */} -
+

{t('accountOverview')}

@@ -105,8 +105,8 @@ export default function Content() {

-
- +
+ {userSubscribe?.length > 0 && userSubscribe[0]?.status === 1 && orderData ? orderData?.quantity === 1 ? t('annualMonthPlanUser') @@ -115,7 +115,7 @@ export default function Content() {
-
+
{t('accountBalance')}
-
+
@@ -132,7 +132,7 @@ export default function Content() { {/* 套餐状态 Card */} -
+

{t('planStatus')} @@ -153,12 +153,12 @@ export default function Content() {
{userSubscribe?.length ? ( <> -
+
{t('planExpirationTime')} {formatDate(userSubscribe?.[0]?.expire_time, false)}
-
- +
+ {userSubscribe?.[0]?.subscribe.name}
@@ -226,7 +226,7 @@ export default function Content() { {/* 网站公告 Card */} -
+

{t('siteAnnouncements')}

@@ -248,7 +248,7 @@ export default function Content() { return (

-

+

{t('mySubscription')}

diff --git a/apps/user/app/(main)/(content)/(user)/order/components/OrderDetailDialog.tsx b/apps/user/app/(main)/(content)/(user)/order/components/OrderDetailDialog.tsx index b384a95..86c6ab1 100644 --- a/apps/user/app/(main)/(content)/(user)/order/components/OrderDetailDialog.tsx +++ b/apps/user/app/(main)/(content)/(user)/order/components/OrderDetailDialog.tsx @@ -67,7 +67,7 @@ const OrderDetailDialog = forwardReforder detail
-
+
{t('orderDetail')}
diff --git a/apps/user/app/(main)/(content)/(user)/order/page.tsx b/apps/user/app/(main)/(content)/(user)/order/page.tsx index 02ea585..30a2ea2 100644 --- a/apps/user/app/(main)/(content)/(user)/order/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/order/page.tsx @@ -77,7 +77,7 @@ export default function Page() {
- +
  • {t('name')} diff --git a/apps/user/app/(main)/(content)/(user)/subscribe/page.tsx b/apps/user/app/(main)/(content)/(user)/subscribe/page.tsx index 2b5ef8b..0c2defd 100644 --- a/apps/user/app/(main)/(content)/(user)/subscribe/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/subscribe/page.tsx @@ -29,16 +29,12 @@ export default function Page() { return ( <> -
    +
    {t('title')}
    {t('description')} diff --git a/apps/user/app/(main)/(content)/(user)/wallet/components/Table/Table.tsx b/apps/user/app/(main)/(content)/(user)/wallet/components/Table/Table.tsx index 7cd8b6d..a32c918 100644 --- a/apps/user/app/(main)/(content)/(user)/wallet/components/Table/Table.tsx +++ b/apps/user/app/(main)/(content)/(user)/wallet/components/Table/Table.tsx @@ -27,23 +27,23 @@ const Table: React.FC<{}> = () => {
    • - {t('createdAt')} - + {t('createdAt')} +
    • - {t('type.0')} - {t(`type.${item.type}`)} + {t('type.0')} + {t(`type.${item.type}`)}
    • - {t('amount')} - + {t('amount')} +
    • - {t('balance')} - + {t('balance')} +
    • diff --git a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx index ddeae16..36688af 100644 --- a/apps/user/app/(main)/(content)/(user)/wallet/page.tsx +++ b/apps/user/app/(main)/(content)/(user)/wallet/page.tsx @@ -31,7 +31,7 @@ export default function Page() {

      {t('totalAssets')}

      -

      +

      @@ -39,37 +39,33 @@ export default function Page() {
      -

      +

      {t('accountBalance')}

      -

      +

      -

      - {t('giftAmount')} -

      -

      +

      {t('giftAmount')}

      +

      -

      - {t('commission')} -

      -

      +

      {t('commission')}

      +

      -

      +

      {t('referralCode')} {t('referralDetails')}

      -

      +

      {user?.refer_code} ((props, ref) => {

      Login -
      +
      diff --git a/apps/user/app/auth/email/login-form.tsx b/apps/user/app/auth/email/login-form.tsx index 805b3f5..859f1a6 100644 --- a/apps/user/app/auth/email/login-form.tsx +++ b/apps/user/app/auth/email/login-form.tsx @@ -1,5 +1,6 @@ import useGlobalStore from '@/config/use-global'; import { zodResolver } from '@hookform/resolvers/zod'; +import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; import { Button } from '@workspace/airo-ui/components/button'; import { Form, @@ -55,7 +56,7 @@ export default function LoginForm({ return ( <> -
      账户验证
      +
      账户验证
      - +
      diff --git a/apps/user/app/auth/email/register-form.tsx b/apps/user/app/auth/email/register-form.tsx index 5058c5a..7052005 100644 --- a/apps/user/app/auth/email/register-form.tsx +++ b/apps/user/app/auth/email/register-form.tsx @@ -1,6 +1,8 @@ import useGlobalStore from '@/config/use-global'; import { zodResolver } from '@hookform/resolvers/zod'; +import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; import { Button } from '@workspace/airo-ui/components/button'; + import { Form, FormControl, @@ -93,7 +95,7 @@ export default function RegisterForm({ return ( <> -
      注册账户
      +
      注册账户
      {auth.register.stop_register ? ( {t('message')} @@ -108,9 +110,7 @@ export default function RegisterForm({
      - +
      diff --git a/apps/user/app/auth/email/reset-form.tsx b/apps/user/app/auth/email/reset-form.tsx index f97e703..8ba7c6b 100644 --- a/apps/user/app/auth/email/reset-form.tsx +++ b/apps/user/app/auth/email/reset-form.tsx @@ -1,5 +1,6 @@ import useGlobalStore from '@/config/use-global'; import { zodResolver } from '@hookform/resolvers/zod'; +import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; import { Button } from '@workspace/airo-ui/components/button'; import { Form, @@ -60,7 +61,7 @@ export default function ResetForm({ return ( <> -
      找回账户
      +
      找回账户
      @@ -71,9 +72,7 @@ export default function ResetForm({
      - +
      diff --git a/apps/user/app/auth/send-code.tsx b/apps/user/app/auth/send-code.tsx index faa4cfe..3333600 100644 --- a/apps/user/app/auth/send-code.tsx +++ b/apps/user/app/auth/send-code.tsx @@ -84,7 +84,7 @@ export default function SendCode({ type, params }: SendCodeProps) { + - {/* 功能列表 */} - +
      + {/* 功能列表 */} + +
      = (props) => { return ( props.setTabValue(value as 'year' | 'month')} > - + {tabValue === 'year' ? ( - + -{props.discount}%{/* 小三角箭头 */} = (props) => { diff --git a/apps/user/components/affiliate/components/AffiliateDialog.tsx b/apps/user/components/affiliate/components/AffiliateDialog.tsx index 8262f06..1abbc8a 100644 --- a/apps/user/components/affiliate/components/AffiliateDialog.tsx +++ b/apps/user/components/affiliate/components/AffiliateDialog.tsx @@ -57,11 +57,11 @@ export const AffiliateDialog = ({ ref }: AffiliateDialogProps) => { return (
      -
      {t('userIdentifier')}
      +
      {t('userIdentifier')}
      {invite.identifier}
      -
      {t('time')}
      +
      {t('time')}
      {formatDate(invite.registered_at)}
      diff --git a/apps/user/components/affiliate/index.tsx b/apps/user/components/affiliate/index.tsx index 383bf06..d3ab0d8 100644 --- a/apps/user/components/affiliate/index.tsx +++ b/apps/user/components/affiliate/index.tsx @@ -66,24 +66,22 @@ export default function Affiliate() {
      {t('commissionInfo')}
      {t('historicalRecommendedUsers')} {inviteListData?.total}
      -
      -

      +

      +

      {t('totalCommission')}

      -

      +

      -
      -

      +

      +

      {t('commissionInviteCode')}

      -

      +

      {user?.refer_code}

      -
      {t('userIdentifier')}
      +
      {t('userIdentifier')}
      {invite.identifier}
      -
      {t('time')}
      +
      {t('time')}
      {formatDate(invite.registered_at)}
      @@ -172,7 +170,9 @@ export default function Affiliate() { {t('commissionCalculation')}

-
+
{t('commissionCalculationInfo')}
diff --git a/apps/user/components/main/FooterCopyright.tsx b/apps/user/components/main/FooterCopyright.tsx index d77af59..548d7a6 100644 --- a/apps/user/components/main/FooterCopyright.tsx +++ b/apps/user/components/main/FooterCopyright.tsx @@ -11,7 +11,7 @@ export default function FooterCopyright() { const t = useTranslations('auth'); return ( -
+
(null); const t = useTranslations('components.home'); return (
{/* 大标题 */} -

+

{t('connect')}
{t('anytime')} @@ -30,14 +27,7 @@ export default function HomeContent() {

{t('getSubscription')}

{/* 按钮 */} - - - +
); } diff --git a/apps/user/components/main/OfferDialog/index.tsx b/apps/user/components/main/OfferDialog/index.tsx index 2ffd982..9478a65 100644 --- a/apps/user/components/main/OfferDialog/index.tsx +++ b/apps/user/components/main/OfferDialog/index.tsx @@ -1,19 +1,22 @@ import { getSubscription } from '@/services/user/portal'; import { useQuery } from '@tanstack/react-query'; -import { Dialog, DialogContent, DialogTitle } from '@workspace/airo-ui/components/dialog'; -import { forwardRef, useImperativeHandle, useRef, useState } from 'react'; +import { + Dialog, + DialogContent, + DialogTitle, + DialogTrigger, +} from '@workspace/airo-ui/components/dialog'; +import { useRef, useState } from 'react'; import TabContent from '@/components/SubscribePlan/PlanContent/index'; import PlanTabs from '@/components/SubscribePlan/PlanTabs/PlanTabs'; +import { Button } from '@workspace/airo-ui/components/button'; import { useTranslations } from 'next-intl'; -export interface OfferDialogRef { - show: () => void; - hide: () => void; -} - -const OfferDialog = forwardRef((props, ref) => { +const OfferDialog = () => { const t = useTranslations('components.offerDialog'); + const tHome = useTranslations('components.home'); + const [open, setOpen] = useState(false); const [tabValue, setTabValue] = useState<'year' | 'month'>('year'); const dialogRef = useRef(null); @@ -40,28 +43,26 @@ const OfferDialog = forwardRef((props, ref) => { }, enabled: true, // 初始不执行,手动控制 retry: 1, // 失败时重试1次 + refetchOnWindowFocus: true, }); - useImperativeHandle(ref, () => ({ - show: () => { - refetch(); - setOpen(true); - }, - hide: () => setOpen(false), - })); - return ( + + +
-
+
{t('selectPlan')}
-
+
{t('selectYourPlan')}
@@ -80,6 +81,6 @@ const OfferDialog = forwardRef((props, ref) => {
); -}); +}; export default OfferDialog; diff --git a/apps/user/components/subscribe/purchase.tsx b/apps/user/components/subscribe/purchase.tsx index 59d5482..c083a8d 100644 --- a/apps/user/components/subscribe/purchase.tsx +++ b/apps/user/components/subscribe/purchase.tsx @@ -5,7 +5,7 @@ import PlanTabs, { TabValueType } from '@/components/SubscribePlan/PlanTabs/Plan import useGlobalStore from '@/config/use-global'; import { preCreateOrder, purchase } from '@/services/user/order'; import { useQuery } from '@tanstack/react-query'; -import { Button } from '@workspace/airo-ui/components/button'; +import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; import { Dialog, DialogContent, @@ -164,14 +164,10 @@ const Purchase = forwardRef((props, ref) => { />
- +
diff --git a/apps/user/components/subscribe/renewal.tsx b/apps/user/components/subscribe/renewal.tsx index 5261cdc..842cc72 100644 --- a/apps/user/components/subscribe/renewal.tsx +++ b/apps/user/components/subscribe/renewal.tsx @@ -6,7 +6,6 @@ import useGlobalStore from '@/config/use-global'; import { preCreateOrder, renewal } from '@/services/user/order'; import { useQuery } from '@tanstack/react-query'; import { AiroButton } from '@workspace/airo-ui/components/AiroButton'; -import { Button } from '@workspace/airo-ui/components/button'; import { Dialog, DialogContent, @@ -103,9 +102,9 @@ export default function Renewal({ id, subscribe, className }: Readonly - + diff --git a/apps/user/locales/en-US/affiliate.json b/apps/user/locales/en-US/affiliate.json index faea8d0..d558288 100644 --- a/apps/user/locales/en-US/affiliate.json +++ b/apps/user/locales/en-US/affiliate.json @@ -1,7 +1,7 @@ { "annualPackage": "Annual Package", "commissionCalculation": "Commission Calculation", - "commissionCalculationInfo": "Fill in the corresponding number of invited users below to calculate the commission amount at different ratios. *This table is calculated based on the Pro Plan. The ratios for other plans remain unchanged, and the calculation is based on the actual amount.", + "commissionCalculationInfo": "Fill in the corresponding number of invited users below to calculate the commission amount at different ratios. \n *This table is calculated based on the Pro Plan. The ratios for other plans remain unchanged, and the calculation is based on the actual amount.", "commissionInfo": "Commission amount, which is automatically transferred to the wallet balance after a successful invitation.", "commissionInviteCode": "Commission Invite Code", "commissionRate": "Commission Rate", diff --git a/apps/user/locales/zh-CN/affiliate.json b/apps/user/locales/zh-CN/affiliate.json index 0691a68..30bab98 100644 --- a/apps/user/locales/zh-CN/affiliate.json +++ b/apps/user/locales/zh-CN/affiliate.json @@ -1,7 +1,7 @@ { "annualPackage": "年付套餐", "commissionCalculation": "佣金计算", - "commissionCalculationInfo": "在下方填入对应邀请用户数量,即可计算不同比例返佣金额 *该表以Pro Plan计算,其它套餐比例不变,以实际金额计算为准", + "commissionCalculationInfo": "在下方填入对应邀请用户数量,即可计算不同比例返佣金额 \n *该表以Pro Plan计算,其它套餐比例不变,以实际金额计算为准", "commissionInfo": "佣金金额,邀请成功后自动转入钱包余额", "commissionInviteCode": "返佣邀请码", "commissionRate": "佣金比例", diff --git a/apps/user/tailwind.config.ts b/apps/user/tailwind.config.ts index 89aa5e4..f45abf7 100644 --- a/apps/user/tailwind.config.ts +++ b/apps/user/tailwind.config.ts @@ -1,5 +1,11 @@ import baseConfig from '@workspace/airo-ui/tailwind.config'; +baseConfig.theme.extend.boxShadow = { + ...baseConfig.theme.extend.boxShadow, + ...{ + input: 'inset 0 0 7.6px 0 rgba(0, 0, 0, 0.25) ', + }, +}; const config = { ...baseConfig, darkMode: false, // 或 'media' 或 'class',根据你的需求覆盖 diff --git a/packages/airo-ui/src/components/AiroButton.tsx b/packages/airo-ui/src/components/AiroButton.tsx index d170ae8..74d7296 100644 --- a/packages/airo-ui/src/components/AiroButton.tsx +++ b/packages/airo-ui/src/components/AiroButton.tsx @@ -13,6 +13,7 @@ const buttonVariants = cva( primary: 'bg-[#225BA9] text-primary-foreground shadow hover:bg-[#0F2C53] ', danger: 'bg-[#FF4248] text-primary-foreground shadow hover:bg-[#E22C2E]', dangerLink: 'text-[#E22C2E] ', + primaryBlue: 'bg-[#A8D4ED] text-primary-foreground hover:bg-[#225BA9]', destructive: 'bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90', outline: 'border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground', diff --git a/packages/airo-ui/src/components/button.tsx b/packages/airo-ui/src/components/button.tsx index 7491423..63eadd6 100644 --- a/packages/airo-ui/src/components/button.tsx +++ b/packages/airo-ui/src/components/button.tsx @@ -5,7 +5,7 @@ import * as React from 'react'; import { cn } from '@workspace/airo-ui/lib/utils'; const buttonVariants = cva( - 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0', + 'inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer', { variants: { variant: { diff --git a/packages/airo-ui/src/custom-components/pro-list/pro-list.tsx b/packages/airo-ui/src/custom-components/pro-list/pro-list.tsx index ba39758..f2ca229 100644 --- a/packages/airo-ui/src/custom-components/pro-list/pro-list.tsx +++ b/packages/airo-ui/src/custom-components/pro-list/pro-list.tsx @@ -133,42 +133,44 @@ export function ProList>({ return (
-
-
- {params ? ( -
- [item.id, item.value]))} - /> - -
- ) : ( - header?.title - )} + {params || header ? ( +
+
+ {params ? ( +
+ [item.id, item.value]))} + /> + +
+ ) : ( + header?.title + )} +
+
+ {params && params?.length > 0 && ( + <> + + + )} + {header?.toolbar} +
-
- {params && params?.length > 0 && ( - <> - - - )} - {header?.toolbar} -
-
+ ) : null} {selectedCount > 0 && batchRender && (