diff --git a/app/components/contribution-list/template.hbs b/app/components/contribution-list/template.hbs
index aecc670..be603d0 100644
--- a/app/components/contribution-list/template.hbs
+++ b/app/components/contribution-list/template.hbs
@@ -33,7 +33,7 @@
{{#each this.contributionsFiltered as |contribution|}}
+ class="{{item-status contribution}}{{if (eq contribution.id @selectedContributionId) " selected"}}">
({{contribution.kind}})
diff --git a/app/components/reimbursement-list/template.hbs b/app/components/reimbursement-list/template.hbs
index 4c3fe9e..76ecb03 100644
--- a/app/components/reimbursement-list/template.hbs
+++ b/app/components/reimbursement-list/template.hbs
@@ -1,14 +1,24 @@
-
+
\ No newline at end of file
diff --git a/app/helpers/contribution-status.js b/app/helpers/contribution-status.js
deleted file mode 100644
index 959aa72..0000000
--- a/app/helpers/contribution-status.js
+++ /dev/null
@@ -1,56 +0,0 @@
-import Helper from '@ember/component/helper';
-import { inject as service } from '@ember/service';
-import { alias } from '@ember/object/computed';
-import { once } from '@ember/runloop';
-
-export default Helper.extend({
-
- kredits: service(),
- currentBlock: alias('kredits.currentBlock'),
-
- compute([contribution]) {
- this.setupRecompute(contribution);
-
- let status = [];
-
- if (contribution.vetoed) {
- status.push('vetoed');
- } else if (contribution.confirmedAt > this.currentBlock) {
- status.push('unconfirmed');
- } else {
- status.push('confirmed');
- }
-
- if (contribution.hasPendingChanges) {
- status.push('pending');
- }
-
- return status.join(' ');
- },
-
- destroy () {
- if (this.teardown) this.teardown();
- this._super(...arguments);
- },
-
- setupRecompute (contribution) {
- if (this.teardown) this.teardown();
-
- contribution.addObserver('vetoed' , this, this.triggerRecompute);
- contribution.addObserver('confirmedAt' , this, this.triggerRecompute);
- contribution.addObserver('currentBlock' , this, this.triggerRecompute);
- contribution.addObserver('hasPendingChanges' , this, this.triggerRecompute);
-
- this.teardown = () => {
- contribution.removeObserver('vetoed', this, this.triggerRecompute);
- contribution.removeObserver('confirmedAt', this, this.triggerRecompute);
- contribution.removeObserver('currentBlock', this, this.triggerRecompute);
- contribution.removeObserver('hasPendingChanges', this, this.triggerRecompute);
- };
- },
-
- triggerRecompute () {
- once(this, this.recompute);
- }
-
-});
diff --git a/app/helpers/item-status.js b/app/helpers/item-status.js
new file mode 100644
index 0000000..e86ee3f
--- /dev/null
+++ b/app/helpers/item-status.js
@@ -0,0 +1,56 @@
+import Helper from '@ember/component/helper';
+import { inject as service } from '@ember/service';
+import { alias } from '@ember/object/computed';
+import { once } from '@ember/runloop';
+
+export default Helper.extend({
+
+ kredits: service(),
+ currentBlock: alias('kredits.currentBlock'),
+
+ compute([item]) {
+ this.setupRecompute(item);
+
+ let status = [];
+
+ if (item.vetoed) {
+ status.push('vetoed');
+ } else if (item.confirmedAt > this.currentBlock) {
+ status.push('unconfirmed');
+ } else {
+ status.push('confirmed');
+ }
+
+ if (item.hasPendingChanges) {
+ status.push('pending');
+ }
+
+ return status.join(' ');
+ },
+
+ destroy () {
+ if (this.teardown) this.teardown();
+ this._super(...arguments);
+ },
+
+ setupRecompute (item) {
+ if (this.teardown) this.teardown();
+
+ item.addObserver('vetoed' , this, this.triggerRecompute);
+ item.addObserver('confirmedAt' , this, this.triggerRecompute);
+ item.addObserver('currentBlock' , this, this.triggerRecompute);
+ item.addObserver('hasPendingChanges' , this, this.triggerRecompute);
+
+ this.teardown = () => {
+ item.removeObserver('vetoed', this, this.triggerRecompute);
+ item.removeObserver('confirmedAt', this, this.triggerRecompute);
+ item.removeObserver('currentBlock', this, this.triggerRecompute);
+ item.removeObserver('hasPendingChanges', this, this.triggerRecompute);
+ };
+ },
+
+ triggerRecompute () {
+ once(this, this.recompute);
+ }
+
+});
diff --git a/app/helpers/sats-to-btc.js b/app/helpers/sats-to-btc.js
index eccfed7..319004e 100644
--- a/app/helpers/sats-to-btc.js
+++ b/app/helpers/sats-to-btc.js
@@ -1,5 +1,5 @@
import { helper } from '@ember/component/helper';
-export default helper(function satsToBtc(params/*, hash*/) {
- return params;
+export default helper(function satsToBtc(amount/*, hash*/) {
+ return amount / 100000000;
});
diff --git a/app/styles/_item-list.scss b/app/styles/_item-list.scss
index a3877f2..1bfcf0b 100644
--- a/app/styles/_item-list.scss
+++ b/app/styles/_item-list.scss
@@ -2,9 +2,10 @@ ul.item-list {
list-style: none;
li {
+ padding: 0.8rem 1.2rem;
+ font-size: 1.2rem;
background-color: $item-background-color;
border-bottom: 1px solid $item-border-color;
- font-size: 1.2rem;
&:first-of-type {
border-top: 1px solid $item-border-color;
diff --git a/app/styles/app.scss b/app/styles/app.scss
index 5af3d7a..858471c 100644
--- a/app/styles/app.scss
+++ b/app/styles/app.scss
@@ -91,12 +91,13 @@ section {
@import "sugar";
@import "item-list";
-@import "components/contribution-list";
@import "components/contribution-details";
+@import "components/contribution-list";
@import "components/contributor-list";
@import "components/contributor-profile";
@import "components/external-account-link";
@import "components/loading-spinner";
+@import "components/reimbursement-list";
@import "components/topbar";
@import "components/topbar-account-panel";
@import "components/user-avatar";
diff --git a/app/styles/components/_contribution-list.scss b/app/styles/components/_contribution-list.scss
index ab51c4d..2c6034d 100644
--- a/app/styles/components/_contribution-list.scss
+++ b/app/styles/components/_contribution-list.scss
@@ -24,13 +24,11 @@ main section {
ul.contribution-list {
clear: both;
width: 100%;
- list-style: none;
li {
display: grid;
grid-template-columns: auto 5rem 5rem;
grid-row-gap: 0.5rem;
- padding: 0.8rem 1.2rem;
cursor: pointer;
&.confirmed {
diff --git a/app/styles/components/_reimbursement-list.scss b/app/styles/components/_reimbursement-list.scss
new file mode 100644
index 0000000..e7b0167
--- /dev/null
+++ b/app/styles/components/_reimbursement-list.scss
@@ -0,0 +1,52 @@
+ul.reimbursement-list {
+ width: 100%;
+
+ li {
+ display: grid;
+ grid-template-columns: auto auto;
+ grid-row-gap: 0.5rem;
+ padding-top: 1.6rem;
+
+ .token-amount {
+ text-align: right;
+
+ img {
+ height: 1em;
+ vertical-align: middle;
+ margin-top: -2px;
+ }
+
+ .amount {
+ font-weight: 500;
+ }
+
+ .symbol {
+ font-size: 0.8rem;
+ padding-left: 0.2rem;
+ }
+ }
+
+ table {
+ grid-column-start: span 2;
+ width: 100%;
+ margin-top: 0.8rem;
+ border-collapse: collapse;
+
+ tr {
+ border-top: 1px solid $item-border-color;
+ }
+
+ td {
+ padding: 0.8rem 0;
+
+ &.amount {
+ text-align: right;
+ }
+ }
+
+ @include media-max(small) {
+ td.date { display: none; }
+ }
+ }
+ }
+}
diff --git a/app/templates/dashboard/contributions/show.hbs b/app/templates/dashboard/contributions/show.hbs
index a447c1e..52d6b3d 100644
--- a/app/templates/dashboard/contributions/show.hbs
+++ b/app/templates/dashboard/contributions/show.hbs
@@ -19,7 +19,7 @@
{{this.model.description}}
Kind: {{this.model.kind}}
-
Status: {{contribution-status this.model}}
+
Status: {{item-status this.model}}
{{#if this.model.url}}
diff --git a/public/img/bitcoin.svg b/public/img/bitcoin.svg
new file mode 100644
index 0000000..b3fd9e3
--- /dev/null
+++ b/public/img/bitcoin.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/tests/unit/helpers/contribution-status-test.js b/tests/unit/helpers/item-status-test.js
similarity index 84%
rename from tests/unit/helpers/contribution-status-test.js
rename to tests/unit/helpers/item-status-test.js
index f0b9f91..0496f27 100644
--- a/tests/unit/helpers/contribution-status-test.js
+++ b/tests/unit/helpers/item-status-test.js
@@ -2,11 +2,11 @@ import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
import Contribution from 'kredits-web/models/contribution';
-module('Unit | Helper | contribution-status', function (hooks) {
+module('Unit | Helper | item-status', function (hooks) {
setupTest(hooks);
test('returns the appropriate status', function (assert) {
- const contributionStatus = this.owner.factoryFor('helper:contribution-status').create();
+ const contributionStatus = this.owner.factoryFor('helper:item-status').create();
const kredits = this.owner.lookup('service:kredits');
kredits.set('currentBlock', 23000);