feat(forum): rebuild plate, post and compose pages

Match the reference layouts for the remaining forum routes: plate pages
get the blurred header card, moderator row and the affix tab bar with
per-tab filtering, topping posts and moderator-only pending/trash tabs;
post pages get the article shell with breadcrumbs, cover, meta row,
vote box, tag row and footer actions; compose pages get the reference
editor plus settings sidebar (submit/draft, status, access, plate,
topic, tag, type, vote) with a cover picker. Saving now honours draft
state and the featured image through the REST contract.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
kate522andClaude Fable 5 committed 2026-11-11 16:17:55 +08:00
1 parent eceddb5f7d
commit 5d3358d844
13 files changed
+891 -199

No files matched your search

+28
View File
@@ -53,6 +53,24 @@ final class SchemaForum {
self::field('jio_forum_home_follow_plate', '版块栏目显示已关注版块', 'switcher', true),
self::field('jio_forum_home_recommend_plate', '关注栏目显示版块推荐', 'switcher', true),
self::field('jio_forum_show_plate_cover', '显示版块封面', 'switcher', true),
self::field('jio_forum_plate_tab_active', '版块页默认栏目', 'number', 1, ['min' => 1, 'max' => 20, 'description' => '打开版块页面时默认显示第几个栏目']),
self::field('jio_forum_plate_tab_items', '版块页栏目', 'repeater', self::default_plate_tabs(), [
'addText' => '添加栏目',
'description' => '版块页顶部的栏目条;留空则使用「最新发布 / 最近回复 / 热门 / 精华」默认栏目',
'fields' => [
self::field('title', '栏目标题', 'input', ''),
self::field('orderby', '排序方式', 'select', 'date', ['options' => self::options([
'date' => '发布时间',
'modified' => '修改时间',
'last_reply' => '最新回复',
'views' => '阅读量',
'score' => '评分',
'comment_count' => '回复数量',
])]),
self::field('filter', '内容筛选', 'select', '', ['options' => self::options(['' => '全部', 'essence' => '精华'])]),
self::field('style', '列表样式', 'radio', 'detail', ['options' => self::options(['detail' => '详细内容', 'mini' => '简约风格'])]),
],
]),
self::field('jio_forum_search_enabled', '搜索包含帖子', 'switcher', true),
]),
'publishing' => self::section('publishing', '发布与审核', [
@@ -95,6 +113,16 @@ final class SchemaForum {
]];
}
/** Initial plate-page tab rows; the listing falls back to these when unset. */
private static function default_plate_tabs(): array {
return [
['title' => '最新发布', 'orderby' => 'date', 'filter' => '', 'style' => 'detail'],
['title' => '最近回复', 'orderby' => 'last_reply', 'filter' => '', 'style' => 'detail'],
['title' => '热门', 'orderby' => 'views', 'filter' => '', 'style' => 'detail'],
['title' => '精华', 'orderby' => 'modified', 'filter' => 'essence', 'style' => 'detail'],
];
}
private static function section(string $key, string $title, array $fields): array {
return ['key' => $key, 'title' => $title, 'version' => '1.0.0', 'option_key' => 'jio_settings', 'groups' => [['key' => $key, 'fields' => $fields]]];
}