Add metadata row to contributor list
Contains links to Ethereum address and IPFS content.
This commit is contained in:
@@ -10,5 +10,17 @@
|
||||
<span class="symbol">₭S</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="metadata visible {{if contributor.isCurrentUser 'current-user'}}">
|
||||
<td colspan="2">
|
||||
<dl>
|
||||
<dt>Ethereum address</dt>
|
||||
<dd><a href="https://testnet.etherscan.io/address/{{contributor.address}}">{{contributor.address}}</a></dd>
|
||||
{{#if contributor.ipfsHash}}
|
||||
<dt>IPFS profile data</dt>
|
||||
<dd><a href="https://ipfs.io/ipfs/{{contributor.ipfsHash}}">{{contributor.ipfsHash}}</a></dd>
|
||||
{{/if}}
|
||||
</dl>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
|
||||
@@ -65,11 +65,12 @@ export default Ember.Service.extend({
|
||||
this.getValueFromContract('contributorAddresses', i).then(address => {
|
||||
this.getValueFromContract('contributors', address).then(person => {
|
||||
this.getValueFromContract('balanceOf', address).then(balance => {
|
||||
console.debug('person', person);
|
||||
let contributor = Contributor.create({
|
||||
address: address,
|
||||
github_username: person[1],
|
||||
github_uid: person[0],
|
||||
ipfsHash: person[3],
|
||||
ipfsHash: person[2],
|
||||
kredits: balance.toNumber(),
|
||||
isCurrentUser: this.get('currentUserAccounts').includes(address)
|
||||
});
|
||||
|
||||
@@ -7,12 +7,68 @@ table.contributor-list {
|
||||
&:first-of-type {
|
||||
border-top: 1px solid rgba(255,255,255,0.2);
|
||||
}
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
|
||||
&.current-user {
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
&.metadata {
|
||||
height: 0;
|
||||
|
||||
td {
|
||||
padding: 0 1.2rem;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
|
||||
a {
|
||||
color: lightblue;
|
||||
&:hover, &:active {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
dl {
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: 1rem;
|
||||
dt, dd {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
height: 0;
|
||||
line-height: 1.6rem;
|
||||
transition: all 0.2s ease-out;
|
||||
}
|
||||
dt {
|
||||
clear: both;
|
||||
float: left;
|
||||
width: 30%;
|
||||
}
|
||||
dd {
|
||||
float: right;
|
||||
width: 70%;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
|
||||
&.visible {
|
||||
td {
|
||||
padding: 1rem 1.2rem;
|
||||
}
|
||||
|
||||
dl {
|
||||
dt, dd {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0 1.2rem;
|
||||
line-height: 4.2rem;
|
||||
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
&.person {
|
||||
text-align: left;
|
||||
font-size: 1.4rem;
|
||||
@@ -36,11 +92,5 @@ table.contributor-list {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.current-user {
|
||||
td {
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user