-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
344717c
commit f73e122
Showing
15 changed files
with
5,237 additions
and
3,233 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { type RouteRecordRaw } from 'vue-router' | ||
import DevRoute from '#root/components/DevRoute.vue' | ||
const props = defineProps<{ parent: string, route: RouteRecordRaw }>() | ||
const path = computed(() => `${props.parent} -> ${props.route.path}`) | ||
const children = computed(() => Array.from(props.route.children || []).sort((a, b) => a.path < b.path ? -1 : 1)) | ||
</script> | ||
|
||
<template> | ||
<tr> | ||
<td class="py-1 px-2"> | ||
<CoreLink :to="route.path">{{ path }}</CoreLink> | ||
<CoreLink :to="route.path"> | ||
{{ path }} | ||
</CoreLink> | ||
</td> | ||
<td class="py-1 px-2"> | ||
<CoreLink :to="route.path">{{ route.name }}</CoreLink> | ||
<CoreLink :to="route.path"> | ||
{{ route.name }} | ||
</CoreLink> | ||
</td> | ||
<td class="py-1 px-2"> | ||
<CoreLink :to="route.path">{{ route.redirect }}</CoreLink> | ||
<CoreLink :to="route.path"> | ||
{{ route.redirect }} | ||
</CoreLink> | ||
</td> | ||
<td class="py-1 px-2"> | ||
<CoreLink :to="route.path">{{ route.component }}</CoreLink> | ||
<CoreLink :to="route.path"> | ||
{{ route.component }} | ||
</CoreLink> | ||
</td> | ||
</tr> | ||
<DevRoute v-if="children" v-for="child in children" :parent="path" :route="child" /> | ||
<template v-if="children.length"> | ||
<DevRoute v-for="child in children" :key="JSON.stringify(child)" :parent="path" :route="child" /> | ||
</template> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { type RouteRecordRaw } from 'vue-router' | ||
import DevRoute from '#root/components/DevRoute.vue' | ||
const props = defineProps<{ parent: string, route: RouteRecordRaw }>() | ||
const path = computed(() => `${props.parent} -> ${props.route.path}`) | ||
const children = computed(() => props.route.children?.sort((a, b) => a.path < b.path ? -1 : 1)) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,30 @@ | ||
<template> | ||
<table> | ||
<tr> | ||
<td class="font-bold py-1 px-2">Path</td> | ||
<td class="font-bold py-1 px-2">Name</td> | ||
<td class="font-bold py-1 px-2">Redirect</td> | ||
<td class="font-bold py-1 px-2">Component</td> | ||
</tr> | ||
<DevRoute v-for="route in routes" parent="/" :route="route" /> | ||
</table> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { computed } from 'vue' | ||
import { type RouteRecordRaw } from 'vue-router' | ||
import DevRoute from '#root/components/DevRoute.vue' | ||
const props = defineProps<{ routes: RouteRecordRaw[] }>() | ||
const routes = computed(() => props.routes.sort((a, b) => a.path < b.path ? -1 : 1)) | ||
const sortedRoutes = computed(() => [...props.routes].sort((a, b) => a.path < b.path ? -1 : 1)) | ||
</script> | ||
|
||
<template> | ||
<table> | ||
<tr> | ||
<td class="font-bold py-1 px-2"> | ||
Path | ||
</td> | ||
<td class="font-bold py-1 px-2"> | ||
Name | ||
</td> | ||
<td class="font-bold py-1 px-2"> | ||
Redirect | ||
</td> | ||
<td class="font-bold py-1 px-2"> | ||
Component | ||
</td> | ||
</tr> | ||
<template v-if="sortedRoutes"> | ||
<DevRoute v-for="route in sortedRoutes" :key="JSON.stringify(route)" :route="route" parent="/" /> | ||
</template> | ||
</table> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
<template> | ||
<div class="flex flex-col"> | ||
<h1 class="text-lg">There are {{ routes.length }} top-level routes.</h1> | ||
<DevRoutes :routes="routes" class="whitespace-nowrap" /> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import DevRoutes from '#root/components/DevRoutes.vue' | ||
const routes = computed(() => [...useRouter().options.routes]) | ||
</script> | ||
|
||
<template> | ||
<div class="flex flex-col"> | ||
<h1 class="text-lg"> | ||
There are {{ routes.length }} top-level routes. | ||
</h1> | ||
<DevRoutes :routes="routes" class="whitespace-nowrap" /> | ||
</div> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script lang="ts"> | ||
export { default } from '#root/pages/_assistant/index.vue' | ||
</script> | ||
<template> | ||
<AssistantContainer /> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script lang="ts"> | ||
export { default } from '#root/pages/_assistant/index.vue' | ||
</script> | ||
<template> | ||
<AssistantContainer /> | ||
</template> |
Oops, something went wrong.