Compare commits

..

10 Commits

Author SHA1 Message Date
semantic-release-bot 23c974a94d 🔖 chore(release): v1.0.0-beta.13 [skip ci]
# [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

* **api**: Fix type error in API request and add return URL parameter ([ee286dd](https://github.com/perfect-panel/ppanel-web/commit/ee286dd))
2025-02-21 06:03:00 +00:00
web@ppanel ee286dd629 🐛 fix(api): Fix type error in API request and add return URL parameter 2025-02-21 12:59:23 +07:00
semantic-release-bot 4418c47f4f 🔖 chore(release): v1.0.0-beta.12 [skip ci]
# [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))
2025-02-18 14:57:24 +00:00
web@ppanel 2d88a3a81d 🐛 fix: More bugs 2025-02-18 21:53:24 +07:00
semantic-release-bot 1f29506179 🔖 chore(release): v1.0.0-beta.11 [skip ci]
# [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))
2025-02-16 12:09:00 +00:00
web@ppanel c90175b6eb 🐛 fix(email): Update platform configuration handling to use current ref for consistency 2025-02-16 19:06:17 +07:00
semantic-release-bot 5cf573ab03 🔖 chore(release): v1.0.0-beta.10 [skip ci]
# [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))
2025-02-16 10:14:25 +00:00
web@ppanel fc55e9544d 🐛 fix(subscribe): Update forms to include refetch functionality and improve toast messages 2025-02-16 17:08:34 +07:00
semantic-release-bot 855d1b096f 🔖 chore(release): v1.0.0-beta.9 [skip ci]
# [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))
2025-02-15 15:02:16 +00:00
web@ppanel 686aa2d0ba 🐛 fix(register): Adjust user email verification logic to handle domain suffix checks correctly 2025-02-15 21:58:25 +07:00
33 changed files with 129 additions and 89 deletions
+66 -34
View File
@@ -1,48 +1,80 @@
<a name="readme-top"></a>
# Changelog
# [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))
# [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
* **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))
* **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)
### ✨ 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))
### 🐛 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))
### 💄 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>
@@ -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) {
@@ -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) {
@@ -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) {
@@ -159,7 +159,7 @@ export default function Page() {
updateConfig('config', {
...data?.config,
platform_config: {
...data?.platform_config,
...ref.current?.config?.platform_config,
port: value,
},
})
@@ -181,7 +181,7 @@ export default function Page() {
updateConfig('config', {
...data?.config,
platform_config: {
...data?.platform_config,
...ref.current?.config?.platform_config,
ssl: checked,
},
})
@@ -202,7 +202,7 @@ export default function Page() {
updateConfig('config', {
...data?.config,
platform_config: {
...data?.platform_config,
...ref.current?.config?.platform_config,
user: value,
},
})
@@ -224,7 +224,7 @@ export default function Page() {
updateConfig('config', {
...data?.config,
platform_config: {
...data?.platform_config,
...ref.current?.config?.platform_config,
pass: value,
},
})
@@ -245,7 +245,7 @@ export default function Page() {
updateConfig('config', {
...data?.config,
platform_config: {
...data?.platform_config,
...ref.current?.config?.platform_config,
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 {
await updateAuthMethodConfig({
...data,
[key]: value,
} as API.UpdataAuthMethodConfigRequest);
} as API.UpdateAuthMethodConfigRequest);
toast.success(t('saveSuccess'));
refetch();
} catch (error) {
@@ -51,7 +51,7 @@ export function Verify() {
<TableCell className='text-right'>
<EnhancedInput
placeholder={t('inputPlaceholder')}
defaultValue={data?.turnstile_site_key}
value={data?.turnstile_site_key}
onValueBlur={(value) => updateConfig('turnstile_site_key', value)}
/>
</TableCell>
@@ -64,7 +64,7 @@ export function Verify() {
<TableCell className='text-right'>
<EnhancedInput
placeholder={t('inputPlaceholder')}
defaultValue={data?.turnstile_secret}
value={data?.turnstile_secret}
onValueBlur={(value) => updateConfig('turnstile_secret', value)}
/>
</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 {
await updateAuthMethodConfig({
...data,
[key]: value,
} as API.UpdataAuthMethodConfigRequest);
} as API.UpdateAuthMethodConfigRequest);
toast.success(t('saveSuccess'));
refetch();
} 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 {
await updateAuthMethodConfig({
...data,
[key]: value,
} as API.UpdataAuthMethodConfigRequest);
} as API.UpdateAuthMethodConfigRequest);
toast.success(t('saveSuccess'));
refetch();
} catch (error) {
@@ -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) {
@@ -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) {
@@ -30,7 +30,7 @@ export default function SubscribeConfig() {
...data,
[key]: value,
} as API.SubscribeConfig);
toast.success(t('saveSuccess'));
toast.success(t('updateSuccess'));
refetch();
} catch (error) {
/* empty */
@@ -105,7 +105,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
server_group: z.array(z.number()).optional().default([]),
server: z.array(z.number()).optional().default([]),
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),
renewal_reset: z.boolean().optional().default(false),
});
@@ -639,7 +639,7 @@ export default function SubscribeForm<T extends Record<string, any>>({
/>
<FormField
control={form.control}
name='purchase_with_discount'
name='allow_deduction'
render={({ field }) => (
<FormItem>
<div className='flex items-center justify-between'>
@@ -13,7 +13,7 @@ import { useTranslations } from 'next-intl';
import { useState } from 'react';
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 [emailChanges, setEmailChanges] = useState<Record<string, string>>({});
@@ -33,6 +33,7 @@ export function AuthMethodsForm({ user }: { user: API.User }) {
auth_identifier: email,
});
toast.success(t('updateSuccess'));
refetch();
};
const handleCreateEmail = async (email: string) => {
@@ -42,6 +43,7 @@ export function AuthMethodsForm({ user }: { user: API.User }) {
auth_identifier: email,
});
toast.success(t('createSuccess'));
refetch();
};
const handleEmailChange = (authType: string, value: string) => {
@@ -37,7 +37,7 @@ const basicInfoSchema = z.object({
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 { common } = useGlobalStore();
@@ -64,6 +64,7 @@ export function BasicInfoForm({ user }: { user: API.User }) {
...data,
} as API.UpdateUserBasiceInfoRequest);
toast.success(t('updateSuccess'));
refetch();
}
return (
@@ -10,7 +10,7 @@ import { NotifySettingsForm } from './notify-settings-form';
export function UserProfileForm() {
const { id } = useParams<{ id: string }>();
const { data: user } = useQuery({
const { data: user, refetch } = useQuery({
queryKey: ['user', id],
queryFn: async () => {
const { data } = await getUserDetail({
@@ -25,13 +25,13 @@ export function UserProfileForm() {
return (
<div className='grid gap-4 md:grid-cols-2 xl:grid-cols-3'>
<div className='md:col-span-2 xl:col-span-1'>
<BasicInfoForm user={user} />
<BasicInfoForm user={user} refetch={refetch} />
</div>
<div>
<NotifySettingsForm user={user} />
<NotifySettingsForm user={user} refetch={refetch} />
</div>
<div>
<AuthMethodsForm user={user} />
<AuthMethodsForm user={user} refetch={refetch} />
</div>
</div>
);
@@ -20,7 +20,7 @@ const notifySettingsSchema = z.object({
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 form = useForm<NotifySettingsValues>({
@@ -39,6 +39,7 @@ export function NotifySettingsForm({ user }: { user: API.User }) {
user_id: user.id,
});
toast.success(t('updateSuccess'));
refetch();
}
return (
@@ -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 [
<ConfirmButton
key='offline'
+1 -1
View File
@@ -19,7 +19,7 @@ export async function getAuthMethodConfig(
/** Update auth method config PUT /v1/admin/auth-method/config */
export async function updateAuthMethodConfig(
body: API.UpdataAuthMethodConfigRequest,
body: API.UpdateAuthMethodConfigRequest,
options?: { [key: string]: any },
) {
return request<API.Response & { data?: API.AuthMethodConfig }>('/v1/admin/auth-method/config', {
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as announcement from './announcement';
+8 -8
View File
@@ -1177,13 +1177,6 @@ declare namespace API {
security_config: SecurityConfig;
};
type UpdataAuthMethodConfigRequest = {
id: number;
method: string;
config: Record<string, any>;
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<string, any>;
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;
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';
+1 -1
View File
@@ -628,7 +628,7 @@ declare namespace API {
type UserDevice = {
id: number;
ip: string;
imei: string;
identifier: string;
user_agent: string;
online: boolean;
enabled: boolean;
+1 -1
View File
@@ -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;
},
});
+3 -4
View File
@@ -31,11 +31,10 @@ export default function RegisterForm({
const handleCheckUser = async (email: string) => {
try {
if (!auth.email.enable_verify) return true;
const domain = email.split('@')[1];
const isValid =
!auth.email.enable_verify ||
auth.email?.domain_suffix_list.split('\n').includes(domain || '');
return !isValid;
const isValid = auth.email?.domain_suffix_list.split('\n').includes(domain || '');
return isValid;
} catch (error) {
console.log('Error checking user:', error);
return false;
+1 -1
View File
@@ -42,7 +42,7 @@ export function Hero() {
<HoverBorderGradient
containerClassName='rounded-full'
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')}
</HoverBorderGradient>
@@ -71,6 +71,7 @@ export default function Purchase({ subscribe, setSubscribe }: Readonly<PurchaseP
if (orderNo) {
const { data } = await checkoutOrder({
orderNo,
returnUrl: window.location.href,
});
const type = data.data?.type;
const checkout_url = data.data?.checkout_url;
@@ -135,6 +135,7 @@ export default function Recharge(props: Readonly<ButtonProps>) {
if (orderNo) {
const { data } = await checkoutOrder({
orderNo,
returnUrl: window.location.href,
});
const type = data.data?.type;
const checkout_url = data.data?.checkout_url;
@@ -79,6 +79,7 @@ export default function Renewal({ id, subscribe }: Readonly<RenewalProps>) {
if (orderNo) {
const { data } = await checkoutOrder({
orderNo,
returnUrl: window.location.href,
});
const type = data.data?.type;
const checkout_url = data.data?.checkout_url;
@@ -86,6 +86,7 @@ export default function ResetTraffic({ id, replacement }: Readonly<ResetTrafficP
if (orderNo) {
const { data } = await checkoutOrder({
orderNo,
returnUrl: window.location.href,
});
const type = data.data?.type;
const checkout_url = data.data?.checkout_url;
+1 -1
View File
@@ -1,5 +1,5 @@
// @ts-ignore
// API 更新时间:
// API 唯一标识:
import * as auth from './auth';
+1 -1
View File
@@ -628,7 +628,7 @@ declare namespace API {
type UserDevice = {
id: number;
ip: string;
imei: string;
identifier: string;
user_agent: string;
online: boolean;
enabled: boolean;
+2 -1
View File
@@ -91,6 +91,7 @@ declare namespace API {
type CheckoutOrderRequest = {
orderNo: string;
returnUrl?: string;
};
type CheckoutOrderResponse = {
@@ -828,7 +829,7 @@ declare namespace API {
type UserDevice = {
id: number;
ip: string;
imei: string;
identifier: string;
user_agent: string;
online: boolean;
enabled: boolean;
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ppanel-web",
"version": "1.0.0-beta.8",
"version": "1.0.0-beta.13",
"private": true,
"homepage": "https://github.com/perfect-panel/ppanel-web",
"bugs": {