背景:v1.9.0 把界面迁到 Bootstrap 5 时保留了旧自研 CSS,v1.9.2 又叠加了一层 「墨绿渐变」覆盖层,形成三套令牌(--paper/--ink、prefers-color-scheme、 data-bs-theme)并存。系统偏好与 Cookie 不一致时,页面会出现半亮半暗、表单 标签/抽屉标题/订阅页签不可见、输入框变黑块等问题。 本次改动: - 样式加载顺序改为 bootstrap → app.css;删除旧纸墨令牌与 v1.9.2 覆盖层, app.css 重写为单一主题层(:root/[data-bs-theme=light] 与 [data-bs-theme=dark] 两套语义令牌)。组件只读 --app-*,解决 --ink-2 同时被当作「次级文字色」和 「卡片底色」的语义冲突。 - 主题只认 <html data-bs-theme>:服务端按 Cookie 直出;没有 Cookie 时由 <head> 内联脚本在首屏按系统偏好补齐,修好「跟随系统」并避免闪白。大屏同理。 - 修复 Bootstrap 覆盖自研设计的问题:正文 14px + 中文字体栈、22/16/14px 标题、 按钮/输入框/焦点环/卡片回到设计值;普通按钮新增 .btn-soft,不再变透明文字。 - 布局修复:客户/套餐表单的 .grid-2 不再塞 3 个字段;包详情页把筛选独立成 GET 表单(在搜索框回车不再误触批量开通);客户详情操作区与 meta 重排; 抽屉时钟改为固定 46px 并用它对齐抽屉头的 sticky 偏移;追加面板在抽屉里 两列月历、不再 1100px 竖排;手机端日历数字不再换行溢出,移动端表格隐藏 低优先级列,不再被裁切。 - 大屏:KPI/面板去掉 Bootstrap utility,统一由 screen.css 控制;TOP/今日待打 改为固定列宽 + grid-column 对齐;浅色主题的链接、热力、图例对比度补齐; 热力格不再整体降透明度;当日浮层可滚动并支持点击/键盘打开。 - 配色与可读性:普通文本对比度全部达标(截图 lint 由 65 处降到 0);日历 外月日期改为浅底深字,不再整格 opacity;archived 行改为中性底色而非降透明。 - 缓存:新增内嵌静态资源内容指纹 AssetVersion(12 位 sha256),所有 /static 链接带 ?v=;带指纹的响应 public, max-age=31536000, immutable,不带指纹的 回源 no-cache;HTML 继续 no-store。改样式重新编译即自动破缓存,不再依赖 手改版本号(仍保留 v1.10.0 作为产品版本)。 - 认证页重做:登录/初始化页改用 .auth 卡片(品牌、主题切换、绿色焦点环), 去掉 min-height:100vh 叠加 main padding 造成的 40px 纵向滚动。 - JS:修 toISOString 计算自然日差一天的时区 bug;主题切换读 data-bs-theme 并同步 aria-pressed;全选支持半选;大屏切主题同时更新 data-bs-theme; 提示条改为固定定位、淡出不再顶动页面。 - README 更新主题与缓存说明;版本号 1.9.5 → 1.10.0。 验证:gofmt / go vet / go test 全绿;1440、1100、390 三档,明暗两套,工作台/ 客户/套餐/订阅/设置/日志/大屏/登录全部截图走查,无横向溢出与控制台错误。
This commit is contained in:
@@ -3,13 +3,33 @@
|
||||
<header class="cust-head">
|
||||
<div class="cust-id">
|
||||
<span class="cust-tail">{{.D.Customer.Tail}}</span>
|
||||
<div>
|
||||
<div class="cust-id-main">
|
||||
<h1>{{.D.Customer.Name}}{{if .D.Customer.Archived}} <span class="chip chip-closed">已停用</span>{{end}}</h1>
|
||||
<div class="cust-tags">
|
||||
{{range .D.Customer.TagList}}<span class="tagchip">{{.}}</span>{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-actions">
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/assignee" class="assign-form">
|
||||
<select name="assignee_id" aria-label="归属打手">
|
||||
<option value="0">未指派</option>
|
||||
{{range .D.Users}}<option value="{{.ID}}"{{if eq $.D.Customer.AssigneeID .ID}} selected{{end}}>{{if .DisplayName}}{{.DisplayName}}{{else}}{{.Username}}{{end}}</option>{{end}}
|
||||
</select>
|
||||
<button class="btn btn-soft btn-sm" type="submit">保存打手</button>
|
||||
</form>
|
||||
<a class="btn btn-soft" href="/customers/{{.D.Customer.ID}}/edit">编辑资料</a>
|
||||
{{if .D.Customer.Archived}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/restore"><button class="btn btn-soft" type="submit">恢复客户</button></form>
|
||||
{{else}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/archive" data-confirm="停用后该客户不再出现在日历和大屏,订阅会保留。确定停用?"><button class="btn btn-ghost" type="submit">停用客户</button></form>
|
||||
{{end}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/delete" data-confirm="将永久删除该客户及其全部订阅、打卡与追加记录,无法恢复。确定删除?">
|
||||
<input type="hidden" name="confirm" value="delete">
|
||||
<button class="btn btn-ghost text-danger" type="submit">彻底删除</button>
|
||||
</form>
|
||||
<a class="btn btn-ghost" href="/customers">返回列表</a>
|
||||
</div>
|
||||
<dl class="cust-meta">
|
||||
{{if .D.Customer.GameName}}<div><dt>游戏</dt><dd>{{.D.Customer.GameName}}</dd></div>{{end}}
|
||||
{{if .D.Customer.GameServer}}<div><dt>区服</dt><dd>{{.D.Customer.GameServer}}</dd></div>{{end}}
|
||||
@@ -17,29 +37,9 @@
|
||||
{{if .D.Customer.Source}}<div><dt>来源</dt><dd>{{.D.Customer.Source}}</dd></div>{{end}}
|
||||
<div><dt>打手</dt><dd>
|
||||
<span class="asg{{if eq .D.Customer.AssigneeID 0}} none{{end}}"><i style="background:{{if .D.Customer.AssigneeColor}}{{.D.Customer.AssigneeColor}}{{else}}#8A8F98{{end}}"></i>{{if .D.Customer.AssigneeName}}{{.D.Customer.AssigneeName}}{{else}}未指派{{end}}</span>
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/assignee" class="assign-form">
|
||||
<select name="assignee_id">
|
||||
<option value="0">未指派</option>
|
||||
{{range .D.Users}}<option value="{{.ID}}"{{if eq $.D.Customer.AssigneeID .ID}} selected{{end}}>{{if .DisplayName}}{{.DisplayName}}{{else}}{{.Username}}{{end}}</option>{{end}}
|
||||
</select>
|
||||
<button class="btn btn-sm" type="submit">保存</button>
|
||||
</form>
|
||||
</dd></div>
|
||||
<div><dt>建档</dt><dd>{{.D.Customer.CreatedAt}}</dd></div>
|
||||
</dl>
|
||||
<div class="page-actions">
|
||||
<a class="btn" href="/customers/{{.D.Customer.ID}}/edit">编辑资料</a>
|
||||
{{if .D.Customer.Archived}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/restore"><button class="btn" type="submit">恢复客户</button></form>
|
||||
{{else}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/archive" data-confirm="停用后该客户不再出现在日历和大屏,订阅会保留。确定停用?"><button class="btn btn-ghost" type="submit">停用客户</button></form>
|
||||
{{end}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/delete" data-confirm="将永久删除该客户及其全部订阅、打卡与追加记录,无法恢复。确定删除?">
|
||||
<input type="hidden" name="confirm" value="delete">
|
||||
<button class="btn btn-ghost" type="submit" style="color:var(--danger)">彻底删除</button>
|
||||
</form>
|
||||
<a class="btn btn-ghost" href="/customers">返回列表</a>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
{{if .D.Customer.Note}}<div class="notice note">{{.D.Customer.Note}}</div>{{end}}
|
||||
@@ -49,9 +49,9 @@
|
||||
<div class="section-head">
|
||||
<h2>当月排单</h2>
|
||||
<div class="minical-nav">
|
||||
<a class="btn btn-sm btn-ghost" href="{{.D.CustCal.Prev}}">‹</a>
|
||||
<a class="btn btn-ghost btn-sm btn-square" href="{{.D.CustCal.Prev}}" aria-label="上个月">‹</a>
|
||||
<b>{{.D.CustCal.Title}}</b>
|
||||
<a class="btn btn-sm btn-ghost" href="{{.D.CustCal.Next}}">›</a>
|
||||
<a class="btn btn-ghost btn-sm btn-square" href="{{.D.CustCal.Next}}" aria-label="下个月">›</a>
|
||||
<span class="muted small">{{.D.CustCal.TaskDays}} 天有单 · {{.D.CustCal.TotalTasks}} 单</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,7 +86,7 @@
|
||||
|
||||
{{if .D.Packages}}
|
||||
<form method="post" action="/customers/{{.D.Customer.ID}}/subscriptions" class="inline-form" data-sub-form>
|
||||
<select class="form-select form-select-sm" name="package_id" required data-pkg-select>
|
||||
<select class="form-select form-select-sm" name="package_id" required data-pkg-select aria-label="选择套餐">
|
||||
<option value="">选择套餐…</option>
|
||||
{{range .D.Packages}}
|
||||
<option value="{{.ID}}" data-unit="{{if .Season}}season{{else}}{{.Unit}}{{end}}" data-amount="{{.DefaultAmount}}" data-validity="{{.DefaultValidityDays}}"{{if .Archived}} disabled{{end}}{{if .SeasonExpired $.TodayStr}} disabled{{end}}>
|
||||
@@ -147,9 +147,9 @@
|
||||
</div>
|
||||
{{if .D.Adjustments}}
|
||||
<div class="table-wrap">
|
||||
<table class="table tight">
|
||||
<table class="table tight table-adjust">
|
||||
<thead>
|
||||
<tr><th>时间</th><th>套餐</th><th>类型</th><th>计算起点</th><th>结束日变化</th><th>增量</th><th>备注</th><th>操作人</th></tr>
|
||||
<tr><th scope="col">时间</th><th scope="col">套餐</th><th scope="col">类型</th><th scope="col">计算起点</th><th scope="col">结束日变化</th><th scope="col">增量</th><th scope="col">备注</th><th scope="col">操作人</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .D.Adjustments}}
|
||||
|
||||
Reference in New Issue
Block a user