From 53ddd3464b522b726823cda90abeeb9fa60a37ca Mon Sep 17 00:00:00 2001 From: Danil Kovtonyuk Date: Sat, 29 Feb 2020 22:47:04 +1000 Subject: [PATCH] add copy contribution hash button --- assets/styles/components/_ceremony.scss | 10 ++++++++++ pages/index.vue | 2 +- pages/make-contribution.vue | 23 +++++++++++++++++++---- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/assets/styles/components/_ceremony.scss b/assets/styles/components/_ceremony.scss index 1dd0db7..cd397fe 100644 --- a/assets/styles/components/_ceremony.scss +++ b/assets/styles/components/_ceremony.scss @@ -134,6 +134,16 @@ display: none; } } + + &.has-addons .control { + &:not(:last-child) { + z-index: 1; + } + + &:last-child { + z-index: 10; + } + } } .currently { diff --git a/pages/index.vue b/pages/index.vue index fcfeab4..ef074b1 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -99,7 +99,7 @@
{{ status.msg }}
-
- Your contribution hash (Blake2b) is {{ contributionHash }} +
+
Your contribution hash (Blake2b)
+ + +

+ Copy +

+
-
- You still can authorize your contribution by following this link. +
+ You still can authorize your contribution by following this + link.
@@ -204,6 +211,14 @@ export default { onAnonymousHandler() { this.logOut() this.contributionType = 'anonymous' + }, + copyСontributionHash() { + navigator.clipboard.writeText(this.contributionHash).then(() => { + this.$buefy.toast.open({ + message: 'Copied!', + type: 'is-primary' + }) + }) } } }