mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-01-18 21:17:59 +00:00
Show spinner
This commit is contained in:
parent
c284cb4cfc
commit
51897adf8d
@ -12,9 +12,12 @@
|
|||||||
let result = {};
|
let result = {};
|
||||||
let copySucceeded = false;
|
let copySucceeded = false;
|
||||||
let timeout;
|
let timeout;
|
||||||
|
let busy = false;
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
busy = true;
|
||||||
result = await collection.executeShellScript(script);
|
result = await collection.executeShellScript(script);
|
||||||
|
busy = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function copyErrorDescription() {
|
async function copyErrorDescription() {
|
||||||
@ -34,7 +37,9 @@
|
|||||||
</label>
|
</label>
|
||||||
|
|
||||||
<div class="output">
|
<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="!">
|
<BlankState title={result.errorTitle} label={result.errorDescription} icon="!">
|
||||||
<button class="button-small" on:click={copyErrorDescription}>
|
<button class="button-small" on:click={copyErrorDescription}>
|
||||||
<Icon name={copySucceeded ? 'check' : 'clipboard'} /> Copy error message
|
<Icon name={copySucceeded ? 'check' : 'clipboard'} /> Copy error message
|
||||||
|
Loading…
Reference in New Issue
Block a user