feat(admin): replicate reference post-page settings page 1:1

- rewrite post_list.page schema (JS+PHP 2.0.0) with the reference field set:
  three cover types with option fieldsets (image 20-200% / slide CFS_Module::slide
  full config with nested dependsOn / video 0-200%), hide-time, p_indent,
  breadcrumbs (home-text as switcher), prevnext, authordesc, maxheight slider,
  yiyan block, copyright, button toptext, front/after content, related posts
- migrate share_s to share page basic group and post_rewards_* to users
  features rewards group (runtime keys unchanged)
- remap get_post_page_settings() to reference keys, normalize slide cover
  option, hardcode non-reference runtime flags (reading progress, favorites,
  author card), drop dual-path legacy aliases
- wire slide option into aksrt_render_slider (effect/direction/spaceBetween/
  speed/interval/loop/autoplay/nav/pagination, scale vs fixed-height modes),
  clamp image scale 20-200 and video scale 0-200 with 16:9 fallback,
  wire p_indent container class + CSS, resync frontend-tags fallback and
  FacadeBulk fallback, remap PostMetaBox cover keys
- add post-page reference contract test; update stale cover-height and
  user-features contract tests

Validation: node --test 464/464 pass, audit-admin-contracts errors=0,
vite build ok, build-public-assets ok, php -l clean.
This commit is contained in:
kate522 committed 2026-09-24 16:13:00 +08:00
1 parent a8060fa71d
commit 66f8bb933d
17 files changed
+797 -267

No files matched your search

+8
View File
@@ -525,6 +525,14 @@ class SchemaUsers {
['key' => 'user_cover_img', 'label' => '用户默认封面', 'type' => 'media', 'default' => get_theme_file_uri('assets/img/user_t.jpg'), 'help' => '建议尺寸 1000×400;用户未设置封面时显示此图。'],
['key' => 'user_desc_std', 'label' => '用户默认签名', 'type' => 'input', 'default' => '这家伙很懒,什么都没有写...', 'help' => '用户未设置个人简介时显示的默认文案。'],
]],
['key' => 'rewards', 'title' => '打赏', 'fields' => [
['key' => 'post_rewards_s', 'label' => '用户打赏功能', 'type' => 'switcher', 'default' => true, 'help' => '开启后,登录用户可使用站内余额赞赏作者,金额直接进入作者余额。'],
['key' => 'post_rewards_text', 'label' => '打赏按钮文案', 'type' => 'input', 'default' => '赞赏', 'dependsOn' => ['key' => 'post_rewards_s', 'value' => true], 'help' => '自定义打赏按钮文字'],
['key' => 'post_rewards_amounts', 'label' => '快捷金额', 'type' => 'input', 'default' => '5,10,20,50,100', 'dependsOn' => ['key' => 'post_rewards_s', 'value' => true], 'help' => '使用英文逗号分隔'],
['key' => 'post_rewards_custom', 'label' => '允许自定义金额', 'type' => 'switcher', 'default' => true, 'dependsOn' => ['key' => 'post_rewards_s', 'value' => true]],
['key' => 'post_rewards_min', 'label' => '最低金额', 'type' => 'input', 'sanitize_type' => 'money_decimal', 'default' => '1.00', 'min' => 0.01, 'max' => 1000, 'step' => 0.01, 'dependsOn' => ['key' => 'post_rewards_s', 'value' => true]],
['key' => 'post_rewards_max', 'label' => '最高金额', 'type' => 'input', 'sanitize_type' => 'money_decimal', 'default' => '1000.00', 'min' => 1, 'max' => 100000, 'step' => 0.01, 'dependsOn' => ['key' => 'post_rewards_s', 'value' => true]],
]],
],
],
'verify' => [