1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 13:07:58 +00:00

Show spinner

This commit is contained in:
Romein van Buren 2023-06-24 10:28:49 +02:00
parent c284cb4cfc
commit 51897adf8d
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49

View File

@ -12,9 +12,12 @@
let result = {};
let copySucceeded = false;
let timeout;
let busy = false;
async function run() {
busy = true;
result = await collection.executeShellScript(script);
busy = false;
}
async function copyErrorDescription() {
@ -34,7 +37,9 @@
</label>
<div class="output">
{#if result.errorTitle || result.errorDescription}
{#if busy}
<BlankState icon="loading" label="Executing…" />
{:else if result.errorTitle || result.errorDescription}
<BlankState title={result.errorTitle} label={result.errorDescription} icon="!">
<button class="button-small" on:click={copyErrorDescription}>
<Icon name={copySucceeded ? 'check' : 'clipboard'} /> Copy error message