From 291b5c149350665bdda040d373a51488109bf348 Mon Sep 17 00:00:00 2001 From: Jordan Bibla Date: Fri, 29 Dec 2017 18:11:06 -0500 Subject: [PATCH 1/2] clicking a balance will go to the send page with that denom selected, balance page displays balances and denominations on the network as separate lists --- .../components/wallet/PageBalances.vue | 24 +- .../renderer/components/wallet/PageSend.vue | 3 +- app/src/renderer/routes.js | 2 +- .../__snapshots__/PageBalances.spec.js.snap | 294 ++++++++++++------ 4 files changed, 225 insertions(+), 98 deletions(-) diff --git a/app/src/renderer/components/wallet/PageBalances.vue b/app/src/renderer/components/wallet/PageBalances.vue index d638eff078..2b5eb9895e 100644 --- a/app/src/renderer/components/wallet/PageBalances.vue +++ b/app/src/renderer/components/wallet/PageBalances.vue @@ -14,14 +14,22 @@ page(title='Balance') li-copy(:value="wallet.key.address") part(title="Denomination Balances") - data-empty(v-if="wallet.balances.length === 0") - data-empty-search(v-else-if="filteredBalances.length === 0") - list-item( - v-else - v-for="i in filteredBalances" - :key="i.denom" - :dt="i.denom.toUpperCase()" - :dd="i.amount") + data-empty(v-if="wallet.balances.length === 0") + data-empty-search(v-else-if="filteredBalances.length === 0") + list-item( + v-for="i in filteredBalances" + v-if="wallet.balances.length > 0 && i.amount > 0" + :key="i.denom" + :dt="i.denom.toUpperCase()" + :dd="i.amount" + :to="{name: 'send', params: {denom: i.denom}}") + + part(title="Network Denominations") + list-item( + v-for="i in filteredBalances" + v-if="i.amount === 0" + :key="i.denom" + :dt="i.denom.toUpperCase()")