diff --git a/CHANGELOG.md b/CHANGELOG.md index afe117b..6e4e964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,76 +1,70 @@ + # Changelog # [1.0.0-beta.12](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.11...v1.0.0-beta.12) (2025-02-18) - ### 🐛 Bug Fixes -* More bugs ([2d88a3a](https://github.com/perfect-panel/ppanel-web/commit/2d88a3a)) +- More bugs ([2d88a3a](https://github.com/perfect-panel/ppanel-web/commit/2d88a3a)) # [1.0.0-beta.11](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.10...v1.0.0-beta.11) (2025-02-16) - ### 🐛 Bug Fixes -* **email**: Update platform configuration handling to use current ref for consistency ([c90175b](https://github.com/perfect-panel/ppanel-web/commit/c90175b)) +- **email**: Update platform configuration handling to use current ref for consistency ([c90175b](https://github.com/perfect-panel/ppanel-web/commit/c90175b)) # [1.0.0-beta.10](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.9...v1.0.0-beta.10) (2025-02-16) - ### 🐛 Bug Fixes -* **subscribe**: Update forms to include refetch functionality and improve toast messages ([fc55e95](https://github.com/perfect-panel/ppanel-web/commit/fc55e95)) +- **subscribe**: Update forms to include refetch functionality and improve toast messages ([fc55e95](https://github.com/perfect-panel/ppanel-web/commit/fc55e95)) # [1.0.0-beta.9](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.8...v1.0.0-beta.9) (2025-02-15) - ### 🐛 Bug Fixes -* **register**: Adjust user email verification logic to handle domain suffix checks correctly ([686aa2d](https://github.com/perfect-panel/ppanel-web/commit/686aa2d)) +- **register**: Adjust user email verification logic to handle domain suffix checks correctly ([686aa2d](https://github.com/perfect-panel/ppanel-web/commit/686aa2d)) # [1.0.0-beta.8](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.7...v1.0.0-beta.8) (2025-02-15) - ### ✨ Features -* **accounts**: Update third-party account binding and unbinding ([1841552](https://github.com/perfect-panel/ppanel-web/commit/1841552)) -* **auth-control**: Adding phone number labels to mobile verification configurations in multiple languages ([046740f](https://github.com/perfect-panel/ppanel-web/commit/046740f)) -* **auth-control**: Update general ([3883646](https://github.com/perfect-panel/ppanel-web/commit/3883646)) -* **auth**: Add type parameter to SendCode and update related API typings ([4198871](https://github.com/perfect-panel/ppanel-web/commit/4198871)) -* **auth**: Refactor mobile authentication config to support whitelist functionality ([c761ec7](https://github.com/perfect-panel/ppanel-web/commit/c761ec7)) -* **device**: Modify IMEI to device identifier support ([e3f9ef6](https://github.com/perfect-panel/ppanel-web/commit/e3f9ef6)) -* **imei**: Add IMEI related internationalization support and menu items ([13c3337](https://github.com/perfect-panel/ppanel-web/commit/13c3337)) -* **locales**: Add kick offline confirmation and success messages in multiple languages ([5db5343](https://github.com/perfect-panel/ppanel-web/commit/5db5343)) -* **locales**: Update 'sms' to 'mobile' in authentication methods across multiple languages ([fea2171](https://github.com/perfect-panel/ppanel-web/commit/fea2171)) -* **log**: Add message log retrieval functionality and update related typings ([1c0ecae](https://github.com/perfect-panel/ppanel-web/commit/1c0ecae)) -* **profile**: Update localization strings and enhance third-party account binding ([2d1effb](https://github.com/perfect-panel/ppanel-web/commit/2d1effb)) -* **release**: Extend supported platforms for Docker images, closes [#9](https://github.com/perfect-panel/ppanel-web/issues/9) ([e3a31eb](https://github.com/perfect-panel/ppanel-web/commit/e3a31eb)) -* **subscription**: Add delete user subscription functionality ([1fc3a10](https://github.com/perfect-panel/ppanel-web/commit/1fc3a10)) -* **ui**: Update input components and enhance card minimum width for better layout ([8a02310](https://github.com/perfect-panel/ppanel-web/commit/8a02310)) -* **user**: Add user Detail ([3a3d223](https://github.com/perfect-panel/ppanel-web/commit/3a3d223)) -* **user**: Add User Detail ([fdaf11b](https://github.com/perfect-panel/ppanel-web/commit/fdaf11b)) - +- **accounts**: Update third-party account binding and unbinding ([1841552](https://github.com/perfect-panel/ppanel-web/commit/1841552)) +- **auth-control**: Adding phone number labels to mobile verification configurations in multiple languages ([046740f](https://github.com/perfect-panel/ppanel-web/commit/046740f)) +- **auth-control**: Update general ([3883646](https://github.com/perfect-panel/ppanel-web/commit/3883646)) +- **auth**: Add type parameter to SendCode and update related API typings ([4198871](https://github.com/perfect-panel/ppanel-web/commit/4198871)) +- **auth**: Refactor mobile authentication config to support whitelist functionality ([c761ec7](https://github.com/perfect-panel/ppanel-web/commit/c761ec7)) +- **device**: Modify IMEI to device identifier support ([e3f9ef6](https://github.com/perfect-panel/ppanel-web/commit/e3f9ef6)) +- **imei**: Add IMEI related internationalization support and menu items ([13c3337](https://github.com/perfect-panel/ppanel-web/commit/13c3337)) +- **locales**: Add kick offline confirmation and success messages in multiple languages ([5db5343](https://github.com/perfect-panel/ppanel-web/commit/5db5343)) +- **locales**: Update 'sms' to 'mobile' in authentication methods across multiple languages ([fea2171](https://github.com/perfect-panel/ppanel-web/commit/fea2171)) +- **log**: Add message log retrieval functionality and update related typings ([1c0ecae](https://github.com/perfect-panel/ppanel-web/commit/1c0ecae)) +- **profile**: Update localization strings and enhance third-party account binding ([2d1effb](https://github.com/perfect-panel/ppanel-web/commit/2d1effb)) +- **release**: Extend supported platforms for Docker images, closes [#9](https://github.com/perfect-panel/ppanel-web/issues/9) ([e3a31eb](https://github.com/perfect-panel/ppanel-web/commit/e3a31eb)) +- **subscription**: Add delete user subscription functionality ([1fc3a10](https://github.com/perfect-panel/ppanel-web/commit/1fc3a10)) +- **ui**: Update input components and enhance card minimum width for better layout ([8a02310](https://github.com/perfect-panel/ppanel-web/commit/8a02310)) +- **user**: Add user Detail ([3a3d223](https://github.com/perfect-panel/ppanel-web/commit/3a3d223)) +- **user**: Add User Detail ([fdaf11b](https://github.com/perfect-panel/ppanel-web/commit/fdaf11b)) ### 🐛 Bug Fixes -* **auth-control**: Fix citation error for platform values ([c940f3c](https://github.com/perfect-panel/ppanel-web/commit/c940f3c)) -* **auth-control**: Fix citation error for platform values ([28813d2](https://github.com/perfect-panel/ppanel-web/commit/28813d2)) -* **auth-control**: Rename phone_variable to phone_number in mobile verification configuration ([e5455aa](https://github.com/perfect-panel/ppanel-web/commit/e5455aa)) -* **auth**: Update authentication configuration and localization strings ([47f2c58](https://github.com/perfect-panel/ppanel-web/commit/47f2c58)) -* **locales**: Update expiration time description from minutes to seconds in multiple languages ([5bac933](https://github.com/perfect-panel/ppanel-web/commit/5bac933)) -* **notify**: Ensure user info is updated after notification settings submission ([9bc3a94](https://github.com/perfect-panel/ppanel-web/commit/9bc3a94)) -* **notify**: Set default values for notification settings to false ([3652819](https://github.com/perfect-panel/ppanel-web/commit/3652819)) -* **third-party-accounts**: Remove mobile display logic from third-party accounts component ([b4946f7](https://github.com/perfect-panel/ppanel-web/commit/b4946f7)) -* **third-party-accounts**: Update redirect property name in binding response handling ([012e83a](https://github.com/perfect-panel/ppanel-web/commit/012e83a)) -* **user**: Refactor user form validation and reset password fields ([6733fc2](https://github.com/perfect-panel/ppanel-web/commit/6733fc2)) -* **user**: Update locales ([4e7d249](https://github.com/perfect-panel/ppanel-web/commit/4e7d249)) -* **user**: Update notification and verify code settings ([574b043](https://github.com/perfect-panel/ppanel-web/commit/574b043)) - +- **auth-control**: Fix citation error for platform values ([c940f3c](https://github.com/perfect-panel/ppanel-web/commit/c940f3c)) +- **auth-control**: Fix citation error for platform values ([28813d2](https://github.com/perfect-panel/ppanel-web/commit/28813d2)) +- **auth-control**: Rename phone_variable to phone_number in mobile verification configuration ([e5455aa](https://github.com/perfect-panel/ppanel-web/commit/e5455aa)) +- **auth**: Update authentication configuration and localization strings ([47f2c58](https://github.com/perfect-panel/ppanel-web/commit/47f2c58)) +- **locales**: Update expiration time description from minutes to seconds in multiple languages ([5bac933](https://github.com/perfect-panel/ppanel-web/commit/5bac933)) +- **notify**: Ensure user info is updated after notification settings submission ([9bc3a94](https://github.com/perfect-panel/ppanel-web/commit/9bc3a94)) +- **notify**: Set default values for notification settings to false ([3652819](https://github.com/perfect-panel/ppanel-web/commit/3652819)) +- **third-party-accounts**: Remove mobile display logic from third-party accounts component ([b4946f7](https://github.com/perfect-panel/ppanel-web/commit/b4946f7)) +- **third-party-accounts**: Update redirect property name in binding response handling ([012e83a](https://github.com/perfect-panel/ppanel-web/commit/012e83a)) +- **user**: Refactor user form validation and reset password fields ([6733fc2](https://github.com/perfect-panel/ppanel-web/commit/6733fc2)) +- **user**: Update locales ([4e7d249](https://github.com/perfect-panel/ppanel-web/commit/4e7d249)) +- **user**: Update notification and verify code settings ([574b043](https://github.com/perfect-panel/ppanel-web/commit/574b043)) ### 💄 Styles -* **dashboard**: Enhance card components with full height and improved empty state handling ([7e1d551](https://github.com/perfect-panel/ppanel-web/commit/7e1d551)) +- **dashboard**: Enhance card components with full height and improved empty state handling ([7e1d551](https://github.com/perfect-panel/ppanel-web/commit/7e1d551)) diff --git a/apps/admin/app/dashboard/auth-control/apple/page.tsx b/apps/admin/app/dashboard/auth-control/apple/page.tsx index 2a6dea3..d31bfe1 100644 --- a/apps/admin/app/dashboard/auth-control/apple/page.tsx +++ b/apps/admin/app/dashboard/auth-control/apple/page.tsx @@ -23,12 +23,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/device/page.tsx b/apps/admin/app/dashboard/auth-control/device/page.tsx index 1d7dec3..80ef357 100644 --- a/apps/admin/app/dashboard/auth-control/device/page.tsx +++ b/apps/admin/app/dashboard/auth-control/device/page.tsx @@ -21,12 +21,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/email/page.tsx b/apps/admin/app/dashboard/auth-control/email/page.tsx index f5632f5..a007978 100644 --- a/apps/admin/app/dashboard/auth-control/email/page.tsx +++ b/apps/admin/app/dashboard/auth-control/email/page.tsx @@ -48,7 +48,7 @@ export default function Page() { await updateAuthMethodConfig({ ...ref.current, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/facebook/page.tsx b/apps/admin/app/dashboard/auth-control/facebook/page.tsx index 90294cb..1788a9c 100644 --- a/apps/admin/app/dashboard/auth-control/facebook/page.tsx +++ b/apps/admin/app/dashboard/auth-control/facebook/page.tsx @@ -22,12 +22,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/github/page.tsx b/apps/admin/app/dashboard/auth-control/github/page.tsx index 98c53ad..dda883a 100644 --- a/apps/admin/app/dashboard/auth-control/github/page.tsx +++ b/apps/admin/app/dashboard/auth-control/github/page.tsx @@ -22,12 +22,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/google/page.tsx b/apps/admin/app/dashboard/auth-control/google/page.tsx index 56de639..3550359 100644 --- a/apps/admin/app/dashboard/auth-control/google/page.tsx +++ b/apps/admin/app/dashboard/auth-control/google/page.tsx @@ -22,12 +22,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/phone/page.tsx b/apps/admin/app/dashboard/auth-control/phone/page.tsx index 6dbfb3c..3d8eeed 100644 --- a/apps/admin/app/dashboard/auth-control/phone/page.tsx +++ b/apps/admin/app/dashboard/auth-control/phone/page.tsx @@ -61,7 +61,7 @@ export default function Page() { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('updateSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/auth-control/telegram/page.tsx b/apps/admin/app/dashboard/auth-control/telegram/page.tsx index 2d1cd8c..5e544ab 100644 --- a/apps/admin/app/dashboard/auth-control/telegram/page.tsx +++ b/apps/admin/app/dashboard/auth-control/telegram/page.tsx @@ -22,12 +22,12 @@ export default function Page() { }, }); - async function updateConfig(key: keyof API.UpdataAuthMethodConfigRequest, value: unknown) { + async function updateConfig(key: keyof API.UpdateAuthMethodConfigRequest, value: unknown) { try { await updateAuthMethodConfig({ ...data, [key]: value, - } as API.UpdataAuthMethodConfigRequest); + } as API.UpdateAuthMethodConfigRequest); toast.success(t('saveSuccess')); refetch(); } catch (error) { diff --git a/apps/admin/app/dashboard/user/[id]/user-subscription/subscription-detail.tsx b/apps/admin/app/dashboard/user/[id]/user-subscription/subscription-detail.tsx index 8ab1136..b893d21 100644 --- a/apps/admin/app/dashboard/user/[id]/user-subscription/subscription-detail.tsx +++ b/apps/admin/app/dashboard/user/[id]/user-subscription/subscription-detail.tsx @@ -143,7 +143,7 @@ export function SubscriptionDetail({ header: 'ID', }, { - accessorKey: 'imei', + accessorKey: 'identifier', header: 'IMEI', }, { @@ -182,7 +182,7 @@ export function SubscriptionDetail({ }} actions={{ render: (row) => { - if (!row.imei) return []; + if (!row.identifier) return []; return [ ('/v1/admin/auth-method/config', { diff --git a/apps/admin/services/admin/index.ts b/apps/admin/services/admin/index.ts index 1ca3f9e..5cf2608 100644 --- a/apps/admin/services/admin/index.ts +++ b/apps/admin/services/admin/index.ts @@ -1,5 +1,5 @@ // @ts-ignore - + // API 更新时间: // API 唯一标识: import * as announcement from './announcement'; diff --git a/apps/admin/services/admin/typings.d.ts b/apps/admin/services/admin/typings.d.ts index 8dca70c..63b5aea 100644 --- a/apps/admin/services/admin/typings.d.ts +++ b/apps/admin/services/admin/typings.d.ts @@ -1177,13 +1177,6 @@ declare namespace API { security_config: SecurityConfig; }; - type UpdataAuthMethodConfigRequest = { - id: number; - method: string; - config: Record; - enabled: boolean; - }; - type UpdateAlipayF2fRequest = { id: number; name: string; @@ -1230,6 +1223,13 @@ declare namespace API { application_id: number; }; + type UpdateAuthMethodConfigRequest = { + id: number; + method: string; + config: Record; + enabled: boolean; + }; + type UpdateCouponRequest = { id: number; name: string; @@ -1440,7 +1440,7 @@ declare namespace API { type UserDevice = { id: number; ip: string; - imei: string; + identifier: string; user_agent: string; online: boolean; enabled: boolean; diff --git a/apps/admin/services/common/index.ts b/apps/admin/services/common/index.ts index 73b3bda..61ba129 100644 --- a/apps/admin/services/common/index.ts +++ b/apps/admin/services/common/index.ts @@ -1,5 +1,5 @@ // @ts-ignore - + // API 更新时间: // API 唯一标识: import * as auth from './auth'; diff --git a/apps/admin/services/common/typings.d.ts b/apps/admin/services/common/typings.d.ts index 2bdb299..835a323 100644 --- a/apps/admin/services/common/typings.d.ts +++ b/apps/admin/services/common/typings.d.ts @@ -628,7 +628,7 @@ declare namespace API { type UserDevice = { id: number; ip: string; - imei: string; + identifier: string; user_agent: string; online: boolean; enabled: boolean; diff --git a/apps/user/app/(main)/(user)/payment/page.tsx b/apps/user/app/(main)/(user)/payment/page.tsx index 4453ba9..f2c824e 100644 --- a/apps/user/app/(main)/(user)/payment/page.tsx +++ b/apps/user/app/(main)/(user)/payment/page.tsx @@ -50,7 +50,7 @@ export default function Page() { enabled: !!orderNo && data?.status === 1, queryKey: ['checkoutOrder', orderNo], queryFn: async () => { - const { data } = await checkoutOrder({ orderNo: orderNo! }); + const { data } = await checkoutOrder({ orderNo: orderNo!, returnUrl: window.location.href }); return data?.data; }, }); diff --git a/apps/user/components/subscribe/purchase.tsx b/apps/user/components/subscribe/purchase.tsx index 06286e3..e827ebd 100644 --- a/apps/user/components/subscribe/purchase.tsx +++ b/apps/user/components/subscribe/purchase.tsx @@ -71,6 +71,7 @@ export default function Purchase({ subscribe, setSubscribe }: Readonly) { if (orderNo) { const { data } = await checkoutOrder({ orderNo, + returnUrl: window.location.href, }); const type = data.data?.type; const checkout_url = data.data?.checkout_url; diff --git a/apps/user/components/subscribe/renewal.tsx b/apps/user/components/subscribe/renewal.tsx index dd86ca3..232c2a3 100644 --- a/apps/user/components/subscribe/renewal.tsx +++ b/apps/user/components/subscribe/renewal.tsx @@ -79,6 +79,7 @@ export default function Renewal({ id, subscribe }: Readonly) { if (orderNo) { const { data } = await checkoutOrder({ orderNo, + returnUrl: window.location.href, }); const type = data.data?.type; const checkout_url = data.data?.checkout_url; diff --git a/apps/user/components/subscribe/reset-traffic.tsx b/apps/user/components/subscribe/reset-traffic.tsx index 07144b9..cb02b45 100644 --- a/apps/user/components/subscribe/reset-traffic.tsx +++ b/apps/user/components/subscribe/reset-traffic.tsx @@ -86,6 +86,7 @@ export default function ResetTraffic({ id, replacement }: Readonly