From 5dc1c85a233af2ac98ff2ea68632ddf6c70f11ca Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Wed, 6 Dec 2017 11:25:21 +0900 Subject: [PATCH 1/6] init --- app/src/renderer/components/wallet/BtnCopy.vue | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/app/src/renderer/components/wallet/BtnCopy.vue b/app/src/renderer/components/wallet/BtnCopy.vue index 60675e4a45..f633980772 100644 --- a/app/src/renderer/components/wallet/BtnCopy.vue +++ b/app/src/renderer/components/wallet/BtnCopy.vue @@ -13,6 +13,16 @@ export default { components: { Btn }, + computed: { + notifyTitle () { + if (this.title) return this.title + else return 'Copy Success!' + }, + notifyBody () { + if (this.body) return this.body + else return `"${this.trunc(this.value)}" has been copied to your clipboard.` + } + }, methods: { trunc (value) { if (value.length > 20) value = value.substring(0, 10) + '...' @@ -20,14 +30,14 @@ export default { }, click () { this.$store.commit('notify', { - title: 'Copy Success!', - body: `"${this.trunc(this.value)}" has been copied to your clipboard.` + title: this.notifyTitle, + body: this.notifyBody }) } }, mounted () { this.clipboard = new Clipboard('.btn-copy') }, - props: ['value'] + props: ['value', 'title', 'body'] } From 41dcc536e9a6c71c5501208c2d5412ba786f4883 Mon Sep 17 00:00:00 2001 From: Peng Zhong Date: Wed, 6 Dec 2017 11:55:23 +0900 Subject: [PATCH 2/6] update Balances page --- .../renderer/components/common/AnchorCopy.vue | 4 +- .../renderer/components/wallet/BtnCopy.vue | 2 +- .../components/wallet/CardAddress.vue | 91 ------------------- .../renderer/components/wallet/LiAddress.vue | 45 +++++++++ .../components/wallet/PageBalances.vue | 9 +- 5 files changed, 51 insertions(+), 100 deletions(-) delete mode 100644 app/src/renderer/components/wallet/CardAddress.vue create mode 100644 app/src/renderer/components/wallet/LiAddress.vue diff --git a/app/src/renderer/components/common/AnchorCopy.vue b/app/src/renderer/components/common/AnchorCopy.vue index 8ee48b53f8..553efec6b1 100644 --- a/app/src/renderer/components/common/AnchorCopy.vue +++ b/app/src/renderer/components/common/AnchorCopy.vue @@ -1,6 +1,6 @@ @@ -17,6 +17,6 @@ export default { e.clearSelection() }) }, - props: ['value', 'label', 'icon'] + props: ['value', 'label'] } diff --git a/app/src/renderer/components/wallet/BtnCopy.vue b/app/src/renderer/components/wallet/BtnCopy.vue index f633980772..28f3ccdc86 100644 --- a/app/src/renderer/components/wallet/BtnCopy.vue +++ b/app/src/renderer/components/wallet/BtnCopy.vue @@ -1,6 +1,6 @@