feat(admin): polish badge, OAuth and payment gateway settings UX
- Badge page: rewrite as collapsible sortable category/item cards with
preset medal icon picker, dirty-tracked save bar and duplicate slug check;
drop user_badge_* dual-read and legacy name/icon_url fallbacks
- OAuth: provider config groups collapsible, expanded when provider is on;
clogin visibility moved to group-level dependsOn
- Gateway: expandWhen accepts dependsOn-style rules; select-gated groups no
longer always expand ('null' was truthy); mark five gateway secrets as
secret/password in JS and PHP; class-based notice list styling
- Remove unused UserRuntime::parse_badge_dictionary
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
116b6b2223
commit
3179754670
13 files changed
+502
-239
No files matched your search
@@ -948,6 +948,12 @@ function updateRepeaterItem(index, fieldKey, value) {
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.aksrt-field__content :deep(ul) {
|
||||
margin: 0;
|
||||
padding-left: 18px;
|
||||
line-height: 1.9;
|
||||
}
|
||||
|
||||
/* Mobile */
|
||||
@media (max-width: 768px) {
|
||||
.aksrt-field__link,
|
||||
|
||||
@@ -248,16 +248,21 @@ function isGroupVisible(group) {
|
||||
return matchDependsOn(group.dependsOn)
|
||||
}
|
||||
|
||||
/**
|
||||
* expandWhen 与 dependsOn 同语法(表单 key 字符串或规则对象),规则成立时分组默认展开。
|
||||
* 下拉值如 'null' 也是真值,所以按选项判断的分组要写规则对象,不能只写 key。
|
||||
*/
|
||||
function isGroupExpanded(group) {
|
||||
return matchDependsOn(group.expandWhen)
|
||||
}
|
||||
|
||||
/**
|
||||
* Collapse preference for a group.
|
||||
* - expandWhen: form key; when truthy, start expanded (channel just enabled → open form)
|
||||
* - expandWhen: rule; when matched, start expanded (channel just enabled → open form)
|
||||
* - defaultCollapsed: static default
|
||||
*/
|
||||
function resolveGroupCollapsed(group) {
|
||||
if (group.expandWhen) {
|
||||
const on = !!props.formData?.[group.expandWhen]
|
||||
return !on
|
||||
}
|
||||
if (group.expandWhen) return !isGroupExpanded(group)
|
||||
return !!group.defaultCollapsed
|
||||
}
|
||||
|
||||
@@ -265,7 +270,7 @@ function resolveGroupCollapsed(group) {
|
||||
function groupKey(group) {
|
||||
const base = group.key || group.title || 'group'
|
||||
if (group.expandWhen) {
|
||||
return `${base}:${props.formData?.[group.expandWhen] ? 'on' : 'off'}`
|
||||
return `${base}:${isGroupExpanded(group) ? 'on' : 'off'}`
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user