feat(user-center): add dedicated creator workspace

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-06 17:23:31 +08:00
co-authored by Claude Fable 5
parent c5b7deaa59
commit ceff04ce54
7 changed files with 127 additions and 5 deletions
+12
View File
@@ -133,6 +133,12 @@ class Center {
'priority' => 20,
'type' => 'panel',
],
'creator' => [
'label' => __('创作中心', 'aksrt'),
'icon' => 'feather-alt',
'priority' => 18,
'type' => 'panel',
],
'comments' => [
'label' => __('我的评论', 'aksrt'),
'icon' => 'comment',
@@ -210,6 +216,12 @@ class Center {
// Follow configured order; always auto-include enabled surfaces.
$order = $configured;
// Creator center is a dedicated workspace, separate from the posts archive.
if (!in_array('creator', $order, true)) {
$insert_at = array_search('profile', $order, true);
array_splice($order, $insert_at === false ? 0 : (int) $insert_at + 1, 0, ['creator']);
}
// Growth level is a dedicated user-center surface, separate from spendable points.
if ($level_on && !in_array('level', $order, true)) {
$insert_at = array_search('profile', $order, true);