disabled rollover when not possible to rollover

This commit is contained in:
Christopher Bisset 2022-08-13 19:21:29 +10:00
parent 2ad12f5a92
commit cd0b84a679
2 changed files with 3 additions and 2 deletions

View file

@ -68,7 +68,7 @@
</svg>
{/if}
</button>
<RolloverApi />
<RolloverApi {apiStatus} />
</div>
<p class="text-xs text-base-content text-italics mb-8">Generate an API key for your headscale instance and place it here.</p>
{#if apiStatus != 'succeeded'}

View file

@ -4,6 +4,7 @@
import { alertStore, APIKeyStore } from '$lib/common/stores';
let keyList = [new APIKey()];
let currentKey = new APIKey();
export let apiStatus = '';
// get current API keys
// Match to current key
@ -46,5 +47,5 @@
getAPIKeysAction();
}}
class="btn btn-sm btn-secondary capitalize ml-4"
type="button">Rollover API Key</button
type="button" disabled="{apiStatus != 'succeeded'}">Rollover API Key</button
>