perf: unify i18n text class in frontend

This commit is contained in:
Junyan Qin
2025-05-20 11:32:55 +08:00
parent ff335130ae
commit 7d34a2154b
5 changed files with 20 additions and 24 deletions
+8 -12
View File
@@ -1,5 +1,6 @@
import { IDynamicFormItemSchema } from '@/app/infra/entities/form/dynamic';
import { PipelineConfigTab } from '@/app/infra/entities/pipeline';
import { I18nLabel } from '@/app/infra/entities/common';
export interface ApiResponse<T> {
code: number;
@@ -7,11 +8,6 @@ export interface ApiResponse<T> {
msg: string;
}
export interface I18nText {
en_US: string;
zh_Hans: string;
}
export interface AsyncTaskCreatedResp {
task_id: number;
}
@@ -26,8 +22,8 @@ export interface ApiRespProviderRequester {
export interface Requester {
name: string;
label: I18nText;
description: I18nText;
label: I18nLabel;
description: I18nLabel;
icon?: string;
spec: {
config: IDynamicFormItemSchema[];
@@ -84,8 +80,8 @@ export interface ApiRespPlatformAdapter {
export interface Adapter {
name: string;
label: I18nText;
description: I18nText;
label: I18nLabel;
description: I18nLabel;
icon?: string;
spec: {
config: AdapterSpecConfig[];
@@ -94,7 +90,7 @@ export interface Adapter {
export interface AdapterSpecConfig {
default: string | number | boolean | Array<unknown>;
label: I18nText;
label: I18nLabel;
name: string;
required: boolean;
type: string;
@@ -133,8 +129,8 @@ export interface ApiRespPlugin {
export interface Plugin {
author: string;
name: string;
description: I18nText;
label: I18nText;
description: I18nLabel;
label: I18nLabel;
version: string;
enabled: boolean;
priority: number;