fix(admin): make the quota modal's cancel button findable

The quota dialog has grown a second and a third form, and the plain Cancel
button sitting inside the first form's grid was easy to miss — and it is the
only way out. It now lives in the dialog's own footer at the bottom right,
uses the danger styling, and says what it does: 取消且不保存 / Cancel without
saving.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
bluebluesodaandCommandCodeBot committed 2026-09-19 06:11:46 +00:00
1 parent c2d19e8cee
commit 9c4a3a41bc
1 file changed
+3 -1
@@ -435,7 +435,6 @@ a.copy.copied { border-color: #86efac; background: #dcfce7; color: #15803d; }
</div>
{{end}}
<button type="submit" class="primary" id="quotaSaveBtn">{{if eq .Lang "zh"}}保存{{else}}Save{{end}}</button>
<button type="button" onclick="closeQuota()">{{if eq .Lang "zh"}}取消{{else}}Cancel{{end}}</button>
</form>
<p id="quotaExpiredNote" style="display:none;color:#b91c1c;font-weight:600;margin:10px 0 0">{{if eq .Lang "zh"}}该账户已到期,仅可延期。{{else}}This account has expired — only extending is allowed.{{end}}</p>
<hr style="border:none;border-top:1px solid #e5e7eb;margin:14px 0;">
@@ -462,6 +461,9 @@ a.copy.copied { border-color: #86efac; background: #dcfce7; color: #15803d; }
<button type="submit" class="warn" onclick="return confirm({{if eq .Lang "zh"}}'确定将 ' + document.getElementById('quotaName').textContent + ' 的当月流量统计重置为 0?超限限速将自动解除。'{{else}}'Reset monthly traffic for ' + document.getElementById('quotaName').textContent + ' to 0? Any over-quota throttle will be lifted.'{{end}})">{{if eq .Lang "zh"}}仅重置流量统计{{else}}Reset traffic only{{end}}</button>
<small style="color:#9aa0a8;display:block;margin-top:6px">{{if eq .Lang "zh"}}将当月已用流量清零,不影响 CPU/内存/磁盘配额{{else}}Zeroes this month's used traffic; CPU/mem/disk quotas are unaffected{{end}}</small>
</form>
<div class="foot" style="margin-top:14px">
<button type="button" class="danger" onclick="closeQuota()">{{if eq .Lang "zh"}}取消且不保存{{else}}Cancel without saving{{end}}</button>
</div>
</div>
</div>