Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f9dbd47922 | |||
| 636ac30622 | |||
| 791943bb95 | |||
| d9ae654f42 | |||
| 8a156f964b | |||
| 743a4cc3ac |
@@ -0,0 +1,4 @@
|
||||
template: |
|
||||
## Changes
|
||||
|
||||
$CHANGES
|
||||
@@ -7,7 +7,7 @@ export default Component.extend({
|
||||
|
||||
tagName: 'table',
|
||||
classNames: 'contributor-list',
|
||||
selectedContributor: null,
|
||||
selectedContributorId: null,
|
||||
|
||||
actions: {
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<tbody>
|
||||
{{#each contributorList as |c|}}
|
||||
<tr role="button" class={{if (is-current-user c.contributor) "current-user"}} {{action "openContributorDetails" c.contributor}}>
|
||||
<tr role="button"
|
||||
class="{{if (is-current-user c.contributor) "current-user"}} {{if (eq c.contributor.id selectedContributorId) "selected"}}"
|
||||
{{action "openContributorDetails" c.contributor}}>
|
||||
<td class="person">
|
||||
{{user-avatar contributor=c.contributor}} {{c.contributor.name}}
|
||||
</td>
|
||||
|
||||
@@ -7,6 +7,7 @@ export default Controller.extend({
|
||||
kredits: service(),
|
||||
|
||||
showDetailsPane: false,
|
||||
selectedContributorId: null,
|
||||
|
||||
currentBlock: alias('kredits.currentBlock'),
|
||||
|
||||
|
||||
@@ -11,14 +11,22 @@ export default Route.extend({
|
||||
return this.contributors.findBy('id', params.id);
|
||||
},
|
||||
|
||||
activate () {
|
||||
setupController (controller, model) {
|
||||
this._super(controller, model);
|
||||
|
||||
this.controllerFor('dashboard')
|
||||
.set('showDetailsPane', true);
|
||||
.setProperties({
|
||||
showDetailsPane: true,
|
||||
selectedContributorId: model.id
|
||||
});
|
||||
},
|
||||
|
||||
deactivate () {
|
||||
this.controllerFor('dashboard')
|
||||
.set('showDetailsPane', false);
|
||||
.setProperties({
|
||||
showDetailsPane: false,
|
||||
selectedContributorId: null
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import ethers from 'npm:ethers';
|
||||
import Kredits from 'npm:kredits-contracts';
|
||||
import ethers from 'ethers';
|
||||
import Kredits from 'kredits-contracts';
|
||||
import RSVP from 'rsvp';
|
||||
|
||||
import Service from '@ember/service';
|
||||
|
||||
@@ -4,56 +4,20 @@ table.contributor-list {
|
||||
margin-bottom: 1.5rem;
|
||||
|
||||
tr {
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
border-bottom: 1px solid rgba(255,255,255,0.2);
|
||||
cursor: pointer;
|
||||
|
||||
&:first-of-type {
|
||||
border-top: 1px solid rgba(255,255,255,0.2);
|
||||
}
|
||||
background-color: rgba(255,255,255,0.1);
|
||||
|
||||
&.current-user {
|
||||
&.selected {
|
||||
background-color: rgba(255,255,255,0.2);
|
||||
}
|
||||
|
||||
&.metadata {
|
||||
height: 0;
|
||||
visibility: hidden;
|
||||
|
||||
&:not(.visible) {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
td {
|
||||
padding: 0 1.2rem;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $primary-color;
|
||||
&:hover, &:active {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
height: 0;
|
||||
|
||||
li {
|
||||
display: inline;
|
||||
&+li {
|
||||
margin-left: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.visible {
|
||||
height: auto;
|
||||
visibility: visible;
|
||||
ul {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
&.current-user {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
td {
|
||||
@@ -71,20 +35,17 @@ table.contributor-list {
|
||||
|
||||
&.kredits {
|
||||
text-align: right;
|
||||
|
||||
.amount {
|
||||
font-size: 1.2rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.symbol {
|
||||
font-size: 0.8rem;
|
||||
padding-left: 0.2rem;
|
||||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
line-height: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
</header>
|
||||
<div class="content">
|
||||
{{contributor-list contributorList=kreditsToplist
|
||||
showUnconfirmedKredits=showUnconfirmedKredits}}
|
||||
showUnconfirmedKredits=showUnconfirmedKredits
|
||||
selectedContributorId=selectedContributorId}}
|
||||
|
||||
<p class="stats">
|
||||
<span class="number">{{await kredits.totalKreditsEarned}}</span> kredits confirmed and issued to
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { computed } from '@ember/object';
|
||||
import ethers from 'npm:ethers';
|
||||
import ethers from 'ethers';
|
||||
|
||||
export default function(dependentKey, converterMethod) {
|
||||
return computed(dependentKey, {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { computed } from '@ember/object';
|
||||
import ethers from 'npm:ethers';
|
||||
import ethers from 'ethers';
|
||||
import formatKredits from 'kredits-web/utils/format-kredits';
|
||||
|
||||
export default function(dependentKey, options = {}) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import ethers from 'npm:ethers';
|
||||
import ethers from 'ethers';
|
||||
|
||||
export default function(value, options = {}) {
|
||||
let etherValue = ethers.utils.formatEther(value);
|
||||
|
||||
@@ -12,6 +12,23 @@ module.exports = function(defaults) {
|
||||
sourcemaps: {
|
||||
enabled: true,
|
||||
extensions: ['js']
|
||||
},
|
||||
autoImport: {
|
||||
webpack: {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
// inline json files instead of using fs.readFileSync
|
||||
enforce: 'post',
|
||||
test: /kosmos-schemas\/index\.js$/,
|
||||
loader: 'transform-loader?brfs'
|
||||
}
|
||||
]
|
||||
},
|
||||
node: {
|
||||
path: "empty" // needed for kosmos-schemas dependency
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Generated
+1912
-707
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -28,10 +28,11 @@
|
||||
"@ember/optional-features": "^0.6.3",
|
||||
"babel-preset-es2015": "^6.22.0",
|
||||
"babelify": "^7.3.0",
|
||||
"brfs": "^2.0.2",
|
||||
"broccoli-asset-rev": "^2.7.0",
|
||||
"ember-ajax": "^4.0.1",
|
||||
"ember-auto-import": "^1.5.2",
|
||||
"ember-awesome-macros": "0.41.0",
|
||||
"ember-browserify": "^1.1.13",
|
||||
"ember-cli": "~3.8.1",
|
||||
"ember-cli-app-version": "^3.2.0",
|
||||
"ember-cli-babel": "^7.1.2",
|
||||
@@ -61,7 +62,9 @@
|
||||
"kosmos-schemas": "^2.0.0",
|
||||
"kredits-contracts": "^5.4.0",
|
||||
"loader.js": "^4.7.0",
|
||||
"ndjson": "^1.5.0",
|
||||
"qunit-dom": "^0.8.0",
|
||||
"transform-loader": "^0.2.4",
|
||||
"tv4": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
|
||||
Reference in New Issue
Block a user