From 0353de6e0901455f424830a0e7fd0075aa3d958a Mon Sep 17 00:00:00 2001 From: Edgar Goetzendorff Date: Fri, 1 Feb 2019 17:10:53 +0100 Subject: [PATCH 1/5] misc: forward to contacts overview after creating a contact --- src/renderer/i18n/locales/en-US.js | 3 ++- src/renderer/pages/Contact/ContactNew.vue | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/renderer/i18n/locales/en-US.js b/src/renderer/i18n/locales/en-US.js index 3ce85134b2..275d85eece 100644 --- a/src/renderer/i18n/locales/en-US.js +++ b/src/renderer/i18n/locales/en-US.js @@ -442,7 +442,8 @@ export default { NAME: 'Contact name (optional)', NAME_INFO: 'Info.:', NAME_DESCRIPTION: 'Contact name is not required, but it can be used for your convenience', - FAILED: 'Failed to create contact' + FAILED: 'Failed to create contact', + SUCCESS: 'Contact \'{0}\' was created successfully' }, DASHBOARD: { diff --git a/src/renderer/pages/Contact/ContactNew.vue b/src/renderer/pages/Contact/ContactNew.vue index 7a225a0ddf..07af032e7f 100644 --- a/src/renderer/pages/Contact/ContactNew.vue +++ b/src/renderer/pages/Contact/ContactNew.vue @@ -125,7 +125,13 @@ export default { profileId: this.session_profile.id, isContact: true }) - this.$router.push({ name: 'wallet-show', params: { address } }) + + const name = this.schema.name.length + ? this.wallet_name(address) + : this.wallet_truncate(address) + + this.$success(this.$t('PAGES.CONTACT_NEW.SUCCESS', [name])) + this.$router.push({ name: 'contacts' }) } catch (error) { this.$error(`${this.$t('PAGES.CONTACT_NEW.FAILED')}: ${error.message}`) } From eed31bd8017b50494e786951fb310beacd3230c7 Mon Sep 17 00:00:00 2001 From: Edgar Goetzendorff Date: Fri, 1 Feb 2019 18:15:46 +0100 Subject: [PATCH 2/5] misc: add clipboard button and tooltips to action column --- .../components/Button/ButtonClipboard.vue | 7 ++++++- .../components/Wallet/WalletTable.vue | 21 +++++++++++++++---- src/renderer/i18n/locales/en-US.js | 7 +++++-- 3 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/renderer/components/Button/ButtonClipboard.vue b/src/renderer/components/Button/ButtonClipboard.vue index cd0984e3b9..d4eacfed1b 100644 --- a/src/renderer/components/Button/ButtonClipboard.vue +++ b/src/renderer/components/Button/ButtonClipboard.vue @@ -36,6 +36,11 @@ export default { type: String, required: false, default: '0 0 12 16' + }, + subject: { + type: String, + required: false, + default: '' } }, @@ -51,7 +56,7 @@ export default { // when using portals. Probably is this bug: // https://github.com/LinusBorg/portal-vue/issues/159 if (this.$i18n) { - this.copyText = this.$t('BUTTON_CLIPBOARD.COPY_TO_CLIPBOARD') + this.copyText = this.$t('BUTTON_CLIPBOARD.COPY_TO_CLIPBOARD', [this.subject]) } }, diff --git a/src/renderer/components/Wallet/WalletTable.vue b/src/renderer/components/Wallet/WalletTable.vue index 154214b3e4..7f6f2de43f 100644 --- a/src/renderer/components/Wallet/WalletTable.vue +++ b/src/renderer/components/Wallet/WalletTable.vue @@ -75,8 +75,18 @@ v-else-if="data.column.field === 'actions'" class="flex items-center justify-center" > + + + +