Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sidebar: profile button alignment #1096

Merged
merged 1 commit into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 16 additions & 21 deletions desk/src/components/desk/SideBarMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,22 @@
class="flex w-56 shrink select-none flex-col border-r text-base text-gray-700"
>
<div>
<Dropdown :options="profileSettings">
<Dropdown class="p-2" :options="profileSettings">
<template #default="{ open }">
<Button class="my-3 w-full bg-white px-2 hover:bg-white">
<div class="flex items-center gap-2">
<div>
<Avatar
size="sm"
:label="authStore.userName"
:image-u-r-l="authStore.userImage"
/>
</div>
<div>
{{ authStore.userName }}
</div>
<div>
<FeatherIcon
:name="open ? 'chevron-up' : 'chevron-down'"
class="h-5 w-5 text-gray-500"
/>
</div>
</div>
<Button
appearance="minimal"
class="py-2 pl-2"
:label="authStore.userName"
:icon-right="open ? 'chevron-up' : 'chevron-down'"
>
<template #icon-left>
<Avatar
size="sm"
class="mr-2"
:label="authStore.userName"
:image-u-r-l="authStore.userImage"
/>
</template>
</Button>
</template>
</Dropdown>
Expand Down Expand Up @@ -100,7 +95,7 @@
<script setup lang="ts">
import { ref } from "vue";
import { useRoute } from "vue-router";
import { Dropdown, FeatherIcon, Avatar } from "frappe-ui";
import { Dropdown, Avatar } from "frappe-ui";
import { useAuthStore } from "@/stores/auth";
import IconDashboard from "@/assets/icons/dashboard.svg?component";
import IconTicket from "@/assets/icons/ticket.svg?component";
Expand Down