Skip to content

Commit

Permalink
Implement UserCard
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Apr 12, 2024
1 parent d16f75f commit c7ca8a8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 21 deletions.
8 changes: 6 additions & 2 deletions app/assets/App.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script setup>
import { MainContent } from '@userfrosting/theme-pink-cupcake/Content'
import { NavBar } from '@userfrosting/theme-pink-cupcake/NavBar'
import { NavBarItem } from '@userfrosting/theme-pink-cupcake/NavBar'
import { NavBar, NavBarItem, NavBarUserCard, NavBarUserCardButton } from '@userfrosting/theme-pink-cupcake/NavBar'
import { useAuthStore } from './stores/auth.js'
const auth = useAuthStore()
</script>

<template>
Expand All @@ -10,6 +11,9 @@ import { NavBarItem } from '@userfrosting/theme-pink-cupcake/NavBar'
<NavBarItem to="/about" label="About" />
<NavBarItem to="/resources" label="Api Test" />
<NavBarItem to="/auth" label="Login Test" />
<NavBarUserCard v-if="auth.auth" :username="auth.user.full_name" :avatar="auth.user.avatar" :meta="auth.user.user_name">
<NavBarUserCardButton label="Logout" @click="auth.logout()" />
</NavBarUserCard>
</NavBar>
<MainContent>
<RouterView />
Expand Down
38 changes: 19 additions & 19 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7ca8a8

Please sign in to comment.