From 2dc18cef4a4b285e8d020573199744c55b37846b Mon Sep 17 00:00:00 2001
From: Jordan Bibla
Date: Tue, 18 Dec 2018 19:31:45 -0500
Subject: [PATCH 001/306] consistent toolbar styling
---
app/src/renderer/components/common/ToolBar.vue | 17 ++++++++++++-----
.../renderer/components/wallet/PageWallet.vue | 11 +++++------
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/app/src/renderer/components/common/ToolBar.vue b/app/src/renderer/components/common/ToolBar.vue
index aa4af2a2f4..3cce9f1037 100644
--- a/app/src/renderer/components/common/ToolBar.vue
+++ b/app/src/renderer/components/common/ToolBar.vue
@@ -1,5 +1,5 @@
-
-
Title: {{ proposalTitle }}
- Proposal ID: {{ `#` + proposalId }}
+ {{ proposalTitle }} ({{ `#` + proposalId }})
-
-
- Show password
@@ -147,9 +137,6 @@ export default {
close() {
this.$emit(`update:showModalVote`, false)
},
- togglePassword() {
- this.showPassword = !this.showPassword
- },
vote(option) {
if (this.option === option) {
this.option = ``
@@ -180,14 +167,18 @@ export default {
z-index: var(--z-modal);
}
+.modal-vote h2 {
+ font-weight: 500;
+}
+
.modal-vote-header {
align-items: center;
display: flex;
}
.modal-vote-atom {
- height: 4rem;
- width: 4rem;
+ height: 3rem;
+ width: 3rem;
}
.modal-vote-form-group {
@@ -206,7 +197,7 @@ export default {
.modal-vote button {
margin: 0;
- min-width: 49%;
+ /* min-width: 24%; */
}
.modal-vote button span {
diff --git a/app/src/renderer/components/governance/PageProposal.vue b/app/src/renderer/components/governance/PageProposal.vue
index 581c868695..52c18b3af8 100644
--- a/app/src/renderer/components/governance/PageProposal.vue
+++ b/app/src/renderer/components/governance/PageProposal.vue
@@ -60,8 +60,8 @@
Submitted {{ submittedAgo }}.
{{
proposal.proposal_status === `DepositPeriod`
- ? `Deposit ends ` + depositEndsIn
- : `Voting started ` + votingStartedAgo
+ ? `Deposit ends ${depositEndsIn}.`
+ : `Voting started ${votingStartedAgo}.`
}}
diff --git a/app/src/renderer/components/staking/DelegationModal.vue b/app/src/renderer/components/staking/DelegationModal.vue
index 40ce79ef69..826710ddbe 100644
--- a/app/src/renderer/components/staking/DelegationModal.vue
+++ b/app/src/renderer/components/staking/DelegationModal.vue
@@ -42,7 +42,7 @@
field-id="to"
field-label="To"
>
-
+
-
-
- Show password
@@ -169,29 +160,30 @@ export default {
background: var(--app-nav);
display: flex;
flex-direction: column;
- height: 50%;
justify-content: space-between;
- left: 50%;
- padding: 2rem;
+ right: 2rem;
+ padding: 3rem;
position: fixed;
- top: 50%;
- width: 40%;
+ bottom: 0;
+ width: 100%;
+ max-width: 600px;
z-index: var(--z-modal);
}
.delegation-modal-header {
align-items: center;
display: flex;
+ padding-bottom: 2rem;
}
.delegation-modal-atom {
- height: 4rem;
- width: 4rem;
+ height: 3rem;
+ width: 3rem;
}
.delegation-modal-form-group {
display: block;
- padding: 0;
+ padding: 0.5rem 0;
}
.delegation-modal #amount {
@@ -208,6 +200,7 @@ export default {
.delegation-modal-footer {
display: flex;
justify-content: flex-end;
+ padding: 2rem 0 0;
}
.delegation-modal-footer button {
diff --git a/app/src/renderer/components/staking/PageValidator.vue b/app/src/renderer/components/staking/PageValidator.vue
index f2e2cae059..25bd86131a 100644
--- a/app/src/renderer/components/staking/PageValidator.vue
+++ b/app/src/renderer/components/staking/PageValidator.vue
@@ -428,7 +428,7 @@ export default {
{
address: this.wallet.address,
maximum: Math.floor(this.totalAtoms - this.oldBondedAtoms),
- key: `My Wallet - ${shortAddress(this.wallet.address, 20)}`,
+ key: `My Wallet - ${this.wallet.address}`,
value: 0
}
]
diff --git a/app/src/renderer/components/staking/UndelegationModal.vue b/app/src/renderer/components/staking/UndelegationModal.vue
index 2454855e57..edcd2587a8 100644
--- a/app/src/renderer/components/staking/UndelegationModal.vue
+++ b/app/src/renderer/components/staking/UndelegationModal.vue
@@ -46,26 +46,18 @@
field-label="To"
>
-
-
- Show password
+
+
+
@@ -53,6 +61,7 @@ import { includes, orderBy } from "lodash"
import Mousetrap from "mousetrap"
import DataEmptySearch from "common/TmDataEmptySearch"
import TmDataConnecting from "common/TmDataConnecting"
+import PageSend from "wallet/PageSend"
import LiCopy from "common/TmLiCopy"
import LiCoin from "./LiCoin"
import TmListItem from "common/TmListItem"
@@ -77,9 +86,10 @@ export default {
ModalSearch,
TmPage,
TmPart,
- ToolBar
+ ToolBar,
+ PageSend
},
- data: () => ({ num }),
+ data: () => ({ num, showSendModal: false, denomination: null }),
computed: {
...mapGetters([
`filters`,
@@ -131,6 +141,13 @@ export default {
setSearch(bool = !this.filters[`balances`].search.visible) {
if (!this.somethingToSearch) return false
this.$store.commit(`setSearchVisible`, [`balances`, bool])
+ },
+ updateBalances() {
+ this.queryWalletState()
+ },
+ showModal(denomination) {
+ this.showSendModal = true
+ this.denomination = denomination.toLowerCase()
}
}
}
From 4ae546ae4344c195232a06a99a34ed73f8588e22 Mon Sep 17 00:00:00 2001
From: Jordan Bibla
Date: Fri, 21 Dec 2018 13:56:30 -0500
Subject: [PATCH 010/306] fixed up all the action modals and cleaned up form
styles
---
.../components/common/ActionModal.vue | 8 +-
.../components/governance/ModalDeposit.vue | 100 ++-------
.../components/governance/ModalPropose.vue | 97 ++-------
.../components/governance/ModalVote.vue | 192 +++++++-----------
.../components/staking/DelegationModal.vue | 130 ++++--------
.../components/staking/PageValidator.vue | 3 +-
.../components/staking/UndelegationModal.vue | 121 ++++-------
app/src/renderer/styles/app.css | 25 ++-
8 files changed, 200 insertions(+), 476 deletions(-)
diff --git a/app/src/renderer/components/common/ActionModal.vue b/app/src/renderer/components/common/ActionModal.vue
index b290ff7e83..5a1262ca23 100644
--- a/app/src/renderer/components/common/ActionModal.vue
+++ b/app/src/renderer/components/common/ActionModal.vue
@@ -59,11 +59,11 @@ export default {
position: fixed;
bottom: 0;
width: 100%;
- max-width: 600px;
+ max-width: 664px;
z-index: var(--z-modal);
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
- box-shadow: 0 8px 16px rgba(200, 200, 200, 0.15);
+ box-shadow: 0 8px 16px rgba(200, 200, 200, 0.1);
}
.action-modal-header {
@@ -114,10 +114,6 @@ export default {
padding: 2rem 0 0;
}
-.action-modal-form .tm-form-group button {
- margin-left: 1rem;
-}
-
/* Enter and leave animations can use different */
/* durations and timing functions. */
.slide-fade-enter-active {
diff --git a/app/src/renderer/components/governance/ModalDeposit.vue b/app/src/renderer/components/governance/ModalDeposit.vue
index 017cd64fe5..f3a694bf6d 100644
--- a/app/src/renderer/components/governance/ModalDeposit.vue
+++ b/app/src/renderer/components/governance/ModalDeposit.vue
@@ -1,30 +1,12 @@
-
-
-
-
Title: {{ proposalTitle }}
- Proposal ID: {{ `#` + proposalId }}
-
+
-
+ {{ bondingDenom }}
-
-
- Show password
-
+
-
-
diff --git a/app/src/renderer/components/governance/ModalPropose.vue b/app/src/renderer/components/governance/ModalPropose.vue
index 572796d395..57923d7782 100644
--- a/app/src/renderer/components/governance/ModalPropose.vue
+++ b/app/src/renderer/components/governance/ModalPropose.vue
@@ -1,17 +1,8 @@
-
-
+
@@ -31,7 +22,7 @@
@@ -39,6 +30,7 @@
id="description"
v-model.trim="description"
type="textarea"
+ class="textarea-large"
placeholder="Write your proposal here..."
/>
-
+ {{ bondingDenom }}
-
+
-
diff --git a/app/src/renderer/components/governance/ModalVote.vue b/app/src/renderer/components/governance/ModalVote.vue
index 07f5dbd549..4ebc9feebe 100644
--- a/app/src/renderer/components/governance/ModalVote.vue
+++ b/app/src/renderer/components/governance/ModalVote.vue
@@ -1,59 +1,55 @@
-
+
`;
exports[`PageSend should show bech32 error when address length is too long 1`] = `
-
+
+
-
+
-
-
-
-`;
-
-exports[`PageSend should show bech32 error when address length is too short 1`] = `
-
+
+
`;
-exports[`PageSend should show bech32 error when alphanumeric is wrong 1`] = `
+exports[`PageSend should show bech32 error when address length is too short 1`] = `
-
+
+
-
-
-
-
+
-
+
+
+
+
+
+
+
+
`;
-exports[`PageSend should trigger confirmation modal if form is correct 1`] = `
+exports[`PageSend should show bech32 error when alphanumeric is wrong 1`] = `
-
+
+
-
-
-
-
+
+
+
+
+
+
+
+ Password
+
+
-
+
-
+
+
+
+
+
+
-
+
`;
exports[`PageSend should work without providing a default denom 1`] = `
-
+
+
-
-
-
-
+
-
-
+
+
+
`;
diff --git a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap
index 70849ab2aa..8e658c6803 100644
--- a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap
+++ b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap
@@ -96,7 +96,7 @@ exports[`PageTransactions has the expected html structure 1`] = `
-
-
+
-
- chevron_right
-
-
- Send
-
+ Send
-
-
+
+
-
-
+
-
- chevron_right
-
-
- Send
-
+ Send
-
-
+
+
-
-
+
-
- chevron_right
-
-
- Send
-
+ Send
-
-
+
+
+
+
`;
@@ -453,7 +429,7 @@ exports[`PageWallet should filter the balances 1`] = `
-
-
+
-
- chevron_right
-
-
- Send
-
+ Send
-
-
+
+
+
+
`;
From 704ad93d51439a9a653d0f65875044ff344a27ea Mon Sep 17 00:00:00 2001
From: Jordan Bibla
Date: Thu, 3 Jan 2019 12:27:10 -0500
Subject: [PATCH 012/306] update notification styling, fixed undelegation max
bug
---
app/src/renderer/components/common/TmNotification.vue | 4 +++-
app/src/renderer/components/staking/PageValidator.vue | 2 +-
app/src/renderer/components/staking/UndelegationModal.vue | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/src/renderer/components/common/TmNotification.vue b/app/src/renderer/components/common/TmNotification.vue
index a03ff08086..17f3a0829b 100644
--- a/app/src/renderer/components/common/TmNotification.vue
+++ b/app/src/renderer/components/common/TmNotification.vue
@@ -86,12 +86,13 @@ export default {
diff --git a/app/src/renderer/styles/table.css b/app/src/renderer/styles/table.css
index ea255fd9f3..7e058e4b8d 100644
--- a/app/src/renderer/styles/table.css
+++ b/app/src/renderer/styles/table.css
@@ -14,31 +14,24 @@
content: counter(rowNumber);
position: absolute;
font-size: sm;
- width: 2rem;
text-align: right;
color: var(--dim);
left: -3rem;
}
.data-table th {
- /* min-width: 130px; */
- width: 100%;
- padding: 0.5rem;
-}
-
-.data-table th {
- min-width: 122px;
width: 100%;
padding: 0.5rem;
text-align: left;
}
+
.data-table td {
- min-width: 122px;
width: 100%;
padding: 0.5rem;
position: relative;
vertical-align: bottom;
}
+
.data-table td:not(:first-child) {
padding-bottom: 1rem;
}
@@ -60,15 +53,17 @@
border-radius: 0.25rem;
border: 1px solid var(--bc-dim);
}
+
.data-table__row:hover {
background: var(--hover-bg);
}
+
.data-table__row__info {
display: flex;
align-items: center;
width: 100%;
- min-width: 284px;
}
+
.data-table__row__info__container__status {
left: 0;
top: 9px;
@@ -79,6 +74,7 @@
position: absolute;
width: 0.5rem;
}
+
.data-table__row__info__container__status.red {
background: var(--danger);
}
@@ -90,9 +86,11 @@
.data-table__row__info__container__status.green {
background: var(--success);
}
+
.data-table__row__info__container {
position: relative;
}
+
.data-table__row__info__container__name {
padding-left: 1rem;
max-width: 200px;
@@ -100,6 +98,7 @@
white-space: nowrap;
text-overflow: ellipsis;
}
+
.data-table__row__info__image {
height: 3rem;
width: 3rem;
@@ -108,9 +107,11 @@
display: block;
background: var(--app-nav);
}
+
.data-table__row__info__image--no-img {
padding: 0.5rem;
}
+
.data-table__row__info__container__description {
font-size: var(--sm);
padding-left: 1rem;
From 159ef6fd20599f8a0b54e174b45923d068c86e89 Mon Sep 17 00:00:00 2001
From: Jordan Bibla
Date: Mon, 7 Jan 2019 11:04:48 -0500
Subject: [PATCH 017/306] fix shadow
---
app/src/renderer/components/common/ActionModal.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/renderer/components/common/ActionModal.vue b/app/src/renderer/components/common/ActionModal.vue
index 80deebbaf3..1086472ccb 100644
--- a/app/src/renderer/components/common/ActionModal.vue
+++ b/app/src/renderer/components/common/ActionModal.vue
@@ -59,7 +59,7 @@ export default {
z-index: var(--z-modal);
border-top-left-radius: 0.25rem;
border-top-right-radius: 0.25rem;
- box-shadow: 0 8px 16px rgba(200, 200, 200, 0.1);
+ box-shadow: 0 2px 8px rgba(200, 200, 200, 0.1);
}
.action-modal-header {
From deb0275cf32ac1a4ca0e9b62ff3a565e04d2b622 Mon Sep 17 00:00:00 2001
From: Jordan Bibla
Date: Mon, 7 Jan 2019 11:46:35 -0500
Subject: [PATCH 018/306] action modal events working as expected!!!
---
app/src/renderer/components/common/ActionModal.vue | 2 +-
app/src/renderer/components/governance/ModalDeposit.vue | 2 +-
app/src/renderer/components/governance/ModalPropose.vue | 2 +-
app/src/renderer/components/governance/ModalVote.vue | 2 +-
app/src/renderer/components/staking/DelegationModal.vue | 2 +-
app/src/renderer/components/staking/UndelegationModal.vue | 2 +-
app/src/renderer/components/wallet/LiCoin.vue | 5 +----
app/src/renderer/components/wallet/PageWallet.vue | 4 ++--
app/src/renderer/components/wallet/SendModal.vue | 2 +-
9 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/app/src/renderer/components/common/ActionModal.vue b/app/src/renderer/components/common/ActionModal.vue
index 1086472ccb..e5599a633e 100644
--- a/app/src/renderer/components/common/ActionModal.vue
+++ b/app/src/renderer/components/common/ActionModal.vue
@@ -9,7 +9,7 @@
close
diff --git a/app/src/renderer/components/governance/ModalDeposit.vue b/app/src/renderer/components/governance/ModalDeposit.vue
index 67cd29a16b..cd84cbc79c 100644
--- a/app/src/renderer/components/governance/ModalDeposit.vue
+++ b/app/src/renderer/components/governance/ModalDeposit.vue
@@ -2,7 +2,7 @@
-
+
-
+
@@ -147,7 +147,7 @@ export default {
},
showModal(denomination) {
this.showSendModal = true
- this.denomination = denomination.toLowerCase()
+ this.denomination = denomination
}
}
}
diff --git a/app/src/renderer/components/wallet/SendModal.vue b/app/src/renderer/components/wallet/SendModal.vue
index 2d3435c698..34dcbdc06a 100644
--- a/app/src/renderer/components/wallet/SendModal.vue
+++ b/app/src/renderer/components/wallet/SendModal.vue
@@ -1,5 +1,5 @@
-
+
Date: Mon, 7 Jan 2019 12:05:02 -0500
Subject: [PATCH 019/306] added v-focus, cleaned up button copy
---
app/src/renderer/components/governance/ModalDeposit.vue | 2 +-
app/src/renderer/components/governance/ModalPropose.vue | 2 +-
app/src/renderer/components/governance/ModalVote.vue | 2 +-
app/src/renderer/components/staking/DelegationModal.vue | 2 +-
app/src/renderer/components/staking/UndelegationModal.vue | 2 +-
app/src/renderer/components/wallet/SendModal.vue | 1 +
6 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/app/src/renderer/components/governance/ModalDeposit.vue b/app/src/renderer/components/governance/ModalDeposit.vue
index cd84cbc79c..5a99991586 100644
--- a/app/src/renderer/components/governance/ModalDeposit.vue
+++ b/app/src/renderer/components/governance/ModalDeposit.vue
@@ -44,7 +44,7 @@
id="submit-deposit"
:disabled="$v.$invalid"
color="primary"
- value="Deposit"
+ value="Submit Deposit"
@click.native="onDeposit"
/>
diff --git a/app/src/renderer/components/governance/ModalPropose.vue b/app/src/renderer/components/governance/ModalPropose.vue
index 5c67ae5a5a..2f5155bc89 100644
--- a/app/src/renderer/components/governance/ModalPropose.vue
+++ b/app/src/renderer/components/governance/ModalPropose.vue
@@ -79,7 +79,7 @@
id="submit-proposal"
:disabled="$v.$invalid"
color="primary"
- value="Submit"
+ value="Submit Proposal"
@click.native="onPropose"
/>
diff --git a/app/src/renderer/components/governance/ModalVote.vue b/app/src/renderer/components/governance/ModalVote.vue
index 61afed80e8..2694ff4b09 100644
--- a/app/src/renderer/components/governance/ModalVote.vue
+++ b/app/src/renderer/components/governance/ModalVote.vue
@@ -64,7 +64,7 @@
id="cast-vote"
:disabled="$v.$invalid"
color="primary"
- value="Vote"
+ value="Submit Vote"
@click.native="onVote"
/>
diff --git a/app/src/renderer/components/staking/DelegationModal.vue b/app/src/renderer/components/staking/DelegationModal.vue
index 3eaf3bd221..ddcfad1352 100644
--- a/app/src/renderer/components/staking/DelegationModal.vue
+++ b/app/src/renderer/components/staking/DelegationModal.vue
@@ -68,7 +68,7 @@
id="submit-delegation"
:disabled="$v.$invalid"
color="primary"
- value="Submit"
+ value="Submit Delegation"
@click.native="onDelegation"
/>
diff --git a/app/src/renderer/components/staking/UndelegationModal.vue b/app/src/renderer/components/staking/UndelegationModal.vue
index 6df967fd4c..ed0e3c4084 100644
--- a/app/src/renderer/components/staking/UndelegationModal.vue
+++ b/app/src/renderer/components/staking/UndelegationModal.vue
@@ -67,7 +67,7 @@
id="submit-undelegation"
:disabled="$v.$invalid"
color="primary"
- value="Undelegate"
+ value="Submit Undelegation"
@click.native="onUndelegate"
/>
diff --git a/app/src/renderer/components/wallet/SendModal.vue b/app/src/renderer/components/wallet/SendModal.vue
index 34dcbdc06a..2a313db682 100644
--- a/app/src/renderer/components/wallet/SendModal.vue
+++ b/app/src/renderer/components/wallet/SendModal.vue
@@ -27,6 +27,7 @@
Date: Mon, 7 Jan 2019 12:07:25 -0500
Subject: [PATCH 020/306] fixed page proposal toolbar
---
app/src/renderer/components/governance/PageProposal.vue | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/app/src/renderer/components/governance/PageProposal.vue b/app/src/renderer/components/governance/PageProposal.vue
index 52c18b3af8..08bba9d7ba 100644
--- a/app/src/renderer/components/governance/PageProposal.vue
+++ b/app/src/renderer/components/governance/PageProposal.vue
@@ -2,14 +2,8 @@
+
-
-
- arrow_back
-
-
From 82a1fd73c64b0a496e074fa7bced1103c468e087 Mon Sep 17 00:00:00 2001
From: Karoly Albert Szabo
Date: Tue, 8 Jan 2019 17:06:38 +0100
Subject: [PATCH 026/306] refactor page and page header components
Signed-off-by: Karoly Albert Szabo
---
app/src/renderer/components/common/Tabs.vue | 56 ++++++++++
app/src/renderer/components/common/TmPage.vue | 104 ++++++++++++++++--
.../components/common/TmPageHeader.vue | 33 ++++--
.../renderer/components/common/ToolBar.vue | 47 +++++++-
.../components/governance/PageGovernance.vue | 44 +++-----
.../components/staking/PageStaking.vue | 46 ++------
.../renderer/components/wallet/PageSend.vue | 6 +-
.../components/wallet/PageTransactions.vue | 71 +++---------
.../renderer/components/wallet/PageWallet.vue | 89 ++++-----------
9 files changed, 281 insertions(+), 215 deletions(-)
create mode 100644 app/src/renderer/components/common/Tabs.vue
diff --git a/app/src/renderer/components/common/Tabs.vue b/app/src/renderer/components/common/Tabs.vue
new file mode 100644
index 0000000000..929f39e457
--- /dev/null
+++ b/app/src/renderer/components/common/Tabs.vue
@@ -0,0 +1,56 @@
+
+
+
+
+ {{ tab.displayName }}
+
+
+
+
+
+
+
diff --git a/app/src/renderer/components/common/TmPage.vue b/app/src/renderer/components/common/TmPage.vue
index 296ddbc056..6d3937e0be 100644
--- a/app/src/renderer/components/common/TmPage.vue
+++ b/app/src/renderer/components/common/TmPage.vue
@@ -1,24 +1,66 @@
-
+
{{ title }}
{{ subtitle }}
-
-
-
-
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/renderer/components/common/TmPageHeader.vue b/app/src/renderer/components/common/TmPageHeader.vue
index 963a693916..710f116d55 100644
--- a/app/src/renderer/components/common/TmPageHeader.vue
+++ b/app/src/renderer/components/common/TmPageHeader.vue
@@ -3,23 +3,35 @@
@@ -28,6 +40,11 @@ export default {
-webkit-app-region: drag;
}
+.header-buttons {
+ align-self: flex-start;
+ margin-left: auto;
+}
+
.tm-page-header-title {
font-size: var(--xl);
}
@@ -38,15 +55,17 @@ export default {
.tm-page-header-container {
min-height: 4.22rem;
+ flex-wrap: wrap;
border-bottom: px solid var(--bc);
display: flex;
+ padding: 0 1rem 0 1rem;
}
.tm-page-header-text {
- flex: 1;
+ flex-basis: 100%;
display: flex;
min-width: 0;
- padding: 11px 0 0 1rem;
+ padding: 11px 0 0 0;
align-items: center;
}
diff --git a/app/src/renderer/components/common/ToolBar.vue b/app/src/renderer/components/common/ToolBar.vue
index aa4af2a2f4..9ce76e4a5e 100644
--- a/app/src/renderer/components/common/ToolBar.vue
+++ b/app/src/renderer/components/common/ToolBar.vue
@@ -5,19 +5,41 @@
:disabled="user.history.length === 0"
class="back"
@click="back"
- >arrow_back
- help_outline arrow_back
+
+
+ refresh
+
+
+ search
+
+
+
+ help_outline
+
settings exit_to_app
+ settings
+
+
+ exit_to_app
+
@@ -26,6 +48,16 @@ import { mapGetters, mapMutations } from "vuex"
export default {
// the name needs to be different from TmToolBar (tm-tool-bar) or else recursive rendering takes place
name: `tool-bar`,
+ props: {
+ refresh: {
+ type: Object,
+ default: undefined
+ },
+ searching: {
+ type: Object,
+ default: undefined
+ }
+ },
computed: {
...mapGetters([`user`, `lastPage`])
},
@@ -49,6 +81,9 @@ export default {
}
diff --git a/app/src/renderer/components/common/TmModalError.vue b/app/src/renderer/components/common/TmModalError.vue
index 6b98e2d9f4..711eb17058 100644
--- a/app/src/renderer/components/common/TmModalError.vue
+++ b/app/src/renderer/components/common/TmModalError.vue
@@ -16,20 +16,12 @@
value="Create an issue"
type="anchor"
/>
-
diff --git a/app/src/renderer/components/common/TmModalLCDApproval.vue b/app/src/renderer/components/common/TmModalLCDApproval.vue
deleted file mode 100644
index b02bce3dba..0000000000
--- a/app/src/renderer/components/common/TmModalLCDApproval.vue
+++ /dev/null
@@ -1,131 +0,0 @@
-
-
-
-
- sync problem
-
-
Node approval required
-
- Voyager needs to approve the node you're trying to connect to. Please
- compare the hash below against the hash from a trusted source. If you
- are 100% sure that the hashes match, click approve to proceed.
-
-
-
-
-
-
-
-
-
diff --git a/app/src/renderer/components/common/TmModalNodeHalted.vue b/app/src/renderer/components/common/TmModalNodeHalted.vue
index 78ed330bd4..4690ad0b25 100644
--- a/app/src/renderer/components/common/TmModalNodeHalted.vue
+++ b/app/src/renderer/components/common/TmModalNodeHalted.vue
@@ -25,14 +25,13 @@
diff --git a/app/src/renderer/components/staking/DelegationModal.vue b/app/src/renderer/components/staking/DelegationModal.vue
index 7311e9e172..e704cbde1d 100644
--- a/app/src/renderer/components/staking/DelegationModal.vue
+++ b/app/src/renderer/components/staking/DelegationModal.vue
@@ -132,8 +132,6 @@ export default {
type: String,
required: true
},
- validator: {
- type: Object,
denom: {
type: String,
required: true
@@ -143,7 +141,6 @@ export default {
amount: ``,
password: ``,
selectedIndex: 0,
- showPassword: false,
submissionError: null,
sending: false
}),
@@ -182,6 +179,7 @@ export default {
from: this.fromOptions[this.selectedIndex].address,
password: this.password
})
+ this.close()
} else {
this.sending = false
}
diff --git a/app/src/renderer/components/staking/UndelegationModal.vue b/app/src/renderer/components/staking/UndelegationModal.vue
index d57d91cf07..d55c5992a1 100644
--- a/app/src/renderer/components/staking/UndelegationModal.vue
+++ b/app/src/renderer/components/staking/UndelegationModal.vue
@@ -119,7 +119,6 @@ export default {
data: () => ({
amount: 0,
password: ``,
- showPassword: false,
selectedIndex: 0
}),
validations() {
diff --git a/app/src/renderer/vuex/modules/delegation.js b/app/src/renderer/vuex/modules/delegation.js
index c9655cd19d..6d0cb23b57 100644
--- a/app/src/renderer/vuex/modules/delegation.js
+++ b/app/src/renderer/vuex/modules/delegation.js
@@ -37,7 +37,6 @@ export default ({ node }) => {
Vue.set(state.committedDelegates, candidateId, value)
if (value === 0) {
delete state.committedDelegates[candidateId]
- Vue.set(state, `committedDelegates`, state.committedDelegates)
}
},
setUnbondingDelegations(state, unbondingDelegations) {
@@ -172,6 +171,9 @@ export default ({ node }) => {
validator_addr,
state.committedDelegates[validator_addr] + amount
)
+
+ // load delegates after delegation to get new atom distribution on validators
+ dispatch(`updateDelegates`)
},
async submitUnbondingDelegation(
{
diff --git a/test/unit/specs/components/governance/ModalDeposit.spec.js b/test/unit/specs/components/governance/ModalDeposit.spec.js
index fe617c72a8..6a08493887 100644
--- a/test/unit/specs/components/governance/ModalDeposit.spec.js
+++ b/test/unit/specs/components/governance/ModalDeposit.spec.js
@@ -46,10 +46,6 @@ describe(`ModalDeposit`, () => {
it(`account password defaults to an empty string`, () => {
expect(wrapper.vm.password).toEqual(``)
})
-
- it(`password is hidden by default`, () => {
- expect(wrapper.vm.showPassword).toBe(false)
- })
})
describe(`enables or disables 'Deposit' button correctly`, () => {
diff --git a/test/unit/specs/components/governance/ModalPropose.spec.js b/test/unit/specs/components/governance/ModalPropose.spec.js
index dcd6caf790..815adca0b2 100644
--- a/test/unit/specs/components/governance/ModalPropose.spec.js
+++ b/test/unit/specs/components/governance/ModalPropose.spec.js
@@ -58,10 +58,6 @@ describe(`ModalPropose`, () => {
it(`account password defaults to an empty string`, () => {
expect(wrapper.vm.password).toEqual(``)
})
-
- it(`password is hidden by default`, () => {
- expect(wrapper.vm.showPassword).toBe(false)
- })
})
describe(`enables or disables 'Create Proposal' button correctly`, () => {
diff --git a/test/unit/specs/components/governance/ModalVote.spec.js b/test/unit/specs/components/governance/ModalVote.spec.js
index 82bd8ebf77..649332eee8 100644
--- a/test/unit/specs/components/governance/ModalVote.spec.js
+++ b/test/unit/specs/components/governance/ModalVote.spec.js
@@ -23,24 +23,8 @@ describe(`ModalVote`, () => {
wrapper = instance.wrapper
})
- describe(`component matches snapshot`, () => {
- it(`has the expected html structure`, async () => {
- expect(wrapper.vm.$el).toMatchSnapshot()
- })
- })
-
- describe(`default values are set correctly`, () => {
- it(`the 'option' defaults to an empty string`, () => {
- expect(wrapper.vm.option).toEqual(``)
- })
-
- it(`account password defaults to an empty string`, () => {
- expect(wrapper.vm.password).toEqual(``)
- })
-
- it(`password is hidden by default`, () => {
- expect(wrapper.vm.showPassword).toBe(false)
- })
+ it(`has the expected html structure`, async () => {
+ expect(wrapper.vm.$el).toMatchSnapshot()
})
describe(`enables or disables Vote correctly`, () => {
@@ -50,32 +34,32 @@ describe(`ModalVote`, () => {
expect(voteBtn.html()).toContain(`disabled="disabled"`)
// non valid option value
- wrapper.setData({ option: `other`, password: `1234567890` })
+ wrapper.setData({ vote: `other`, password: `1234567890` })
expect(voteBtn.html()).toContain(`disabled="disabled"`)
// no password
- wrapper.setData({ option: `No`, password: `` })
+ wrapper.setData({ vote: `No`, password: `` })
expect(voteBtn.html()).toContain(`disabled="disabled"`)
})
it(`enables the 'Vote' button if the user selected a valid option`, () => {
- wrapper.setData({ option: `Yes`, password: `1234567890` })
+ wrapper.setData({ vote: `Yes`, password: `1234567890` })
let voteBtn = wrapper.find(`#vote-yes`)
let submitButton = wrapper.find(`#cast-vote`)
expect(voteBtn.html()).toContain(`active`)
expect(submitButton.html()).not.toContain(`disabled="disabled"`)
- wrapper.setData({ option: `No` })
+ wrapper.setData({ vote: `No` })
voteBtn = wrapper.find(`#vote-no`)
expect(voteBtn.html()).toContain(`active`)
expect(submitButton.html()).not.toContain(`disabled="disabled"`)
- wrapper.setData({ option: `NoWithVeto` })
+ wrapper.setData({ vote: `NoWithVeto` })
voteBtn = wrapper.find(`#vote-veto`)
expect(voteBtn.html()).toContain(`active`)
expect(submitButton.html()).not.toContain(`disabled="disabled"`)
- wrapper.setData({ option: `Abstain` })
+ wrapper.setData({ vote: `Abstain` })
voteBtn = wrapper.find(`#vote-abstain`)
expect(voteBtn.html()).toContain(`active`)
expect(submitButton.html()).not.toContain(`disabled="disabled"`)
@@ -110,25 +94,8 @@ describe(`ModalVote`, () => {
})
describe(`Vote`, () => {
- it(`updates the selected option on click`, () => {
- wrapper.vm.vote(`Yes`)
- expect(wrapper.vm.option).toEqual(`Yes`)
-
- wrapper.vm.vote(`No`)
- expect(wrapper.vm.option).toEqual(`No`)
-
- wrapper.vm.vote(`NoWithVeto`)
- expect(wrapper.vm.option).toEqual(`NoWithVeto`)
-
- wrapper.vm.vote(`Abstain`)
- expect(wrapper.vm.option).toEqual(`Abstain`)
-
- wrapper.vm.vote(`Abstain`)
- expect(wrapper.vm.option).toEqual(``)
- })
-
it(`Vote button casts a vote and closes modal`, () => {
- wrapper.setData({ option: `Yes`, password: `1234567890` })
+ wrapper.setData({ vote: `Yes`, password: `1234567890` })
wrapper.vm.onVote()
expect(wrapper.emittedByOrder()).toEqual([
diff --git a/test/unit/specs/components/governance/PageGovernance.spec.js b/test/unit/specs/components/governance/PageGovernance.spec.js
index 54795876cc..75a7850e31 100644
--- a/test/unit/specs/components/governance/PageGovernance.spec.js
+++ b/test/unit/specs/components/governance/PageGovernance.spec.js
@@ -25,6 +25,7 @@ describe(`PageGovernance`, () => {
let instance = mount(PageGovernance, {
doBefore: ({ store }) => {
store.commit(`setGovParameters`, governanceParameters)
+ store.state.governanceParameters.loaded = true
store.commit(`setStakingParameters`, stakingParameters.parameters)
store.commit(`setConnected`, true)
}
diff --git a/test/unit/specs/components/governance/PageProposal.spec.js b/test/unit/specs/components/governance/PageProposal.spec.js
index f5533d0cec..8addbea869 100644
--- a/test/unit/specs/components/governance/PageProposal.spec.js
+++ b/test/unit/specs/components/governance/PageProposal.spec.js
@@ -38,6 +38,7 @@ describe(`PageProposal`, () => {
localVue,
doBefore: ({ store }) => {
store.commit(`setConnected`, true)
+ store.state.governanceParameters.loaded = true
store.commit(`setGovParameters`, governanceParameters)
store.commit(`setStakingParameters`, stakingParameters.parameters)
store.commit(`setProposal`, proposal)
diff --git a/test/unit/specs/components/governance/__snapshots__/ModalDeposit.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/ModalDeposit.spec.js.snap
index 666ccbe323..435b122030 100644
--- a/test/unit/specs/components/governance/__snapshots__/ModalDeposit.spec.js.snap
+++ b/test/unit/specs/components/governance/__snapshots__/ModalDeposit.spec.js.snap
@@ -56,8 +56,6 @@ exports[`ModalDeposit component matches snapshot has the expected html structure
diff --git a/test/unit/specs/components/governance/__snapshots__/ModalPropose.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/ModalPropose.spec.js.snap
index 0ff6dc3cd8..f70e550387 100644
--- a/test/unit/specs/components/governance/__snapshots__/ModalPropose.spec.js.snap
+++ b/test/unit/specs/components/governance/__snapshots__/ModalPropose.spec.js.snap
@@ -105,8 +105,6 @@ exports[`ModalPropose component matches snapshot has the expected html structure
diff --git a/test/unit/specs/components/governance/__snapshots__/ModalVote.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/ModalVote.spec.js.snap
index 944eb0cfdc..bd851f6a24 100644
--- a/test/unit/specs/components/governance/__snapshots__/ModalVote.spec.js.snap
+++ b/test/unit/specs/components/governance/__snapshots__/ModalVote.spec.js.snap
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`ModalVote component matches snapshot has the expected html structure 1`] = `
+exports[`ModalVote has the expected html structure 1`] = `
-
-
-
-
- Yes
-
-
+
+
+ Yes
+
+
+
-
-
-
-
- No
-
-
+
+
+ No
+
+
+
-
-
-
-
- No With Veto
-
-
+
+
+ No With Veto
+
+
+
-
-
-
-
- Abstain
-
-
+
+
+ Abstain
+
+
+
@@ -159,7 +155,7 @@ exports[`ModalVote component matches snapshot has the expected html structure 1`
- Vote
+ Submit Vote
@@ -170,6 +166,9 @@ exports[`ModalVote component matches snapshot has the expected html structure 1`
+ >
+
+
+
`;
diff --git a/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap
index f56f8ab159..f6433ed681 100644
--- a/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap
+++ b/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap
@@ -94,71 +94,58 @@ exports[`PageProposal has the expected html structure 1`] = `
/>
-
-
-
-
+
+
+