Refactor localization files and remove Aliyun references

This commit is contained in:
2026-04-07 11:37:47 +08:00
parent 2662b494c5
commit b395cb0b98
47 changed files with 136 additions and 1311 deletions

View File

@@ -209,21 +209,6 @@ export const authApi = {
await apiClient.put(API_ENDPOINTS.AUTH.PREFERENCES, data)
},
setAliyunKey: async (apiKey: string): Promise<void> => {
await apiClient.post(API_ENDPOINTS.AUTH.SET_ALIYUN_KEY, { api_key: apiKey })
},
deleteAliyunKey: async (): Promise<void> => {
await apiClient.delete(API_ENDPOINTS.AUTH.SET_ALIYUN_KEY)
},
verifyAliyunKey: async (): Promise<{ valid: boolean; message: string }> => {
const response = await apiClient.get<{ valid: boolean; message: string }>(
API_ENDPOINTS.AUTH.VERIFY_ALIYUN_KEY
)
return response.data
},
getNsfwAccess: async (): Promise<{ has_access: boolean }> => {
const response = await apiClient.get<{ has_access: boolean }>(API_ENDPOINTS.AUTH.NSFW_ACCESS)
return response.data
@@ -247,21 +232,6 @@ export interface UserUsageStats {
}
export const adminApi = {
setAliyunKey: async (apiKey: string): Promise<void> => {
await apiClient.post(API_ENDPOINTS.ADMIN.SET_ALIYUN_KEY, { api_key: apiKey })
},
deleteAliyunKey: async (): Promise<void> => {
await apiClient.delete(API_ENDPOINTS.ADMIN.SET_ALIYUN_KEY)
},
verifyAliyunKey: async (): Promise<{ valid: boolean; message: string }> => {
const response = await apiClient.get<{ valid: boolean; message: string }>(
API_ENDPOINTS.ADMIN.VERIFY_ALIYUN_KEY
)
return response.data
},
getLLMConfig: async (): Promise<{ base_url?: string; model?: string; has_key: boolean }> => {
const response = await apiClient.get<{ base_url?: string; model?: string; has_key: boolean }>(
API_ENDPOINTS.ADMIN.LLM_CONFIG

View File

@@ -50,7 +50,6 @@ export interface AudiobookCharacter {
voice_design_id?: number
voice_design_name?: string
voice_design_speaker?: string
use_indextts2?: boolean
}
export interface AudiobookChapter {
@@ -175,7 +174,7 @@ export const audiobookApi = {
updateCharacter: async (
projectId: number,
charId: number,
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number; use_indextts2?: boolean }
data: { name?: string; gender?: string; description?: string; instruct?: string; voice_design_id?: number }
): Promise<AudiobookCharacter> => {
const response = await apiClient.put<AudiobookCharacter>(
`/audiobook/projects/${projectId}/characters/${charId}`,

View File

@@ -4,8 +4,6 @@ export const API_ENDPOINTS = {
ME: '/auth/me',
CHANGE_PASSWORD: '/auth/change-password',
PREFERENCES: '/auth/preferences',
SET_ALIYUN_KEY: '/auth/aliyun-key',
VERIFY_ALIYUN_KEY: '/auth/aliyun-key/verify',
NSFW_ACCESS: '/auth/nsfw-access',
},
TTS: {
@@ -30,8 +28,6 @@ export const API_ENDPOINTS = {
DELETE: (id: number) => `/users/${id}`,
},
ADMIN: {
SET_ALIYUN_KEY: '/users/system/aliyun-key',
VERIFY_ALIYUN_KEY: '/users/system/aliyun-key/verify',
LLM_CONFIG: '/users/system/llm-config',
GROK_CONFIG: '/users/system/grok-config',
},