From a3921b45c70b410293db593a75d2fdd34c131733 Mon Sep 17 00:00:00 2001 From: Nicolai Ort Date: Fri, 26 Mar 2021 18:11:10 +0100 Subject: [PATCH] Copy now 100% worX ref #112 --- src/components/orgs/OrgDetail.svelte | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/components/orgs/OrgDetail.svelte b/src/components/orgs/OrgDetail.svelte index 7d487413..6fdcd8d6 100644 --- a/src/components/orgs/OrgDetail.svelte +++ b/src/components/orgs/OrgDetail.svelte @@ -117,6 +117,15 @@ } } async function copy() { + if(!editable.registrationKey){ + Toastify({ + text: $_('you-have-to-save-your-changes-to-generate-a-link'), + duration: 500, + backgroundColor: + "linear-gradient(90deg, hsla(281, 37%, 45%, 1) 0%, hsla(1, 62%, 48%, 1) 100%)", + }).showToast(); + return; + } valueCopy = registrationLink; await tick(); areaDom.focus(); @@ -331,12 +340,11 @@

{#if editable.registrationKey} {registrationLink} {:else} - You have to save your changes to generate a link. + {$_('you-have-to-save-your-changes-to-generate-a-link')} {/if}

+ {#if editable.registrationKey}

{$_('click-to-copy-the-link-into-your-clipboard')}

+ {/if} {/if}