Files
3m-ui/frontend-variants/shared/api/auth.ts
T
風雪 a88c1200f7 feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
feat(ui): align MUI/Mantine/shadcn editions with Ant Design
- Shared API, i18n, stores, listenerConfig + capabilityForm + form schema
- Full routes and pages for all three editions
- Listeners: protocol form, Access Profile, templates, clone, versions, batch
- Users: bind nodes, subscription, reset traffic
2026-08-19 01:05:16 +00:00

32 lines
816 B
TypeScript

import client from './client';
import { useAuthStore } from '../stores/authStore';
export interface LoginInput {
username: string;
password: string;
}
export async function login(input: LoginInput) {
const { data } = await client.post<{
token: string;
username: string;
must_change_password: boolean;
}>('/auth/login', input);
useAuthStore.getState().login(data.token, data.username, data.must_change_password);
return data;
}
export async function changePassword(current: string, next: string) {
const { data } = await client.post('/auth/password', {
current_password: current,
new_password: next,
});
useAuthStore.getState().setMustChangePassword(false);
return data;
}
export async function fetchMe() {
const { data } = await client.get('/auth/me');
return data;
}