Skip to content

Commit

Permalink
docs: fix ui component name usage (#3139)
Browse files Browse the repository at this point in the history
  • Loading branch information
BobbieGoede authored Sep 26, 2024
1 parent b9e5296 commit 837fa2f
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion docs/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const links: PageLink[] = [
<TheFooter />

<ClientOnly>
<LazyUDocsSearch :files="files" :navigation="navigation" :links="links" />
<LazyUContentSearch :files="files" :navigation="navigation" :links="links" />
</ClientOnly>

<UNotifications />
Expand Down
2 changes: 1 addition & 1 deletion docs/components/TheHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const navigation = inject<NavItem[]>('navigation', [])

<template #right>
<UTooltip text="Search" :shortcuts="[metaSymbol, 'K']">
<UDocsSearchButton :label="null" />
<UContentSearchButton :label="null" />
</UTooltip>

<UTooltip text="Toggle Theme">
Expand Down
2 changes: 1 addition & 1 deletion docs/error.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ provide('navigation', navigation)
<TheFooter />

<ClientOnly>
<LazyUDocsSearch :files="files" :navigation="navigation" />
<LazyUContentSearch :files="files" :navigation="navigation" />
</ClientOnly>

<UNotifications />
Expand Down
9 changes: 5 additions & 4 deletions docs/layouts/docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ const allNavigationTree = computed(() =>
// Detect if we're on the not v8 docs
const route = useRoute()
const isV7Docs = computed(() => route.path.includes('/v7'))
const isV9Docs = computed(() => route.path.includes('/v9'))
const isV7Docs = computed(() => route.path.includes('/docs/v7'))
const isV9Docs = computed(() => route.path.includes('/docs/v9'))
// Redirect to getting-started, if we're on the `/docs/v9`
watch(
Expand All @@ -21,7 +21,8 @@ watch(
if (newPath.endsWith('/v9')) {
navigateTo('/docs/v9/getting-started')
}
}
},
{ immediate: true }
)
// Exclude the not v8 docs from the navigation tree if we're not on the not v8 docs, and vice versa
Expand All @@ -48,7 +49,7 @@ const activeNavigationTree = computed(() =>
<UAside>
<VersionSelect />
<UDivider type="dashed" class="mb-6" />
<UNavigationTree :links="mapContentNavigation(activeNavigationTree)" default-open :multiple="false" />
<UNavigationTree :links="mapContentNavigation(activeNavigationTree) || []" default-open :multiple="false" />
</UAside>
</template>

Expand Down
6 changes: 3 additions & 3 deletions docs/pages/docs/[...slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,18 @@ const links = computed(() =>

<hr v-if="surround?.length" />

<UDocsSurround :surround="surround" />
<UContentSurround :surround="surround" />
</UPageBody>

<template v-if="page.toc !== false" #right>
<UDocsToc :title="toc?.title" :links="page.body?.toc?.links">
<UContentToc :title="toc?.title" :links="page.body?.toc?.links">
<template v-if="toc?.bottom" #bottom>
<div class="hidden lg:block space-y-6" :class="{ '!mt-6': page.body?.toc?.links?.length }">
<UDivider v-if="page.body?.toc?.links?.length" type="dashed" />
<UPageLinks :links="links" />
</div>
</template>
</UDocsToc>
</UContentToc>
</template>
</UPage>
</template>

0 comments on commit 837fa2f

Please sign in to comment.