Commit 4b333fd0 authored by Clement Ho's avatar Clement Ho

[skip ci] update model

parent 48c253ec
......@@ -21,7 +21,7 @@ export default {
return function() {
this.showMore = !this.showMore;
}.bind(this);
}
},
},
components: {
'show-more-assignees': ShowMoreAssignees,
......@@ -31,8 +31,8 @@ export default {
<div class="hide-collapsed">
<div class="user-list">
<div class="user-item" v-for="(user, index) in assignees.users" v-if="showMore || (index < 5 && !showMore)">
<a class="user-link has-tooltip" data-placement="bottom" title="" :href="user.url" :data-title="user.name">
<img width="32" class="avatar avatar-inline s32 " alt="" :src="user.avatar_url">
<a class="user-link has-tooltip" data-placement="bottom" title="" :href="'/' + user.username" :data-title="user.name">
<img width="32" class="avatar avatar-inline s32 " alt="" :src="user.avatarUrl">
</a>
</div>
</div>
......
......@@ -6,7 +6,7 @@ export default {
template: `
<div class="value hide-collapsed">
<a class="author_link bold" :href="user.url">
<img width="32" class="avatar avatar-inline s32" alt="" :src="user.avatar_url">
<img width="32" class="avatar avatar-inline s32" alt="" :src="user.avatarUrl">
<span class="author">{{user.name}}</span>
<span class="username">@{{user.username}}</span>
</a>
......
export default class SidebarAssigneesStore {
constructor() {
this.users = [{
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username',
}, {
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username1',
}, {
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username2',
}, {
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username3',
}, {
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username4',
}, {
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
avatarUrl: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
name: 'test',
username: 'username5',
}];
this.users = [];
}
addUser() {
addUser(name, username, avatarUrl) {
this.users.push({
avatar_url: 'http://www.gravatar.com/avatar/7e65550957227bd38fe2d7fbc6fd2f7b?s=80&d=identicon',
url: '/user4',
name: 'test',
username: 'username6',
avatarUrl,
name,
username,
});
}
......
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