Added check if key exists

This commit is contained in:
Nicolai Ort 2021-03-26 18:03:58 +01:00
parent f185d559c0
commit 2316baa898
1 changed files with 6 additions and 1 deletions

View File

@ -103,6 +103,7 @@
postdata
)
.then((resp) => {
editable.registrationKey = resp.registrationKey;
original_object = Object.assign({}, editable);
original = JSON.stringify(original_object);
Toastify({
@ -332,7 +333,11 @@
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">
{editable.registrationKey || 'Please save your changes'}
{#if editable.registrationKey}
{registrationLink}
{:else}
You have to save your changes to generate a link.
{/if}
</p>
<div
class="bg-gray-200 border-gray-300 border-t border-b border-r text-black rounded-r-md sm:text-sm p-2 mt-1 cursor-pointer">