1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-19 22:18:03 +00:00

Made harsh loading/error experience friendlier

This commit is contained in:
2023-06-23 17:22:47 +02:00
parent 964e66e8a3
commit dc0094b27c
21 changed files with 262 additions and 253 deletions

View File

@ -18,11 +18,16 @@
<!-- <CodeExample code="db.stats()" /> -->
<div class="grid">
<ObjectGrid data={host.status} />
<ObjectGrid
data={host.status || {}}
errorTitle={host.statusError ? 'Error fetching server status' : ''}
errorDescription={host.statusError}
busy={!host.status && !host.statusError && 'Fetching server status…'}
/>
</div>
<div class="buttons">
<button class="btn secondary" on:click={copy}>
<button class="btn secondary" on:click={copy} disabled={!host.status}>
<Icon name={copySucceeded ? 'check' : 'clipboard'} />
Copy JSON
</button>

View File

@ -18,11 +18,16 @@
<!-- <CodeExample code="db.stats()" /> -->
<div class="grid">
<ObjectGrid data={host.systemInfo} />
<ObjectGrid
data={host.systemInfo}
errorTitle={host.systemInfoError ? 'Error fetching system info' : ''}
errorDescription={host.systemInfoError}
busy={!host.systemInfo && !host.systemInfoError && 'Fetching system info…'}
/>
</div>
<div class="buttons">
<button class="btn secondary" on:click={copy}>
<button class="btn secondary" on:click={copy} disabled={!host.systemInfo}>
<Icon name={copySucceeded ? 'check' : 'clipboard'} />
Copy JSON
</button>