diff --git a/CHANGELOG.md b/CHANGELOG.md index 188dd07..c4ec8da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,49 +1,43 @@ + # Changelog # [1.0.0-beta.26](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.25...v1.0.0-beta.26) (2025-03-02) - ### 🐛 Bug Fixes -* **icon**: Comment out unused icon collection imports ([f17bf8d](https://github.com/perfect-panel/ppanel-web/commit/f17bf8d)) +- **icon**: Comment out unused icon collection imports ([f17bf8d](https://github.com/perfect-panel/ppanel-web/commit/f17bf8d)) # [1.0.0-beta.25](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.24...v1.0.0-beta.25) (2025-03-01) - ### ✨ Features -* **auth**: Add privacy policy link to the footer ([8e16ef1](https://github.com/perfect-panel/ppanel-web/commit/8e16ef1)) - +- **auth**: Add privacy policy link to the footer ([8e16ef1](https://github.com/perfect-panel/ppanel-web/commit/8e16ef1)) ### 🐛 Bug Fixes -* **dashboard**: Display subscription creation date in user dashboard ([d0e6df0](https://github.com/perfect-panel/ppanel-web/commit/d0e6df0)) -* **request**: Add error code 40005 to trigger logout ([71bf002](https://github.com/perfect-panel/ppanel-web/commit/71bf002)) -* **subscribe**: Update payment return URL ([2b80496](https://github.com/perfect-panel/ppanel-web/commit/2b80496)) +- **dashboard**: Display subscription creation date in user dashboard ([d0e6df0](https://github.com/perfect-panel/ppanel-web/commit/d0e6df0)) +- **request**: Add error code 40005 to trigger logout ([71bf002](https://github.com/perfect-panel/ppanel-web/commit/71bf002)) +- **subscribe**: Update payment return URL ([2b80496](https://github.com/perfect-panel/ppanel-web/commit/2b80496)) # [1.0.0-beta.24](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.23...v1.0.0-beta.24) (2025-02-27) - ### ♻ Code Refactoring -* **ui**: Optimize document display ([2ca2992](https://github.com/perfect-panel/ppanel-web/commit/2ca2992)) -* Reduce code complexity and improve readability ([e11f18c](https://github.com/perfect-panel/ppanel-web/commit/e11f18c)) - +- **ui**: Optimize document display ([2ca2992](https://github.com/perfect-panel/ppanel-web/commit/2ca2992)) +- Reduce code complexity and improve readability ([e11f18c](https://github.com/perfect-panel/ppanel-web/commit/e11f18c)) ### ✨ Features -* **loading**: Add loading components and integrate them in Providers ([d5847fa](https://github.com/perfect-panel/ppanel-web/commit/d5847fa)) - +- **loading**: Add loading components and integrate them in Providers ([d5847fa](https://github.com/perfect-panel/ppanel-web/commit/d5847fa)) ### 🎫 Chores -* **merge**: Add advertising module and device settings ([0130e02](https://github.com/perfect-panel/ppanel-web/commit/0130e02)) - +- **merge**: Add advertising module and device settings ([0130e02](https://github.com/perfect-panel/ppanel-web/commit/0130e02)) ### 🐛 Bug Fixes -* **locales**: Order recharge related fields ([35210fe](https://github.com/perfect-panel/ppanel-web/commit/35210fe)) +- **locales**: Order recharge related fields ([35210fe](https://github.com/perfect-panel/ppanel-web/commit/35210fe)) diff --git a/apps/admin/app/dashboard/order/page.tsx b/apps/admin/app/dashboard/order/page.tsx index 373ad5b..a52803f 100644 --- a/apps/admin/app/dashboard/order/page.tsx +++ b/apps/admin/app/dashboard/order/page.tsx @@ -116,7 +116,7 @@ export default function Page(props: any) { diff --git a/apps/admin/app/dashboard/payment/alipayf2f.tsx b/apps/admin/app/dashboard/payment/alipayf2f.tsx deleted file mode 100644 index 51c5849..0000000 --- a/apps/admin/app/dashboard/payment/alipayf2f.tsx +++ /dev/null @@ -1,256 +0,0 @@ -'use client'; - -import { getAlipayF2FPaymentConfig, updateAlipayF2FPaymentConfig } from '@/services/admin/payment'; -import { useQuery } from '@tanstack/react-query'; -import { Label } from '@workspace/ui/components/label'; -import { - Select, - SelectContent, - SelectGroup, - SelectItem, - SelectTrigger, - SelectValue, -} from '@workspace/ui/components/select'; -import { Switch } from '@workspace/ui/components/switch'; -import { Table, TableBody, TableCell, TableRow } from '@workspace/ui/components/table'; -import { Textarea } from '@workspace/ui/components/textarea'; -import { EnhancedInput } from '@workspace/ui/custom-components/enhanced-input'; -import { unitConversion } from '@workspace/ui/utils'; -import { useTranslations } from 'next-intl'; -import { toast } from 'sonner'; - -export default function AlipayF2F() { - const t = useTranslations('payment'); - - const { data, refetch } = useQuery({ - queryKey: ['getAlipayF2FPaymentConfig'], - queryFn: async () => { - const { data } = await getAlipayF2FPaymentConfig(); - - return data.data; - }, - }); - - async function updateConfig(key: string, value: unknown) { - if (data?.[key] === value) return; - try { - await updateAlipayF2FPaymentConfig({ - ...data, - [key]: value, - } as API.UpdateAlipayF2fRequest); - toast.success(t('saveSuccess')); - refetch(); - } catch (error) { - /* empty */ - } - } - - return ( - - - - - -

{t('enableDescription')}

-
- - { - updateConfig('enable', checked); - }} - /> - -
- - - -

{t('alipayf2f.sandboxDescription')}

-
- - { - updateConfig('config', { - ...data?.config, - sandbox: checked, - }); - }} - /> - -
- - - -

{t('showNameDescription')}

-
- - updateConfig('name', value)} - /> - -
- - - -

{t('iconUrlDescription')}

-
- - updateConfig('icon', value)} - /> - -
- - - -

{t('notifyUrlDescription')}

-
- - updateConfig('domain', value)} - /> - -
- - - -

{t('feeModeDescription')}

-
- - - -
- - - -

{t('feePercentDescription')}

-
- - updateConfig('fee_percent', value)} - suffix='%' - /> - -
- - - -

{t('fixedFeeDescription')}

-
- - unitConversion('centsToDollars', value)} - formatOutput={(value) => unitConversion('dollarsToCents', value)} - onValueBlur={(value) => updateConfig('fee_amount', value)} - /> - -
- - - -

- - - - updateConfig('config', { - ...data?.config, - app_id: value, - }) - } - /> - - - - - -

- - -