进行了一些小优化

This commit is contained in:
2026-08-25 17:02:33 +08:00
parent 4a4009133c
commit 11f1c23fa7
12 changed files with 463 additions and 10 deletions
+5 -5
View File
@@ -188,11 +188,11 @@ class Center {
'priority' => 55,
'type' => 'panel',
],
'notif' => [
'msg' => [
'label' => __('消息通知', 'aksrt'),
'icon' => 'bell',
'priority' => 60,
'type' => 'link',
'type' => 'panel',
],
'auth' => [
'label' => __('官方认证', 'aksrt'),
@@ -307,6 +307,9 @@ class Center {
if (!in_array('settings', $order, true)) {
$order[] = 'settings';
}
if (!in_array('msg', $order, true)) {
$order[] = 'msg';
}
foreach ($order as $key) {
if (!isset($definitions[$key])) {
@@ -339,9 +342,6 @@ class Center {
$this->panels[$key] = $panel;
}
// Notif is a link entry (messages page), not a dashboard panel body.
$this->panels['notif'] = $definitions['notif'];
// Keep stable order by priority.
uasort($this->panels, static function (array $a, array $b): int {
return ((int) ($a['priority'] ?? 100)) <=> ((int) ($b['priority'] ?? 100));