Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
arkhaiel committed Sep 27, 2024
1 parent 9814e5d commit 66d8551
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 22 deletions.
32 changes: 22 additions & 10 deletions app/components/userDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
<template>
<AuthState>
<div v-if="store.session.loggedIn" class="flex flex-row justify-between w-full">
<UBadge variant="soft" size="lg">
<Icon name="ph:student-fill" />
{{ store.session.user?.firstName }}
</UBadge>
<ClientOnly>
<div class="flex flex-row justify-between">
<DevOnly>
<UBadge variant="soft" size="lg">
<Icon name="ph:student-fill" />
Mathieu
</UBadge>

<UButton variant="ghost" @click="logout">
Déconnexion
</UButton>
<UButton variant="ghost" @click="logout">
Déconnexion
</UButton>
</DevOnly>
<div v-if="store.session.loggedIn" class="flex flex-row justify-between w-full">
<UBadge variant="soft" size="lg">
<Icon name="ph:student-fill" />
{{ store.session.user?.firstName }}
</UBadge>

<UButton variant="ghost" @click="logout">
Déconnexion
</UButton>
</div>
</div>
</AuthState>
</ClientOnly>
</template>

<script lang="ts" setup>
Expand Down
26 changes: 14 additions & 12 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@
<UPage>
<template #left>
<UAside>
<div class="mb-2">
<UDropdown :items="matieres" :popper="{ placement: 'bottom-start' }">
<UButton
label="Navigation"
trailing-icon="heroicons:chevron-down-20-solid"
variant="solid"
color="gray"
/>
</UDropdown>
</div>
<UContentSearchButton label="Recherche..." />
<UDivider class="py-4" />
<template #top>
<div class="flex flex-col gap-2">
<UDropdown :items="matieres" :popper="{ placement: 'bottom-start' }">
<UButton
label="Navigation"
trailing-icon="heroicons:chevron-down-20-solid"
variant="solid"
color="gray"
/>
</UDropdown>
<UContentSearchButton label="Recherche..." />
</div>
</template>

<UNavigationTree :links="mapContentNavigation(path == '/' ? navigation ?? [] : localNav)" :multiple="path == '/' ? false : true" :default-open="false" />
</UAside>
</template>
Expand Down

0 comments on commit 66d8551

Please sign in to comment.