mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 13:07:58 +00:00
Show spinner
This commit is contained in:
parent
c284cb4cfc
commit
51897adf8d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user