refactor(web): align resource APIs and forms with the starter conventions

Centralize typed resource functions under common/apis and return complete JSON envelopes while preserving raw responses, bearer session isolation, and single-owner errors.

Keep settings state and queues inside the setup store. Use Element Plus forms and dialogs for login, settings, imports, moves, and images; preserve editor interactions and themes. Update callers, tests, generated declarations, and request import constraints together.
This commit is contained in:
eezd committed 2026-10-26 11:53:37 +08:00
1 parent cef0298c34
commit 6b537c03e0
114 files changed
+2876 -2217

No files matched your search

+20
View File
@@ -0,0 +1,20 @@
import type * as Themes from './type'
import { request } from '@/http/axios'
/** 读取可选主题。 */
export function getThemesApi() {
return request<Themes.ThemesResponseData>({
url: 'themes',
method: 'get',
errorOwner: 'caller',
})
}
/** 读取主题与样式。 */
export function getThemeApi(id: string) {
return request<Themes.ThemeResponseData>({
url: `themes/${encodeURIComponent(id)}`,
method: 'get',
errorOwner: 'caller',
})
}
+3
View File
@@ -0,0 +1,3 @@
export interface Theme { id: string, name: string, version: string }
export type ThemesResponseData = ApiResponseData<{ themes: Theme[] }>
export type ThemeResponseData = ApiResponseData<Theme & { css: string }>