diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f172e8..d5e5b985 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Put Instance Reboot button on all pages of admin-fe - Make Instance Reboot button's positon fixed on Settings page - Update jest and babel-jest +- Generate an invite link when an invite token has been generated ### Fixed diff --git a/src/lang/en.js b/src/lang/en.js index 74eaa909..314672f8 100644 --- a/src/lang/en.js +++ b/src/lang/en.js @@ -397,6 +397,7 @@ export default { expiresAt: 'Expires at', tokenCreated: 'Invite token was created', token: 'Token', + inviteLink: 'Invite link', uses: 'Uses', used: 'Used', cancel: 'Cancel', diff --git a/src/views/invites/index.vue b/src/views/invites/index.vue index 23862a5c..dceddc8c 100644 --- a/src/views/invites/index.vue +++ b/src/views/invites/index.vue @@ -49,9 +49,22 @@
{{ $t('invites.tokenCreated') }}
-

{{ this.$t('invites.token') }}: {{ newToken.token }}

-

{{ this.$t('invites.maxUse') }}: {{ newToken.maxUse }}

-

{{ this.$t('invites.expiresAt') }}: {{ newToken.expiresAt }}

+ + + + {{ inviteLink }} + + + + {{ newToken.token }} + + + {{ newToken.maxUse }} + + + {{ newToken.expiresAt || '(not set)' }} + + import RebootButton from '@/components/RebootButton' +import { mapGetters } from 'vuex' +import { baseName } from '@/api/utils' export default { components: { RebootButton }, @@ -167,9 +182,15 @@ export default { } }, computed: { + ...mapGetters([ + 'authHost' + ]), getLabelWidth() { return this.isDesktop ? '100px' : '80px' }, + inviteLink() { + return `${baseName(this.authHost)}/registration/${this.newToken.token}` + }, isDesktop() { return this.$store.state.app.device === 'desktop' }, @@ -248,7 +269,13 @@ export default { padding: 10px; } .create-new-token-dialog { - width: 40% + width: 50%; + a { + margin-bottom: 3px; + } + .el-card__body { + padding: 10px 20px; + } } .el-dialog__body { padding: 5px 20px 0 20px @@ -283,6 +310,11 @@ export default { line-height: 22px; margin: 0 0 10px 0; } + .new-token-card { + .el-form-item { + margin: 0; + } + } .reboot-button { padding: 10px; margin: 0;