Add Website Template (#13400)

* feat: Add Website Template

* fix: Don't display the template list

* feat: Add Mcp TopList

* docs: Remove Mcp TopList

* Add more languages

---------

Co-authored-by: CityFun <31820853+zhengkunwang223@users.noreply.github.com>
This commit is contained in:
BugPleaseGo
2026-07-31 10:01:20 +08:00
committed by GitHub
co-authored by CityFun
parent f35b0deb29
commit e11dc5fadd
37 changed files with 2396 additions and 6 deletions
+74
View File
@@ -96,6 +96,7 @@ export namespace Website {
ftpUser: string;
ftpPassword: string;
taskID: string;
templateOutputID?: number;
SSLID?: number;
enableSSL: boolean;
createDB?: boolean;
@@ -771,4 +772,77 @@ export namespace Website {
ids: number[];
groupID: number;
}
export interface TemplateVariable {
key: string;
label: string;
type: 'text' | 'textarea' | 'number' | 'select' | 'color';
default: string;
options: string;
required: boolean;
}
export interface Template extends CommonModel {
name: string;
type: string;
content: string;
filePath: string;
variables: string;
remark: string;
}
export interface TemplateSearch extends ReqPage {
name: string;
type: string;
}
export interface TemplateCreate {
name: string;
type: string;
content: string;
filePath: string;
variables: string;
remark: string;
}
export interface TemplateUpdate {
id: number;
name: string;
type: string;
content: string;
filePath: string;
variables: string;
remark: string;
}
export interface TemplateOutput extends CommonModel {
name: string;
templateID: number;
templateType: string;
variableValues: string;
outputPath: string;
}
export interface TemplateOutputDTO extends TemplateOutput {
templateName: string;
}
export interface TemplateOutputSearch extends ReqPage {
templateID: number;
}
export interface TemplateOutputCreate {
templateID: number;
name: string;
variableValues: Record<string, string>;
}
export interface PreviewReq {
templateID: number;
variableValues: Record<string, string>;
}
export interface PreviewDTO {
html: string;
}
}