Merge branch 'master' into fix-confirm-creation

This commit is contained in:
Moriz Wahl 2022-04-26 14:46:41 +02:00 committed by GitHub
commit 3c89bd5fbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div class="clipboard-copy">
<b-input-group size="lg" class="mb-3" prepend="Link">
<b-input-group v-if="canCopyLink" size="lg" class="mb-3" prepend="Link">
<b-form-input :value="link" type="text" readonly></b-form-input>
<b-input-group-append>
<b-button size="sm" text="Button" variant="primary" @click="CopyLink">
@ -11,6 +11,10 @@
</b-button>
</b-input-group-append>
</b-input-group>
<div v-else>
<div class="alert-danger p-3">{{ $t('gdd_per_link.not-copied') }}</div>
<div class="alert-muted h3 p-3">{{ link }}</div>
</div>
</div>
</template>
<script>
@ -19,6 +23,11 @@ export default {
props: {
link: { type: String, required: true },
},
data() {
return {
canCopyLink: true,
}
},
methods: {
CopyLink() {
navigator.clipboard
@ -27,6 +36,7 @@ export default {
this.toastSuccess(this.$t('gdd_per_link.link-copied'))
})
.catch(() => {
this.canCopyLink = false
this.toastError(this.$t('gdd_per_link.not-copied'))
})
},

View File

@ -50,6 +50,14 @@
</template>
</b-card>
</b-modal>
<b-modal :id="'modalPopoverCopyError' + id" ok-only hide-header-close>
<b-card header-tag="header" footer-tag="footer">
<b-card-text>
<div class="alert-danger p-3">{{ $t('gdd_per_link.not-copied') }}</div>
<div class="alert-muted h3 p-3">{{ link }}</div>
</b-card-text>
</b-card>
</b-modal>
</div>
</template>
<script>
@ -87,6 +95,7 @@ export default {
this.toastSuccess(this.$t('gdd_per_link.link-copied'))
})
.catch(() => {
this.$bvModal.show('modalPopoverCopyError' + this.id)
this.toastError(this.$t('gdd_per_link.not-copied'))
})
},

View File

@ -114,7 +114,7 @@
"links_sum": "Offene Links und QR-Codes",
"no-account": "Du besitzt noch kein Gradido Konto?",
"no-redeem": "Du darfst deinen eigenen Link nicht einlösen!",
"not-copied": "Konnte den Link nicht kopieren: {err}",
"not-copied": "Dein Gerät lässt das Kopieren leider nicht zu! Bitte kopiere den Link von Hand!",
"redeem": "Einlösen",
"redeem-text": "Willst du den Betrag jetzt einlösen?",
"redeemed": "Erfolgreich eingelöst! Deinem Konto wurden {n} GDD gutgeschrieben.",

View File

@ -114,7 +114,7 @@
"links_sum": "Open links and QR codes",
"no-account": "You don't have a Gradido account yet?",
"no-redeem": "You not allowed to redeem your own link!",
"not-copied": "Could not copy link: {err}",
"not-copied": "Unfortunately, your device does not allow copying! Please copy the link by hand!",
"redeem": "Redeem",
"redeem-text": "Do you want to redeem the amount now?",
"redeemed": "Successfully redeemed! Your account has been credited with {n} GDD.",