koel/resources/assets/js/components/ui/ProfileAvatar.vue

36 lines
690 B
Vue
Raw Normal View History

2022-10-13 15:18:47 +00:00
<template>
<a
v-if="currentUser"
v-koel-tooltip.left
class="view-profile"
data-testid="view-profile-link"
href="/#/profile"
title="Profile and preferences"
>
2024-01-18 11:13:05 +00:00
<UserAvatar :user="currentUser" width="40"/>
2022-10-13 15:18:47 +00:00
</a>
</template>
<script lang="ts" setup>
import { useAuthorization } from '@/composables'
2024-01-18 11:13:05 +00:00
import UserAvatar from '@/components/user/UserAvatar.vue'
2022-10-13 15:18:47 +00:00
const { currentUser } = useAuthorization()
</script>
<style lang="scss" scoped>
img {
padding: 2px;
border: 1px solid rgba(255, 255, 255, .1);
transition: border .2s ease-in-out;
&:hover {
border-color: rgba(255, 255, 255, .3);
}
&:active {
transform: scale(.95);
}
}
</style>