Generate invite link
This commit is contained in:
parent
a54d09c486
commit
a806a06107
3 changed files with 38 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -49,9 +49,22 @@
|
|||
<div slot="header" class="clearfix">
|
||||
<span>{{ $t('invites.tokenCreated') }}</span>
|
||||
</div>
|
||||
<p>{{ this.$t('invites.token') }}: {{ newToken.token }}</p>
|
||||
<p>{{ this.$t('invites.maxUse') }}: {{ newToken.maxUse }}</p>
|
||||
<p>{{ this.$t('invites.expiresAt') }}: {{ newToken.expiresAt }}</p>
|
||||
<el-form label-width="80px" class="new-token-card">
|
||||
<el-form-item :label="$t('invites.inviteLink')">
|
||||
<el-link :href="inviteLink" :underline="false" target="_blank">
|
||||
{{ inviteLink }}
|
||||
</el-link>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('invites.token')">
|
||||
{{ newToken.token }}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('invites.maxUse')">
|
||||
{{ newToken.maxUse }}
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('invites.expiresAt')">
|
||||
{{ newToken.expiresAt || '(not set)' }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
|
@ -144,6 +157,8 @@
|
|||
|
||||
<script>
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue