Commit db2eabfd authored by Phil Hughes's avatar Phil Hughes

Added assignee to frontend

parent fcee9323
......@@ -2,6 +2,11 @@ class Issue {
constructor (obj) {
this.id = obj.iid;
this.title = obj.title;
if (obj.assignee) {
this.assignee = new User(obj.assignee);
}
this.labels = [];
obj.labels.forEach((label) => {
......
class User {
constructor (user) {
this.id = user.id;
this.name = user.name;
this.username = user.username;
this.avatar = user.avatar_url;
}
}
......@@ -237,3 +237,8 @@
margin-right: 8px;
font-weight: 500;
}
.card-avatar {
margin-top: -2px;
border-radius: 50%;
}
......@@ -8,3 +8,5 @@
{{ issue.id }}
%span.label.color-label{ "v-for" => "label in issue.labels", ":style" => "{ backgroundColor: label.color, color: label.textColor }" }
{{ label.title }}
%a{ ":href" => "'/u/' + issue.assignee.username", ":title" => "issue.assignee.name", "v-if" => "issue.assignee" }
%img.card-avatar{ ":src" => "issue.assignee.avatar", width: 20, height: 20 }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment