parent
38e1c8c5a1
commit
a3921b45c7
@ -117,6 +117,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function copy() {
|
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;
|
valueCopy = registrationLink;
|
||||||
await tick();
|
await tick();
|
||||||
areaDom.focus();
|
areaDom.focus();
|
||||||
@ -331,12 +340,11 @@
|
|||||||
<div on:click={copy} class="inline-flex w-full">
|
<div on:click={copy} class="inline-flex w-full">
|
||||||
<p
|
<p
|
||||||
name="token"
|
name="token"
|
||||||
class:bg-green-200={copied}
|
|
||||||
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2">
|
class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm rounded-l-md sm:text-sm border-gray-300 border bg-gray-50 text-gray-500 p-2">
|
||||||
{#if editable.registrationKey}
|
{#if editable.registrationKey}
|
||||||
{registrationLink}
|
{registrationLink}
|
||||||
{:else}
|
{:else}
|
||||||
You have to save your changes to generate a link.
|
{$_('you-have-to-save-your-changes-to-generate-a-link')}
|
||||||
{/if}
|
{/if}
|
||||||
</p>
|
</p>
|
||||||
<div
|
<div
|
||||||
@ -351,9 +359,11 @@
|
|||||||
d="M7 4V2h10v2h3l1 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V5l1-1h3zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z" /></svg>
|
d="M7 4V2h10v2h3l1 1v16a1 1 0 01-1 1H4a1 1 0 01-1-1V5l1-1h3zm0 2H5v14h14V6h-2v2H7V6zm2-2v2h6V4H9z" /></svg>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{#if editable.registrationKey}
|
||||||
<p class="text-gray-500 text-xs">
|
<p class="text-gray-500 text-xs">
|
||||||
{$_('click-to-copy-the-link-into-your-clipboard')}
|
{$_('click-to-copy-the-link-into-your-clipboard')}
|
||||||
</p>
|
</p>
|
||||||
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user