[ui] add spinners to all home sections

feat/vaults
Tomáš Mládek 2022-02-10 00:15:42 +01:00
parent 3e4ff5914b
commit fa8a313dd5
No known key found for this signature in database
GPG Key ID: ED21612889E75EC5
1 changed files with 34 additions and 22 deletions

View File

@ -58,33 +58,45 @@
{/await}
</section>
{#if lastVisited.length > 0}
{#if lastVisited.length || $lastVisitedQuery === undefined}
<section class="lastVisited">
<h2>Last visited</h2>
<table>
{#each lastVisited as [address, visited]}
<tr>
<td class="timestamp"
>{formatRelative(visited * 1000, new Date())}</td
>
<td class="object"><UpObject link {address} /></td>
</tr>
{/each}
</table>
{#if $lastVisitedQuery == undefined}
<Spinner centered />
{:else}
<table>
{#each lastVisited as [address, visited]}
<tr>
<td class="timestamp"
>{formatRelative(visited * 1000, new Date())}</td
>
<td class="object"><UpObject link {address} /></td>
</tr>
{/each}
</table>
{/if}
</section>
{/if}
<section class="latest">
<h2>Most recently added</h2>
<table>
{#each latest as [address, added]}
<tr>
<td class="timestamp">{formatRelative(added * 1000, new Date())}</td>
<td class="object"><UpObject link {address} /></td>
</tr>
{/each}
</table>
</section>
{#if latest.length || $latestQuery === undefined}
<section class="latest">
<h2>Most recently added</h2>
{#if $latestQuery == undefined}
<Spinner centered />
{:else}
<table>
{#each latest as [address, added]}
<tr>
<td class="timestamp"
>{formatRelative(added * 1000, new Date())}</td
>
<td class="object"><UpObject link {address} /></td>
</tr>
{/each}
</table>
{/if}
</section>
{/if}
<footer>
<div>