From 6e1b5dd0bb8ade926db266208cbdbd56ec471164 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 24 Feb 2023 15:15:06 +0200 Subject: [PATCH] fix: copy button --- static/components/relay-details/relay-details.html | 2 +- static/components/relay-details/relay-details.js | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/static/components/relay-details/relay-details.html b/static/components/relay-details/relay-details.html index 8ea8394..a28c110 100644 --- a/static/components/relay-details/relay-details.html +++ b/static/components/relay-details/relay-details.html @@ -83,7 +83,7 @@ Copy diff --git a/static/components/relay-details/relay-details.js b/static/components/relay-details/relay-details.js index 37616b9..41d1a94 100644 --- a/static/components/relay-details/relay-details.js +++ b/static/components/relay-details/relay-details.js @@ -245,7 +245,17 @@ async function relayDetails(path) { value = +eventKind this.relay.config.forcedAuthEvents = 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 () {