Refactor code structure for improved readability and maintainability

This commit is contained in:
MengMengCode
2026-06-09 15:33:17 +08:00
parent cf00d0d03d
commit e971d99070
17 changed files with 2068 additions and 178 deletions
+9
View File
@@ -714,6 +714,15 @@ export const createWebSSHTicket = (containerName: string) =>
export const createVNCTicket = (containerName: string) =>
api.post<APIResponse<{ ticket: string }>>('/vnc-ticket', { container_name: containerName })
// Language
export type PanelLanguage = 'zh' | 'en'
export const getLanguage = () =>
api.get<APIResponse<{ language: PanelLanguage }>>('/language')
export const updateLanguage = (language: PanelLanguage) =>
api.post<APIResponse<{ language: PanelLanguage }>>('/language', { language })
// Version
export const getVersion = () =>
api.get<APIResponse<{ version: string }>>('/version')