From aeae2c4f1f2eb2551249d20548bfa7b268006577 Mon Sep 17 00:00:00 2001 From: kolaente Date: Thu, 6 Jun 2019 12:52:05 +0200 Subject: [PATCH] Show avatars of assigned users --- src/auth/index.js | 4 +++- src/components/tasks/ShowListTasks.vue | 4 ++++ src/models/user.js | 1 + src/styles/tasks.scss | 8 ++++++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/auth/index.js b/src/auth/index.js index dbc4bce31..4ba7dcbc9 100644 --- a/src/auth/index.js +++ b/src/auth/index.js @@ -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 diff --git a/src/components/tasks/ShowListTasks.vue b/src/components/tasks/ShowListTasks.vue index 7767e8863..955fc7c66 100644 --- a/src/components/tasks/ShowListTasks.vue +++ b/src/components/tasks/ShowListTasks.vue @@ -38,6 +38,7 @@ {{ label.title }} + - Due on {{new Date(l.dueDate).toLocaleString()}} @@ -173,6 +174,9 @@ this.taskEditTask = theTask this.isTaskEdit = true }, + gravatar(user) { + return 'https://www.gravatar.com/avatar/' + user.avatarUrl + '?s=27' + }, } } \ No newline at end of file diff --git a/src/models/user.js b/src/models/user.js index c6f65be1a..30d68c40a 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -4,6 +4,7 @@ export default class UserModel extends AbstractModel { defaults() { return { id: 0, + avatarUrl: '', email: '', username: '', created: 0, diff --git a/src/styles/tasks.scss b/src/styles/tasks.scss index 29890d420..386c2daff 100644 --- a/src/styles/tasks.scss +++ b/src/styles/tasks.scss @@ -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{