Add tab/project quick-switch dropdowns to the project breadcrumb

The project header breadcrumb now always shows the active tab
(previously Overview was hidden), and both the project-name and
tab-level crumbs become dropdowns: project name lists all projects
(with a checkmark on the active one, plus "All Projects"), and the
tab crumb lists Overview/Shots/Assets/Tasks/Schedule/Settings with a
checkmark on the current tab. The trailing ">" separator is skipped
after any crumb that renders as a dropdown.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-20 23:22:35 +08:00
parent 74be250912
commit 04c85be0f7
2 changed files with 95 additions and 10 deletions
+14 -6
View File
@@ -7,6 +7,10 @@ export interface BreadcrumbItem {
label: string
href?: string
isActive?: boolean
/** True for the crumb representing the current project tab (Overview/Shots/Assets/...), so the header can render a tab-switcher dropdown on it. */
isTabCrumb?: boolean
/** True for the crumb representing the current project name, so the header can render a project-switcher dropdown on it. */
isProjectCrumb?: boolean
}
export class BreadcrumbService {
@@ -33,7 +37,8 @@ export class BreadcrumbService {
// Add project breadcrumb
crumbs.push({
label: project ? project.name : `Project ${projectId}`,
href: `/projects/${projectId}`
href: `/projects/${projectId}`,
isProjectCrumb: true
})
// Handle tab-based navigation
@@ -45,7 +50,8 @@ export class BreadcrumbService {
if (tab === 'shots' && route.params.episodeId) {
crumbs.push({
label: tabLabel,
href: `/projects/${projectId}/shots`
href: `/projects/${projectId}/shots`,
isTabCrumb: true
})
// Add episode context
@@ -66,11 +72,12 @@ export class BreadcrumbService {
})
}
}
} else if (pathSegments[2] || tab !== 'overview') {
// Regular tab navigation (don't show Overview in breadcrumbs unless explicitly navigated to)
} else {
// Regular tab navigation (Overview included, so the trail always reads Home > Project > Tab)
crumbs.push({
label: tabLabel,
isActive: true
isActive: true,
isTabCrumb: true
})
}
}
@@ -85,7 +92,8 @@ export class BreadcrumbService {
if (crumbs.length > 1) {
crumbs[crumbs.length - 1] = {
label: 'Shots',
href: `/projects/${projectId}/shots`
href: `/projects/${projectId}/shots`,
isTabCrumb: true
}
}
crumbs.push({