Skip to content
Snippets Groups Projects
Commit 2097848c authored by Gilgard's avatar Gilgard
Browse files

Removed vuetify

parent 2d90ad6a
No related branches found
No related tags found
1 merge request!13User profile view
<template>
<v-card class="pa-2" max-height="100" width="90%" outlined tile>
<v-row align="center" class="spacer" no-gutters>
<v-col cols="4" sm="2" md="1">
<v-avatar size="60">
<v-img src="@/assets/defaultUserProfileImage.jpg"></v-img>
</v-avatar>
</v-col>
<v-col class="hidden-xs-only" sm="5" md="3">
<v-card-title> {{ name }} </v-card-title>
</v-col>
<v-col>
<v-card-text>
<div>{{ ratingType }} rating:</div>
<v-rating
v-model="rating"
color="amber"
dense
half-increments
readonly
size="14"
></v-rating>
</v-card-text>
</v-col>
<v-col offset="4">
<v-card-text>
<v-chip v-if="admin" class="ma-2" color="error" outlined pill>
Fjern bruker
<v-icon right> mdi-trash-can-outline </v-icon>
</v-chip>
<v-chip v-else class="ma-2" color="primary" outlined pill>
Åpne chat
<v-icon right> mdi-chat </v-icon>
</v-chip>
</v-card-text>
</v-col>
</v-row>
<v-col> </v-col>
</v-card>
<div
class="select-none cursor-pointer hover:bg-gray-50 flex flex-1 items-center p-4"
>
<div class="flex flex-col w-10 h-10 justify-center items-center mr-4">
<router-link to="">
<img alt="profil" :src="getProfilePicture" />
</router-link>
</div>
<div class="flex-1 pl-1">
<div class="font-medium dark:text-white">{{ user.firstName }} {{ user.lastName }} </div>
</div>
<div class="flex flex-row justify-center">
<button class="w-10 text-right flex justify-end">Åpne chat</button>
<button v-if="admin" class="w-10 text-right flex justify-end">
Fjern bruker
</button>
</div>
</div>
</template>
<script>
export default {
name: "UserListItem",
data() {
return {
name: "Navn Navnesen",
rating: 3,
admin: true,
};
},
computed: {
//user: getUser(userID),
},
props: {
userID: Number,
ratingType: String,
user: Object,
admin: Boolean,
},
methods: {
getProfilePicture() {
if (this.user.picture == "") {
return "../assets/defaultUserProfileImage.jpg";
}
return this.user.picture;
},
},
};
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment