Feat/auto group (#6590)

* feat(token): support custom auto group order

* feat(keys): enhance auto group presentation

* fix(keys): rework Auto flow border and compact inherited order

The Auto group highlight previously tinted the whole control surface
with a gradient and animated only a 1px top sweep, which read as a
background color rather than a flowing border. Replace it with a
border-only effect: an aria-hidden, pointer-events-none overlay whose
conic gradient is masked down to a thin ring hugging the rounded
perimeter, so the highlight travels around all four edges and corners
every 3.2s. The interior stays neutral with a restrained static
primary border and glow; prefers-reduced-motion hides the moving
layer while keeping the static emphasis.

The inherited global Auto order also rendered as spacious two-line
rows with circular sequence markers, wasting drawer space. Render it
as a compact wrapping strip of one-line chips (index, name, ratio
badge) with descriptions kept accessible via title and sr-only text,
scrolling only past a much smaller max height.

Custom add/remove/reorder editing, empty-array inheritance semantics,
and the submit payload are unchanged.

* fix(keys): preserve Auto inheritance and unify effects

* refactor(keys): temporarily disable AutoGroupBadge in api-key-group-cell
This commit is contained in:
Calcium-Ion
2026-08-01 23:19:01 +08:00
committed by GitHub
parent bd585d78ef
commit 0ab0202060
57 changed files with 3922 additions and 210 deletions
+3
View File
@@ -47,6 +47,9 @@ token.expired: "This token has expired"
token.exhausted: "This token quota is exhausted TokenStatusExhausted[sk-{{.Prefix}}***{{.Suffix}}]"
token.status_unavailable: "This token status is unavailable"
token.db_error: "Invalid token, database query error, please contact administrator"
token.auto_groups_too_many: "A token can select at most {{.Max}} Auto groups"
token.auto_groups_duplicate: "Auto group {{.Group}} is duplicated"
token.auto_groups_invalid: "Auto group {{.Group}} is unavailable or unauthorized"
# Redemption messages
redemption.name_length: "Redemption code name length must be between 1-20"
+3
View File
@@ -48,6 +48,9 @@ token.expired: "该令牌已过期"
token.exhausted: "该令牌额度已用尽 TokenStatusExhausted[sk-{{.Prefix}}***{{.Suffix}}]"
token.status_unavailable: "该令牌状态不可用"
token.db_error: "无效的令牌,数据库查询出错,请联系管理员"
token.auto_groups_too_many: "每个令牌最多可选择 {{.Max}} 个 Auto 分组"
token.auto_groups_duplicate: "Auto 分组 {{.Group}} 重复"
token.auto_groups_invalid: "Auto 分组 {{.Group}} 不可用或无权访问"
# Redemption messages
redemption.name_length: "兑换码名称长度必须在1-20之间"
+3
View File
@@ -48,6 +48,9 @@ token.expired: "該令牌已過期"
token.exhausted: "該令牌額度已用盡 TokenStatusExhausted[sk-{{.Prefix}}***{{.Suffix}}]"
token.status_unavailable: "該令牌狀態不可用"
token.db_error: "無效的令牌,資料庫查詢出錯,請聯繫管理員"
token.auto_groups_too_many: "每個令牌最多可選擇 {{.Max}} 個 Auto 分組"
token.auto_groups_duplicate: "Auto 分組 {{.Group}} 重複"
token.auto_groups_invalid: "Auto 分組 {{.Group}} 不可用或無權存取"
# Redemption messages
redemption.name_length: "兌換碼名稱長度必須在1-20之間"