修复用户个人信息卡片

This commit is contained in:
2026-08-23 14:20:13 +08:00
parent 84321801a6
commit c3f66e9a14
4 changed files with 58 additions and 15 deletions
+5 -1
View File
@@ -251,13 +251,17 @@ final class WidgetSchemas {
['id' => 'orderby', 'type' => 'select', 'label' => '排序', 'default' => 'registered', 'options' => ['registered' => '注册时间', 'display_name' => '名称', 'post_count' => '文章数', 'points' => '积分', 'followers' => '粉丝']],
];
}
return [
$fields = [
['id' => 'show_cover', 'type' => 'switcher', 'label' => '显示封面', 'default' => true],
['id' => 'show_posts', 'type' => 'switcher', 'label' => '显示文章', 'default' => $slug === 'author_card'],
['id' => 'show_buttons', 'type' => 'switcher', 'label' => '显示快捷按钮', 'default' => true],
['id' => 'primary_action', 'type' => 'select', 'label' => '主按钮', 'default' => 'submit', 'options' => self::user_actions()],
['id' => 'secondary_action', 'type' => 'select', 'label' => '次按钮', 'default' => 'home', 'options' => self::user_actions()],
];
if ($slug === 'user_card') {
$fields[] = ['id' => 'loged_title', 'type' => 'text', 'label' => '未登录文案', 'default' => 'Hi!请登录'];
}
return $fields;
}
private static function icon_card_fields(): array {