2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 14:57:16 +08:00

feat: 为网站编辑添加自定义配置标签页 (#1235)

* Initial plan

* feat: add custom config tab for website editing

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* chore: remove unused variables in EditView.vue

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: address code review comments for custom config

Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>

* fix: lint

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: devhaozi <115467771+devhaozi@users.noreply.github.com>
Co-authored-by: 耗子 <haozi@loli.email>
This commit is contained in:
Copilot
2026-01-14 00:51:54 +08:00
committed by GitHub
parent b86a83a6a4
commit 2b697e95d6
4 changed files with 256 additions and 2 deletions

View File

@@ -66,6 +66,16 @@ type WebsiteUpdate struct {
// 反向代理
Upstreams []types.Upstream `json:"upstreams"`
Proxies []types.Proxy `json:"proxies"`
// 自定义配置
CustomConfigs []WebsiteCustomConfig `json:"custom_configs"`
}
// WebsiteCustomConfig 网站自定义配置请求
type WebsiteCustomConfig struct {
Name string `json:"name" validate:"required|regex:^[a-zA-Z0-9_-]+$"` // 配置名称
Scope string `json:"scope" validate:"required|in:site,shared"` // 作用域: site(此网站), shared(全局)
Content string `json:"content"` // 配置内容
}
type WebsiteUpdateRemark struct {