From e4a82cee728c882fb455a0c10ef161f2a97e5fc0 Mon Sep 17 00:00:00 2001 From: Angelina Filippova Date: Thu, 11 Mar 2021 15:02:01 +0300 Subject: [PATCH 1/3] Add ability to copy invite link from dialog window --- src/lang/en.js | 3 ++- src/utils/clipboard.js | 2 +- src/views/invites/index.vue | 28 ++++++++++++++++++++++++---- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/lang/en.js b/src/lang/en.js index e21a156d..19b63d4a 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -482,7 +482,8 @@ export default { invalidEmailError: 'Please input valid e-mail', emailSent: 'Invite was sent', submitFormError: 'There are invalid values in the form. Please fix them before continuing.', - inviteViaEmailAlert: 'To send invite via email make sure to enable `invites_enabled` and disable `registrations_open`' + inviteViaEmailAlert: 'To send invite via email make sure to enable `invites_enabled` and disable `registrations_open`', + copyLink: 'Copy link' }, emoji: { emojiPacks: 'Emoji packs', diff --git a/src/utils/clipboard.js b/src/utils/clipboard.js index e916a44d..66f018ec 100644 --- a/src/utils/clipboard.js +++ b/src/utils/clipboard.js @@ -3,7 +3,7 @@ import Clipboard from 'clipboard' function clipboardSuccess() { Vue.prototype.$message({ - message: 'Copy successfully', + message: 'Copied!', type: 'success', duration: 1500 }) diff --git a/src/views/invites/index.vue b/src/views/invites/index.vue index 5ed51462..4fce11ec 100644 --- a/src/views/invites/index.vue +++ b/src/views/invites/index.vue @@ -22,6 +22,7 @@ :visible.sync="createTokenDialogVisible" :show-close="false" :title="$t('invites.createInviteToken')" + :width="isTokenCreated ? '60%' : '30%'" custom-class="create-new-token-dialog"> @@ -51,9 +52,12 @@ - - {{ inviteLink }} - + {{ newToken.token }} @@ -156,6 +160,7 @@