Open
Conversation
ambiel9687
commented
Mar 11, 2026
- 导入导出功能: 新增平台与订阅配置的导入导出,支持 JSON 格式,含覆盖/跳过策略
- 租约管理增强: 租约面板 UI 优化并绑定 API;租约到期前自动续期;相对时间支持未来时间显示
- 暗黑主题: 新增完整暗黑主题及主题切换按钮,基于 CSS 变量实现
- CI 修复: Docker tag 仓库名转小写修复 buildx 构建失败;新增 Dev Build workflow
改动列表:
- 后端 LeaseResponse: 新增 created_at 字段,leaseToResponse 转换 CreatedAtNs
- handler_lease: leaseSortKey 扩展至 6 个排序字段(account/node_tag/egress_ip/created_at/expiry/last_accessed)
- server.go: 注册 PUT /leases/{account} 绑定租约路由
- PlatformLeasesPanel.tsx: 新增完整租约面板组件(搜索/排序/分页/绑定/解绑)
- api.ts: 新增 listPlatformLeases、deletePlatformLease、bindPlatformLease API
- types.ts: LeaseResponse 新增 created_at 字段
- theme.css: 租约面板、绑定表单、排序列头样式
- .github/workflows/dev-build.yml: 新增 Dev Build CI workflow(手动触发、多平台构建+Docker)
- .gitignore: 更新忽略规则
via [HAPI](https://hapi.run)
Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - dev-build.yml: 新增 Lowercase repository name 步骤,将 github.repository 转为小写后用于 Docker tag via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - webui/index.html: 添加 FOUC 防闪脚本,DOM 渲染前设置 data-theme - webui/src/stores/theme-store.ts: 新建 Zustand theme store,支持 system/light/dark 三态切换 - webui/src/components/ThemeToggle.tsx: 新建主题切换按钮,复用 locale-switch-compact 样式 - webui/src/components/AppShell.tsx: 侧栏集成 ThemeToggle 组件 - webui/src/i18n/translations.ts: 新增切换主题/深色/浅色/系统 4 个翻译键 - webui/src/styles/theme.css: 追加 [data-theme="dark"] 暗色 CSS 变量覆盖及组件适配 - webui/src/components/ui/Switch.css: 追加 Switch 暗色滑块样式
改动列表: - internal/routing/router.go: tryLeaseHit/tryLeaseSameIPRotation 到期前 1 分钟自动续期 ExpiryNs - webui/src/lib/time.ts: formatRelativeTime 支持未来时间显示(如 "3 天后") via HAPI (https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - internal/service/control_plane_data.go: 新增 ExportData/ImportData 业务逻辑,含防重策略(name+url 双键匹配、skip/overwrite 冲突策略、JSON 内部去重) - internal/api/handler_data.go: 新增 HandleExportData/HandleImportData HTTP handler - internal/api/server.go: 注册 GET /api/v1/data/export 和 POST /api/v1/data/import 路由 - webui/src/features/systemConfig/api.ts: 新增 exportData(blob 下载)和 importData(POST JSON)API 函数 - webui/src/features/systemConfig/SystemConfigPage.tsx: 新增「数据管理」Card 组件(导出按钮、文件选择、冲突策略下拉、导入结果展示) - webui/src/i18n/translations.ts: 新增 17 条中英翻译条目 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - internal/service/control_plane_data.go: buildSubscriptionPatch 按 source_type 条件包含 url/content 字段 - webui/src/features/systemConfig/SystemConfigPage.tsx: 移除多余的闭合 div 标签 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - webui/src/lib/api-client.ts: 导出 JsonValue 类型 - webui/src/features/systemConfig/api.ts: importData body 使用 JsonValue 替代 Record<string, unknown> via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
改动列表: - internal/service/control_plane_data.go: buildPlatformPatch 中将 nil slice 转为空 slice,避免 JSON 序列化为 null 被 validateFields 拒绝 via [HAPI](https://hapi.run) Co-Authored-By: HAPI <noreply@hapi.run>
# Conflicts: # .gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.