fix admin sidebar

This commit is contained in:
hay-kot 2021-02-25 20:20:26 -09:00
commit ccc2eda305
3 changed files with 17 additions and 6 deletions

View file

@ -22,8 +22,15 @@
>
<template v-slot:prepend>
<v-list-item two-line>
<v-list-item-avatar>
<img src="https://randomuser.me/api/portraits/women/81.jpg" />
<v-list-item-avatar color="accent" class="white--text">
<img
:src="userProfileImage"
v-if="!hideImage"
@error="hideImage = true"
/>
<div v-else>
{{ initials }}
</div>
</v-list-item-avatar>
<v-list-item-content>
@ -70,9 +77,14 @@
</template>
<script>
import { validators } from "@/mixins/validators";
import { initials } from "@/mixins/initials";
import { user } from "@/mixins/user";
export default {
mixins: [validators, initials, user],
data() {
return {
hideImage: false,
showSidebar: false,
mobile: false,
links: [],
@ -123,8 +135,8 @@ export default {
},
computed: {
user() {
return this.$store.getters.getUserData;
userProfileImage() {
return `api/users/${this.user.id}/image`;
},
},

View file

@ -5,7 +5,7 @@
<v-img :src="getImage(image)"> </v-img>
</v-list-item-avatar>
<v-list-item-content>
<v-list-item-title >
<v-list-item-title>
{{ name }}
</v-list-item-title>
<v-rating length="5" size="16" dense :value="rating"></v-rating>

View file

@ -24,7 +24,6 @@
<v-avatar
color="accent"
size="120"
v-if="!loading"
class="white--text headline mr-2"
>
<img