feat(admin-web): preserve template wizard entry source and refresh AI banner
- Carry `from=workspace` query from the workbench into the wizard so cancel and post-generate redirects return to the workbench instead of always landing on /articles/templates. - AppShell now resolves an effective navKey from `route.query.from`, so the sidebar highlight and breadcrumb track the entry source while inside the wizard. - Redesign the brand-info AI analyze CTA into a standalone banner with template-aware copy (default / product_review / research_report) and add the matching i18n keys. - Drop the unused 批量生成文章 button and its styling from the templates page. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,12 +67,23 @@ const membershipExpiryText = computed(() => {
|
||||
day: '2-digit',
|
||||
}).format(date)
|
||||
})
|
||||
const selectedKeys = computed(() => {
|
||||
if (route.meta.navKey === null) {
|
||||
return []
|
||||
}
|
||||
const navKeyOverrides: Record<string, string> = {
|
||||
workspace: '/workspace',
|
||||
}
|
||||
|
||||
return [String(route.meta.navKey ?? route.path)]
|
||||
const effectiveNavKey = computed<string | null>(() => {
|
||||
if (route.meta.navKey === null) {
|
||||
return null
|
||||
}
|
||||
const from = route.query.from
|
||||
if (typeof from === 'string' && navKeyOverrides[from]) {
|
||||
return navKeyOverrides[from]
|
||||
}
|
||||
return String(route.meta.navKey ?? route.path)
|
||||
})
|
||||
|
||||
const selectedKeys = computed(() => {
|
||||
return effectiveNavKey.value ? [effectiveNavKey.value] : []
|
||||
})
|
||||
const pageTitle = computed(() => t(String(route.meta.titleKey ?? 'route.workspace.title')))
|
||||
|
||||
@@ -165,7 +176,7 @@ const navSections = computed<NavSection[]>(() => {
|
||||
|
||||
const headerBreadcrumbs = computed<HeaderBreadcrumb[]>(() => {
|
||||
const currentTitle = pageTitle.value
|
||||
const navKey = route.meta.navKey === null ? null : String(route.meta.navKey ?? route.path)
|
||||
const navKey = effectiveNavKey.value
|
||||
|
||||
if (!navKey) {
|
||||
return [{ label: currentTitle }]
|
||||
|
||||
Reference in New Issue
Block a user