Toggle metadata visibility by clicking name
This commit is contained in:
@@ -3,6 +3,20 @@ import Ember from 'ember';
|
||||
export default Ember.Component.extend({
|
||||
|
||||
tagName: 'table',
|
||||
classNames: 'contributor-list'
|
||||
classNames: 'contributor-list',
|
||||
selectedContributor: null,
|
||||
|
||||
actions: {
|
||||
|
||||
toggleContributorInfo(contributor) {
|
||||
if (contributor.get('showMetadata')) {
|
||||
contributor.set('showMetadata', false);
|
||||
} else {
|
||||
this.get('contributors').setEach('showMetadata', false);
|
||||
contributor.set('showMetadata', true);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<tbody>
|
||||
{{#each contributors as |contributor|}}
|
||||
<tr class="{{if contributor.isCurrentUser 'current-user'}}">
|
||||
<tr class="{{if contributor.isCurrentUser 'current-user'}}" {{action "toggleContributorInfo" contributor}}>
|
||||
<td class="person">
|
||||
<img class="avatar" src={{contributor.avatarURL}}>
|
||||
{{contributor.github_username}}
|
||||
@@ -10,7 +10,7 @@
|
||||
<span class="symbol">₭S</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="metadata visible {{if contributor.isCurrentUser 'current-user'}}">
|
||||
<tr class="metadata {{if contributor.isCurrentUser 'current-user'}} {{if contributor.showMetadata 'visible'}}">
|
||||
<td colspan="2">
|
||||
<dl>
|
||||
<dt>Ethereum address</dt>
|
||||
|
||||
Reference in New Issue
Block a user