Files
sub2api-cn-relay-manager/deploy
phamnazage-jpg 122d6282e1
Some checks failed
CI / Build & Test (push) Has been cancelled
CI / Lint (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / Docker Build (push) Has been cancelled
CI / Release (push) Has been cancelled
fix(portal): unify all input/select/textarea/label/button/table styles via global fallback
Root cause: only admin/index.html had explicit .input / .select / .label classes.
100+ inputs across logical-groups / route-health / accounts / providers /
admin-batch-import + public portal had no class → browser default styling →
页面看起来「未统一」。

Fix:
- portal.css: add global rules that auto-apply design system styling to
  any input/select/textarea/label/button/table that doesn't opt out
  via .raw-input / .field-label. The existing .input / .select /
  .label / .btn classes still win (same styles, just explicit).
- portal.js: detectInitialTheme() now respects HTML's data-theme
  attribute first (page author intent), then localStorage, then OS
  preference. This makes admin pages' explicit data-theme="dark"
  actually stick instead of being overridden.
- admin/index.html: h3 标题 8 个 article 统一用 class="card-title"
  (前 4 个 inline 15px / 后 3 个 inline 16px 已统一)
- 6 admin pages: 修复 critical HTML 结构 bug — 之前 batch 处理的
  残留让 <link> 和 <style> 嵌套在 <style>:root{} 块内,浏览器
  解析时直接忽略,导致所有 stylesheet 不加载、整个页面无样式

Verification:
- bash scripts/test/test_tksea_portal_assets.sh → PASS
- bash scripts/test/verify_frontend_smoke.sh → PASS
- 8 张 screenshot v4 在 /tmp/portal-screenshots/ (各 600KB-1.2MB)
- 浏览器实测:3 stylesheets 加载,103 个 input 全部 38px/12px 圆角输入框
  35 个 label 全部 12px uppercase slate-400
  6 个 select 全部 38px + 自定义箭头
2026-06-03 11:05:10 +08:00
..

deploy 目录说明

日期2026-05-27

deploy/ 用来存放部署目标会直接消费的静态资产或配置模板。

当前内容:

  • tksea-portal/index.html
    • https://sub.tksea.top/portal/ 的静态页面源码
  • tksea-portal/admin/index.html
    • https://sub.tksea.top/portal/admin/ 的管理首页
    • 统一收纳“逻辑分组 / 路由”“新增模型 / 供应商目录”和“导入供应商帐号”入口
  • tksea-portal/admin/logical-groups.html
    • https://sub.tksea.top/portal/admin/logical-groups.html
    • 维护 logical_group / public_model / route / shadow_group 的最小运营页
  • tksea-portal/admin/providers.html
    • https://sub.tksea.top/portal/admin/providers.html
    • 用现有 CRM API 做 pack/provider 浏览、preview-import、import以及 provider manifest 草稿生成
    • 当前也可直接调用服务端 provider_drafts API把 manifest 草稿持久化到 CRM SQLite并支持更新 / 删除 / 发布到 pack 仓库
  • tksea-portal/admin/batch-import.html
    • https://sub.tksea.top/portal/admin/batch-import.html
    • 结构化入口地址,当前跳转到 legacy admin-batch-import.html
  • tksea-portal/admin-batch-import.html
    • https://sub.tksea.top/portal/admin-batch-import.html 的最小管理页
    • 直接消费 POST /api/batch-import/runsGET /api/batch-import/runs/*
  • tksea-portal/nginx.sub.tksea.top.conf.example
    • sub.tksea.top 上 portal 路由与代理示例
    • 当前同时包含 /portal-proxy/ 宿主用户态代理与 /portal-admin-api/ CRM 管理态代理

它和 scripts/ 的边界如下:

  • deploy/
    • 放静态页、Nginx/Caddy/Env 模板、会被复制到目标机上的文件
  • scripts/
    • 放执行复制、部署、reload、验收的脚本

当前对应关系:

  • 资产:deploy/tksea-portal/*
  • 部署脚本:scripts/deploy/deploy_tksea_portal.sh
  • 资产回归:scripts/test/test_tksea_portal_assets.sh