feat: resolve status paths with router (#258)

This commit is contained in:
Daniel Roe 2022-11-30 17:15:18 +00:00 committed by GitHub
parent 24bbe9135b
commit 4ed1816806
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 106 additions and 50 deletions

View file

@ -18,7 +18,7 @@ const { t } = useI18n()
<NavSideItem
v-if="isMediumScreen"
:text="currentUser.account.displayName"
:to="getAccountPath(currentUser.account)"
:to="getAccountRoute(currentUser.account)"
icon="i-ri:account-circle-line"
>
<template #icon>

View file

@ -2,7 +2,7 @@
const props = defineProps<{
text?: string
icon: string
to: string
to: string | Record<string, string>
}>()
defineSlots<{
@ -15,7 +15,7 @@ const router = useRouter()
useCommand({
scope: 'Navigation',
name: () => props.text ?? props.to,
name: () => props.text ?? typeof props.to === 'string' ? props.to as string : props.to.name,
icon: () => props.icon,
onActivate() {