2022-10-13 15:18:47 +00:00
|
|
|
<template>
|
2022-10-25 17:29:56 +00:00
|
|
|
<a
|
|
|
|
v-koel-tooltip.left
|
|
|
|
class="view-profile"
|
|
|
|
data-testid="view-profile-link"
|
|
|
|
href="/#/profile"
|
|
|
|
title="Profile and preferences"
|
|
|
|
>
|
2022-12-02 16:17:37 +00:00
|
|
|
<img :alt="`Avatar of ${currentUser.name}`" :src="currentUser.avatar">
|
2022-10-13 15:18:47 +00:00
|
|
|
</a>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { useAuthorization } from '@/composables'
|
|
|
|
|
|
|
|
const { currentUser } = useAuthorization()
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
img {
|
|
|
|
display: block;
|
|
|
|
width: 39px;
|
|
|
|
aspect-ratio: 1/1;
|
|
|
|
border-radius: 50%;
|
|
|
|
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>
|