Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 23c974a94d | |||
| ee286dd629 | |||
| 4418c47f4f | |||
| 2d88a3a81d | |||
| 1f29506179 | |||
| c90175b6eb | |||
| 5cf573ab03 | |||
| fc55e9544d |
+59
-34
@@ -1,55 +1,80 @@
|
|||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
# [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)
|
# [1.0.0-beta.13](https://github.com/perfect-panel/ppanel-web/compare/v1.0.0-beta.12...v1.0.0-beta.13) (2025-02-21)
|
||||||
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
* **register**: Adjust user email verification logic to handle domain suffix checks correctly ([686aa2d](https://github.com/perfect-panel/ppanel-web/commit/686aa2d))
|
* **api**: Fix type error in API request and add return URL parameter ([ee286dd](https://github.com/perfect-panel/ppanel-web/commit/ee286dd))
|
||||||
|
|
||||||
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
# 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))
|
||||||
|
|
||||||
|
# [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))
|
||||||
|
|
||||||
|
# [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))
|
||||||
|
|
||||||
|
# [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))
|
||||||
|
|
||||||
# [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)
|
# [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
|
### ✨ Features
|
||||||
|
|
||||||
* **accounts**: Update third-party account binding and unbinding ([1841552](https://github.com/perfect-panel/ppanel-web/commit/1841552))
|
- **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**: 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-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**: 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))
|
- **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))
|
- **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))
|
- **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**: 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))
|
- **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))
|
- **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))
|
- **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))
|
- **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))
|
- **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))
|
- **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 ([3a3d223](https://github.com/perfect-panel/ppanel-web/commit/3a3d223))
|
||||||
* **user**: Add User Detail ([fdaf11b](https://github.com/perfect-panel/ppanel-web/commit/fdaf11b))
|
- **user**: Add User Detail ([fdaf11b](https://github.com/perfect-panel/ppanel-web/commit/fdaf11b))
|
||||||
|
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 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 ([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**: 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-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))
|
- **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))
|
- **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**: 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))
|
- **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**: 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))
|
- **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**: 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 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))
|
- **user**: Update notification and verify code settings ([574b043](https://github.com/perfect-panel/ppanel-web/commit/574b043))
|
||||||
|
|
||||||
|
|
||||||
### 💄 Styles
|
### 💄 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))
|
||||||
|
|
||||||
<a name="readme-top"></a>
|
<a name="readme-top"></a>
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default function Page() {
|
|||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...ref.current,
|
...ref.current,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -159,7 +159,7 @@ export default function Page() {
|
|||||||
updateConfig('config', {
|
updateConfig('config', {
|
||||||
...data?.config,
|
...data?.config,
|
||||||
platform_config: {
|
platform_config: {
|
||||||
...data?.platform_config,
|
...ref.current?.config?.platform_config,
|
||||||
port: value,
|
port: value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -181,7 +181,7 @@ export default function Page() {
|
|||||||
updateConfig('config', {
|
updateConfig('config', {
|
||||||
...data?.config,
|
...data?.config,
|
||||||
platform_config: {
|
platform_config: {
|
||||||
...data?.platform_config,
|
...ref.current?.config?.platform_config,
|
||||||
ssl: checked,
|
ssl: checked,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -202,7 +202,7 @@ export default function Page() {
|
|||||||
updateConfig('config', {
|
updateConfig('config', {
|
||||||
...data?.config,
|
...data?.config,
|
||||||
platform_config: {
|
platform_config: {
|
||||||
...data?.platform_config,
|
...ref.current?.config?.platform_config,
|
||||||
user: value,
|
user: value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -224,7 +224,7 @@ export default function Page() {
|
|||||||
updateConfig('config', {
|
updateConfig('config', {
|
||||||
...data?.config,
|
...data?.config,
|
||||||
platform_config: {
|
platform_config: {
|
||||||
...data?.platform_config,
|
...ref.current?.config?.platform_config,
|
||||||
pass: value,
|
pass: value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -245,7 +245,7 @@ export default function Page() {
|
|||||||
updateConfig('config', {
|
updateConfig('config', {
|
||||||
...data?.config,
|
...data?.config,
|
||||||
platform_config: {
|
platform_config: {
|
||||||
...data?.platform_config,
|
...ref.current?.config?.platform_config,
|
||||||
from: value,
|
from: value,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ export function Verify() {
|
|||||||
<TableCell className='text-right'>
|
<TableCell className='text-right'>
|
||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
placeholder={t('inputPlaceholder')}
|
placeholder={t('inputPlaceholder')}
|
||||||
defaultValue={data?.turnstile_site_key}
|
value={data?.turnstile_site_key}
|
||||||
onValueBlur={(value) => updateConfig('turnstile_site_key', value)}
|
onValueBlur={(value) => updateConfig('turnstile_site_key', value)}
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@@ -64,7 +64,7 @@ export function Verify() {
|
|||||||
<TableCell className='text-right'>
|
<TableCell className='text-right'>
|
||||||
<EnhancedInput
|
<EnhancedInput
|
||||||
placeholder={t('inputPlaceholder')}
|
placeholder={t('inputPlaceholder')}
|
||||||
defaultValue={data?.turnstile_secret}
|
value={data?.turnstile_secret}
|
||||||
onValueBlur={(value) => updateConfig('turnstile_secret', value)}
|
onValueBlur={(value) => updateConfig('turnstile_secret', value)}
|
||||||
/>
|
/>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ export default function Page() {
|
|||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('updateSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -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 {
|
try {
|
||||||
await updateAuthMethodConfig({
|
await updateAuthMethodConfig({
|
||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.UpdataAuthMethodConfigRequest);
|
} as API.UpdateAuthMethodConfigRequest);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('saveSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default function SubscribeConfig() {
|
|||||||
...data,
|
...data,
|
||||||
[key]: value,
|
[key]: value,
|
||||||
} as API.SubscribeConfig);
|
} as API.SubscribeConfig);
|
||||||
toast.success(t('saveSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
refetch();
|
refetch();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
/* empty */
|
/* empty */
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
server_group: z.array(z.number()).optional().default([]),
|
server_group: z.array(z.number()).optional().default([]),
|
||||||
server: z.array(z.number()).optional().default([]),
|
server: z.array(z.number()).optional().default([]),
|
||||||
deduction_ratio: z.number().optional().default(0),
|
deduction_ratio: z.number().optional().default(0),
|
||||||
purchase_with_discount: z.boolean().optional().default(false),
|
allow_deduction: z.boolean().optional().default(false),
|
||||||
reset_cycle: z.number().optional().default(0),
|
reset_cycle: z.number().optional().default(0),
|
||||||
renewal_reset: z.boolean().optional().default(false),
|
renewal_reset: z.boolean().optional().default(false),
|
||||||
});
|
});
|
||||||
@@ -639,7 +639,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
|
|||||||
/>
|
/>
|
||||||
<FormField
|
<FormField
|
||||||
control={form.control}
|
control={form.control}
|
||||||
name='purchase_with_discount'
|
name='allow_deduction'
|
||||||
render={({ field }) => (
|
render={({ field }) => (
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<div className='flex items-center justify-between'>
|
<div className='flex items-center justify-between'>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import { useTranslations } from 'next-intl';
|
|||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
import { toast } from 'sonner';
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
export function AuthMethodsForm({ user }: { user: API.User }) {
|
export function AuthMethodsForm({ user, refetch }: { user: API.User; refetch: () => void }) {
|
||||||
const t = useTranslations('user');
|
const t = useTranslations('user');
|
||||||
|
|
||||||
const [emailChanges, setEmailChanges] = useState<Record<string, string>>({});
|
const [emailChanges, setEmailChanges] = useState<Record<string, string>>({});
|
||||||
@@ -33,6 +33,7 @@ export function AuthMethodsForm({ user }: { user: API.User }) {
|
|||||||
auth_identifier: email,
|
auth_identifier: email,
|
||||||
});
|
});
|
||||||
toast.success(t('updateSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
|
refetch();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCreateEmail = async (email: string) => {
|
const handleCreateEmail = async (email: string) => {
|
||||||
@@ -42,6 +43,7 @@ export function AuthMethodsForm({ user }: { user: API.User }) {
|
|||||||
auth_identifier: email,
|
auth_identifier: email,
|
||||||
});
|
});
|
||||||
toast.success(t('createSuccess'));
|
toast.success(t('createSuccess'));
|
||||||
|
refetch();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEmailChange = (authType: string, value: string) => {
|
const handleEmailChange = (authType: string, value: string) => {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const basicInfoSchema = z.object({
|
|||||||
|
|
||||||
type BasicInfoValues = z.infer<typeof basicInfoSchema>;
|
type BasicInfoValues = z.infer<typeof basicInfoSchema>;
|
||||||
|
|
||||||
export function BasicInfoForm({ user }: { user: API.User }) {
|
export function BasicInfoForm({ user, refetch }: { user: API.User; refetch: () => void }) {
|
||||||
const t = useTranslations('user');
|
const t = useTranslations('user');
|
||||||
|
|
||||||
const { common } = useGlobalStore();
|
const { common } = useGlobalStore();
|
||||||
@@ -64,6 +64,7 @@ export function BasicInfoForm({ user }: { user: API.User }) {
|
|||||||
...data,
|
...data,
|
||||||
} as API.UpdateUserBasiceInfoRequest);
|
} as API.UpdateUserBasiceInfoRequest);
|
||||||
toast.success(t('updateSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
|
refetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { NotifySettingsForm } from './notify-settings-form';
|
|||||||
export function UserProfileForm() {
|
export function UserProfileForm() {
|
||||||
const { id } = useParams<{ id: string }>();
|
const { id } = useParams<{ id: string }>();
|
||||||
|
|
||||||
const { data: user } = useQuery({
|
const { data: user, refetch } = useQuery({
|
||||||
queryKey: ['user', id],
|
queryKey: ['user', id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await getUserDetail({
|
const { data } = await getUserDetail({
|
||||||
@@ -25,13 +25,13 @@ export function UserProfileForm() {
|
|||||||
return (
|
return (
|
||||||
<div className='grid gap-4 md:grid-cols-2 xl:grid-cols-3'>
|
<div className='grid gap-4 md:grid-cols-2 xl:grid-cols-3'>
|
||||||
<div className='md:col-span-2 xl:col-span-1'>
|
<div className='md:col-span-2 xl:col-span-1'>
|
||||||
<BasicInfoForm user={user} />
|
<BasicInfoForm user={user} refetch={refetch} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<NotifySettingsForm user={user} />
|
<NotifySettingsForm user={user} refetch={refetch} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<AuthMethodsForm user={user} />
|
<AuthMethodsForm user={user} refetch={refetch} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const notifySettingsSchema = z.object({
|
|||||||
|
|
||||||
type NotifySettingsValues = z.infer<typeof notifySettingsSchema>;
|
type NotifySettingsValues = z.infer<typeof notifySettingsSchema>;
|
||||||
|
|
||||||
export function NotifySettingsForm({ user }: { user: API.User }) {
|
export function NotifySettingsForm({ user, refetch }: { user: API.User; refetch: () => void }) {
|
||||||
const t = useTranslations('user');
|
const t = useTranslations('user');
|
||||||
|
|
||||||
const form = useForm<NotifySettingsValues>({
|
const form = useForm<NotifySettingsValues>({
|
||||||
@@ -39,6 +39,7 @@ export function NotifySettingsForm({ user }: { user: API.User }) {
|
|||||||
user_id: user.id,
|
user_id: user.id,
|
||||||
});
|
});
|
||||||
toast.success(t('updateSuccess'));
|
toast.success(t('updateSuccess'));
|
||||||
|
refetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export function SubscriptionDetail({
|
|||||||
header: 'ID',
|
header: 'ID',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
accessorKey: 'imei',
|
accessorKey: 'identifier',
|
||||||
header: 'IMEI',
|
header: 'IMEI',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -182,7 +182,7 @@ export function SubscriptionDetail({
|
|||||||
}}
|
}}
|
||||||
actions={{
|
actions={{
|
||||||
render: (row) => {
|
render: (row) => {
|
||||||
if (!row.imei) return [];
|
if (!row.identifier) return [];
|
||||||
return [
|
return [
|
||||||
<ConfirmButton
|
<ConfirmButton
|
||||||
key='offline'
|
key='offline'
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export async function getAuthMethodConfig(
|
|||||||
|
|
||||||
/** Update auth method config PUT /v1/admin/auth-method/config */
|
/** Update auth method config PUT /v1/admin/auth-method/config */
|
||||||
export async function updateAuthMethodConfig(
|
export async function updateAuthMethodConfig(
|
||||||
body: API.UpdataAuthMethodConfigRequest,
|
body: API.UpdateAuthMethodConfigRequest,
|
||||||
options?: { [key: string]: any },
|
options?: { [key: string]: any },
|
||||||
) {
|
) {
|
||||||
return request<API.Response & { data?: API.AuthMethodConfig }>('/v1/admin/auth-method/config', {
|
return request<API.Response & { data?: API.AuthMethodConfig }>('/v1/admin/auth-method/config', {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as announcement from './announcement';
|
import * as announcement from './announcement';
|
||||||
|
|||||||
+8
-8
@@ -1177,13 +1177,6 @@ declare namespace API {
|
|||||||
security_config: SecurityConfig;
|
security_config: SecurityConfig;
|
||||||
};
|
};
|
||||||
|
|
||||||
type UpdataAuthMethodConfigRequest = {
|
|
||||||
id: number;
|
|
||||||
method: string;
|
|
||||||
config: Record<string, any>;
|
|
||||||
enabled: boolean;
|
|
||||||
};
|
|
||||||
|
|
||||||
type UpdateAlipayF2fRequest = {
|
type UpdateAlipayF2fRequest = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -1230,6 +1223,13 @@ declare namespace API {
|
|||||||
application_id: number;
|
application_id: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
type UpdateAuthMethodConfigRequest = {
|
||||||
|
id: number;
|
||||||
|
method: string;
|
||||||
|
config: Record<string, any>;
|
||||||
|
enabled: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
type UpdateCouponRequest = {
|
type UpdateCouponRequest = {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
@@ -1440,7 +1440,7 @@ declare namespace API {
|
|||||||
type UserDevice = {
|
type UserDevice = {
|
||||||
id: number;
|
id: number;
|
||||||
ip: string;
|
ip: string;
|
||||||
imei: string;
|
identifier: string;
|
||||||
user_agent: string;
|
user_agent: string;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as auth from './auth';
|
import * as auth from './auth';
|
||||||
|
|||||||
+1
-1
@@ -628,7 +628,7 @@ declare namespace API {
|
|||||||
type UserDevice = {
|
type UserDevice = {
|
||||||
id: number;
|
id: number;
|
||||||
ip: string;
|
ip: string;
|
||||||
imei: string;
|
identifier: string;
|
||||||
user_agent: string;
|
user_agent: string;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function Page() {
|
|||||||
enabled: !!orderNo && data?.status === 1,
|
enabled: !!orderNo && data?.status === 1,
|
||||||
queryKey: ['checkoutOrder', orderNo],
|
queryKey: ['checkoutOrder', orderNo],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const { data } = await checkoutOrder({ orderNo: orderNo! });
|
const { data } = await checkoutOrder({ orderNo: orderNo!, returnUrl: window.location.href });
|
||||||
return data?.data;
|
return data?.data;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export function Hero() {
|
|||||||
<HoverBorderGradient
|
<HoverBorderGradient
|
||||||
containerClassName='rounded-full'
|
containerClassName='rounded-full'
|
||||||
as='button'
|
as='button'
|
||||||
className='bg-background text-foreground flex items-center space-x-2'
|
className='m-0.5 flex items-center space-x-2 text-white'
|
||||||
>
|
>
|
||||||
{t('started')}
|
{t('started')}
|
||||||
</HoverBorderGradient>
|
</HoverBorderGradient>
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ export default function Purchase({ subscribe, setSubscribe }: Readonly<PurchaseP
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
|
returnUrl: window.location.href,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ export default function Recharge(props: Readonly<ButtonProps>) {
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
|
returnUrl: window.location.href,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ export default function Renewal({ id, subscribe }: Readonly<RenewalProps>) {
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
|
returnUrl: window.location.href,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -86,6 +86,7 @@ export default function ResetTraffic({ id, replacement }: Readonly<ResetTrafficP
|
|||||||
if (orderNo) {
|
if (orderNo) {
|
||||||
const { data } = await checkoutOrder({
|
const { data } = await checkoutOrder({
|
||||||
orderNo,
|
orderNo,
|
||||||
|
returnUrl: window.location.href,
|
||||||
});
|
});
|
||||||
const type = data.data?.type;
|
const type = data.data?.type;
|
||||||
const checkout_url = data.data?.checkout_url;
|
const checkout_url = data.data?.checkout_url;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|
||||||
// API 更新时间:
|
// API 更新时间:
|
||||||
// API 唯一标识:
|
// API 唯一标识:
|
||||||
import * as auth from './auth';
|
import * as auth from './auth';
|
||||||
|
|||||||
+1
-1
@@ -628,7 +628,7 @@ declare namespace API {
|
|||||||
type UserDevice = {
|
type UserDevice = {
|
||||||
id: number;
|
id: number;
|
||||||
ip: string;
|
ip: string;
|
||||||
imei: string;
|
identifier: string;
|
||||||
user_agent: string;
|
user_agent: string;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
Vendored
+2
-1
@@ -91,6 +91,7 @@ declare namespace API {
|
|||||||
|
|
||||||
type CheckoutOrderRequest = {
|
type CheckoutOrderRequest = {
|
||||||
orderNo: string;
|
orderNo: string;
|
||||||
|
returnUrl?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type CheckoutOrderResponse = {
|
type CheckoutOrderResponse = {
|
||||||
@@ -828,7 +829,7 @@ declare namespace API {
|
|||||||
type UserDevice = {
|
type UserDevice = {
|
||||||
id: number;
|
id: number;
|
||||||
ip: string;
|
ip: string;
|
||||||
imei: string;
|
identifier: string;
|
||||||
user_agent: string;
|
user_agent: string;
|
||||||
online: boolean;
|
online: boolean;
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ppanel-web",
|
"name": "ppanel-web",
|
||||||
"version": "1.0.0-beta.9",
|
"version": "1.0.0-beta.13",
|
||||||
"private": true,
|
"private": true,
|
||||||
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
"homepage": "https://github.com/perfect-panel/ppanel-web",
|
||||||
"bugs": {
|
"bugs": {
|
||||||
|
|||||||
Reference in New Issue
Block a user