Show avatars of assigned users
This commit is contained in:
parent
0b18ca73c2
commit
aeae2c4f1f
4 changed files with 16 additions and 1 deletions
|
@ -23,7 +23,9 @@ export default {
|
|||
|
||||
// Tell others the user is autheticated
|
||||
this.user.authenticated = true
|
||||
this.getUserInfos()
|
||||
const inf = this.getUserInfos()
|
||||
// eslint-disable-next-line
|
||||
console.log(inf)
|
||||
|
||||
// Hide the loader
|
||||
context.loading = false
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
<span class="tag" v-for="label in l.labels" :style="{'background': label.hex_color, 'color': label.textColor}" :key="label.id">
|
||||
<span>{{ label.title }}</span>
|
||||
</span>
|
||||
<img :src="gravatar(a)" :alt="a.username" v-for="a in l.assignees" class="avatar" :key="l.id + 'assignee' + a.id"/>
|
||||
<i v-if="l.dueDate > 0" :class="{'overdue': (l.dueDate <= new Date())}"> - Due on {{new Date(l.dueDate).toLocaleString()}}</i>
|
||||
<span v-if="l.priority >= priorities.HIGH" class="high-priority" :class="{'not-so-high': l.priority === priorities.HIGH}">
|
||||
<span class="icon">
|
||||
|
@ -173,6 +174,9 @@
|
|||
this.taskEditTask = theTask
|
||||
this.isTaskEdit = true
|
||||
},
|
||||
gravatar(user) {
|
||||
return 'https://www.gravatar.com/avatar/' + user.avatarUrl + '?s=27'
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -4,6 +4,7 @@ export default class UserModel extends AbstractModel {
|
|||
defaults() {
|
||||
return {
|
||||
id: 0,
|
||||
avatarUrl: '',
|
||||
email: '',
|
||||
username: '',
|
||||
created: 0,
|
||||
|
|
|
@ -58,6 +58,14 @@
|
|||
.tag {
|
||||
margin: 0 0.5em;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
border-radius: 50%;
|
||||
vertical-align: bottom;
|
||||
margin-left: 5px;
|
||||
height: 27px;
|
||||
width: 27px;
|
||||
}
|
||||
}
|
||||
|
||||
.high-priority{
|
||||
|
|
Loading…
Reference in a new issue