mirror of
https://github.com/EstrellaXD/Auto_Bangumi.git
synced 2026-07-10 05:58:00 +08:00
Add a multi-step setup wizard that guides new users through initial configuration on first run. The wizard covers account credentials, download client connection (with test), RSS source, media paths, and optional notification setup. Backend: new /api/v1/setup/ endpoints with sentinel file mechanism. Frontend: 7-step wizard with validation and i18n (en/zh-CN). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
47 lines
1.0 KiB
TypeScript
47 lines
1.0 KiB
TypeScript
import type {
|
|
SetupCompleteRequest,
|
|
SetupStatus,
|
|
TestDownloaderRequest,
|
|
TestNotificationRequest,
|
|
TestResult,
|
|
} from '#/setup';
|
|
import type { ApiSuccess } from '#/api';
|
|
|
|
export const apiSetup = {
|
|
async getStatus() {
|
|
const { data } = await axios.get<SetupStatus>('api/v1/setup/status');
|
|
return data;
|
|
},
|
|
|
|
async testDownloader(config: TestDownloaderRequest) {
|
|
const { data } = await axios.post<TestResult>(
|
|
'api/v1/setup/test-downloader',
|
|
config
|
|
);
|
|
return data;
|
|
},
|
|
|
|
async testRSS(url: string) {
|
|
const { data } = await axios.post<TestResult>('api/v1/setup/test-rss', {
|
|
url,
|
|
});
|
|
return data;
|
|
},
|
|
|
|
async testNotification(config: TestNotificationRequest) {
|
|
const { data } = await axios.post<TestResult>(
|
|
'api/v1/setup/test-notification',
|
|
config
|
|
);
|
|
return data;
|
|
},
|
|
|
|
async complete(config: SetupCompleteRequest) {
|
|
const { data } = await axios.post<ApiSuccess>(
|
|
'api/v1/setup/complete',
|
|
config
|
|
);
|
|
return data;
|
|
},
|
|
};
|