Added better display of bread crums and side bar menus for apps and objects
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import AppSidebar from '@/components/AppSidebar.vue'
|
||||
import AIChatBar from '@/components/AIChatBar.vue'
|
||||
import {
|
||||
@@ -13,8 +14,15 @@ import { Separator } from '@/components/ui/separator'
|
||||
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar'
|
||||
|
||||
const route = useRoute()
|
||||
const { breadcrumbs: customBreadcrumbs } = useBreadcrumbs()
|
||||
|
||||
const breadcrumbs = computed(() => {
|
||||
// If custom breadcrumbs are set by the page, use those
|
||||
if (customBreadcrumbs.value.length > 0) {
|
||||
return customBreadcrumbs.value
|
||||
}
|
||||
|
||||
// Otherwise, fall back to URL-based breadcrumbs
|
||||
const paths = route.path.split('/').filter(Boolean)
|
||||
return paths.map((path, index) => ({
|
||||
name: path.charAt(0).toUpperCase() + path.slice(1),
|
||||
|
||||
Reference in New Issue
Block a user