Unify category tree pickers and prefer free-text technical AI fields.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
838e84056e
commit
8465a29ce1
@@ -4,7 +4,7 @@ export interface DashboardDocumentTitleParts {
|
||||
pageLabels?: string[]
|
||||
}
|
||||
|
||||
/** Pattern: `{businessName} - {dashboardName} · {page}` */
|
||||
/** Pattern: `{dashboardName} · {page} - {businessName}` */
|
||||
export function formatDashboardDocumentTitle({
|
||||
businessName,
|
||||
dashboardName,
|
||||
@@ -13,12 +13,10 @@ export function formatDashboardDocumentTitle({
|
||||
const business = businessName.trim() || 'Store'
|
||||
const dashboard = dashboardName.trim()
|
||||
const pages = pageLabels.map((label) => label.trim()).filter(Boolean)
|
||||
const pagePart =
|
||||
pages.length === 0 ? dashboard : `${dashboard} · ${pages.join(' · ')}`
|
||||
|
||||
if (pages.length === 0) {
|
||||
return `${business} - ${dashboard}`
|
||||
}
|
||||
|
||||
return `${business} - ${dashboard} · ${pages.join(' · ')}`
|
||||
return `${pagePart} - ${business}`
|
||||
}
|
||||
|
||||
export interface RouteTitleRule {
|
||||
|
||||
Reference in New Issue
Block a user