fix: copy button

This commit is contained in:
Vlad Stan 2023-02-24 15:15:06 +02:00
parent 67dda89c81
commit 6e1b5dd0bb
2 changed files with 12 additions and 2 deletions

View file

@ -83,7 +83,7 @@
<q-btn <q-btn
outline outline
color="grey" color="grey"
@click="copyText(disclaimerDialog.location.href)" @click="copyText(wssLink)"
>Copy</q-btn >Copy</q-btn
> >
</div> </div>

View file

@ -245,7 +245,17 @@ async function relayDetails(path) {
value = +eventKind value = +eventKind
this.relay.config.forcedAuthEvents = this.relay.config.forcedAuthEvents =
this.relay.config.forcedAuthEvents.filter(e => e !== value) this.relay.config.forcedAuthEvents.filter(e => e !== value)
} },
// todo: bad. base.js not present in custom components
copyText: function (text, message, position) {
var notify = this.$q.notify
Quasar.utils.copyToClipboard(text).then(function () {
notify({
message: message || 'Copied to clipboard!',
position: position || 'bottom'
})
})
},
}, },
created: async function () { created: async function () {