[FIX] 還原麵包屑預設邏輯,移除索引頁面重複顯示
Some checks failed
star-cloud-deploy-demo / deploy-demo (push) Has been cancelled

This commit is contained in:
2026-03-24 16:55:57 +08:00
parent 5c55553905
commit 7209f9ea98

View File

@@ -80,11 +80,8 @@
} }
// 3. 處理最後一個動作/頁面 // 3. 處理最後一個動作/頁面
if ($lastSegment !== 'index') {
$pageLabel = match($lastSegment) { $pageLabel = match($lastSegment) {
'index' => match($segments[1] ?? '') {
'machines' => request()->input('tab') === 'expiry' ? __('Expiry Management') : null,
default => null,
},
'edit' => str_starts_with($routeName, 'profile') ? null : __('Edit'), 'edit' => str_starts_with($routeName, 'profile') ? null : __('Edit'),
'create' => __('Create'), 'create' => __('Create'),
'show' => __('Detail'), 'show' => __('Detail'),
@@ -160,6 +157,7 @@
'active' => true 'active' => true
]; ];
} }
}
// 確保最後一個 link 是 active 的 // 確保最後一個 link 是 active 的
if (!empty($links)) { if (!empty($links)) {