mirror of
https://github.com/hay-kot/mealie.git
synced 2025-08-22 14:33:33 -07:00
fix admin sidebar
This commit is contained in:
parent
a7d48f95cf
commit
ccc2eda305
3 changed files with 17 additions and 6 deletions
|
@ -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`;
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
<v-avatar
|
||||
color="accent"
|
||||
size="120"
|
||||
v-if="!loading"
|
||||
class="white--text headline mr-2"
|
||||
>
|
||||
<img
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue