fix(gui-v2): breadcrumb navigation via router.push + button type + void logout
- FIX A (IMPORTANT): PrimeVue Breadcrumb ignores `route` key; map non-last items with `command: () => router.push(item.to)` for real client-side nav - FIX B: add type="button" to all 6 native <button> chrome elements - FIX C: authStore.logout() bare call matches project no-void pattern - FIX D: document param-route edge case in toBreadcrumbItems - FIX E: regression test asserts command+push on non-last, no command on last, no `route` key on any item Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -55,7 +55,11 @@ export function toBreadcrumbItems(matched: readonly BreadcrumbRouteRecord[]): Br
|
||||
if (isLast)
|
||||
return { label }
|
||||
|
||||
// Prefer path; fall back to name when path is absent/empty
|
||||
// Prefer path; fall back to name when path is absent/empty.
|
||||
// NOTE: a non-last record whose `path` is a param template (e.g. `/events/:id`)
|
||||
// would yield an unresolved-template `to` — acceptable in foundation scope because
|
||||
// param routes are normally the last (current, no-`to`) segment.
|
||||
// TODO TECH-WS-GUI-REDESIGN: resolve param paths if a non-leaf param route ever needs a crumb link
|
||||
const to: RouteLocationRaw
|
||||
= record.path
|
||||
? record.path
|
||||
|
||||
Reference in New Issue
Block a user