diff --git a/webapp/components/InviteButton/InviteButton.vue b/webapp/components/InviteButton/InviteButton.vue index 15190d9dc..a605c863f 100644 --- a/webapp/components/InviteButton/InviteButton.vue +++ b/webapp/components/InviteButton/InviteButton.vue @@ -7,16 +7,14 @@
{{ $t('invite-codes.your-code') }} - - {{ inviteCode.code }} - - + + + {{ inviteCode.code }} + + + + {{ $t('invite-codes.copy-link') }} +
{{ $t('invite-codes.not-available') }} @@ -51,6 +49,15 @@ export default { await navigator.clipboard.writeText(this.inviteCode.code) this.$toast.success(this.$t('invite-codes.copy-success')) }, + async copyInviteLink() { + await navigator.clipboard.writeText( + 'https://' + + window.location.hostname + + '/registration?method=invite-code&inviteCode=' + + this.inviteCode.code, + ) + this.$toast.success(this.$t('invite-codes.copy-success')) + }, }, apollo: { inviteCode: { @@ -79,5 +86,11 @@ export default { .invite-button-menu-popover { text-align: center; + display: flex; + justify-content: center; + align-items: center; +} +.invite-code { + left: 50%; } diff --git a/webapp/locales/de.json b/webapp/locales/de.json index 060068af4..da9d232f4 100644 --- a/webapp/locales/de.json +++ b/webapp/locales/de.json @@ -338,6 +338,7 @@ }, "invite-codes": { "copy-code": "Einladungscode in die Zwischenablage kopieren", + "copy-link": "Einladungslink in die Zwischenablage kopieren", "copy-success": "Einladungscode erfolgreich in die Zwischenablage kopiert", "not-available": "Du hast keinen Einladungscode zur Verfügung!", "your-code": "Das ist dein Einladungscode:" diff --git a/webapp/locales/en.json b/webapp/locales/en.json index 3fbacb70c..6a77f91a9 100644 --- a/webapp/locales/en.json +++ b/webapp/locales/en.json @@ -338,6 +338,7 @@ }, "invite-codes": { "copy-code": "Copy invite code to clipboard", + "copy-link": "Copy invite link to clipboard", "copy-success": "Invite code copied to clipboard", "not-available": "You have no valid invite code available!", "your-code": "This is your invite code:"