don't render before allTypeEntries loaded, unify spinner look
parent
8894afa736
commit
5e045cd85e
|
@ -42,7 +42,7 @@
|
|||
@import url("/assets/fonts/inter.css");
|
||||
|
||||
$primary: #2c3e50;
|
||||
$primary-lighter: #394F66;
|
||||
$primary-lighter: #394f66;
|
||||
$background: white;
|
||||
|
||||
html {
|
||||
|
@ -129,4 +129,13 @@
|
|||
a:visited {
|
||||
color: var(--foreground);
|
||||
}
|
||||
|
||||
sl-spinner {
|
||||
font-size: 2em;
|
||||
--track-width: 6px;
|
||||
|
||||
position: relative;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -83,41 +83,47 @@
|
|||
<h2>
|
||||
{#if $entity}
|
||||
<Address banner {address} />
|
||||
{:else}
|
||||
<sl-spinner />
|
||||
{/if}
|
||||
</h2>
|
||||
<BlobPreview {address} />
|
||||
{#if !$error}
|
||||
<div class="attributes">
|
||||
{#each Object.entries(typedAttributes) as [typeAddr, entries] (typeAddr)}
|
||||
<AttributeView
|
||||
{address}
|
||||
{entries}
|
||||
type={allTypes[typeAddr]}
|
||||
{editable}
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/each}
|
||||
{#if Boolean($allTypeEntries)}
|
||||
<div class="attributes">
|
||||
{#each Object.entries(typedAttributes) as [typeAddr, entries] (typeAddr)}
|
||||
<AttributeView
|
||||
{address}
|
||||
{entries}
|
||||
type={allTypes[typeAddr]}
|
||||
{editable}
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/each}
|
||||
|
||||
{#if untypedAttributes.length > 0 || editable}
|
||||
<AttributeView
|
||||
title="Other attributes"
|
||||
{editable}
|
||||
{address}
|
||||
entries={untypedAttributes}
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/if}
|
||||
{#if untypedAttributes.length > 0 || editable}
|
||||
<AttributeView
|
||||
title="Other attributes"
|
||||
{editable}
|
||||
{address}
|
||||
entries={untypedAttributes}
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
{#if $entity?.backlinks.length > 0}
|
||||
<AttributeView
|
||||
title={`Referred to (${$entity.backlinks.length})`}
|
||||
{address}
|
||||
entries={$entity.backlinks}
|
||||
reverse
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{#if $entity?.backlinks.length > 0}
|
||||
<AttributeView
|
||||
title={`Referred to (${$entity.backlinks.length})`}
|
||||
{address}
|
||||
entries={$entity.backlinks}
|
||||
reverse
|
||||
on:changed={revalidate}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{:else}
|
||||
<sl-spinner />
|
||||
{/if}
|
||||
{:else}
|
||||
<div class="error">
|
||||
{JSON.stringify($error)}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<section class="roots">
|
||||
<h2>Roots</h2>
|
||||
{#await roots}
|
||||
<sl-spinner style="font-size: 3rem; --track-width: 6px" />
|
||||
<sl-spinner />
|
||||
{:then data}
|
||||
<ul>
|
||||
{#each data as root}
|
||||
|
@ -63,7 +63,7 @@
|
|||
<section class="latest">
|
||||
<h2>Most recently added files</h2>
|
||||
{#await latestFiles}
|
||||
<sl-spinner style="font-size: 3rem; --track-width: 6px" />
|
||||
<sl-spinner />
|
||||
{:then data}
|
||||
<table>
|
||||
{#each data as file}
|
||||
|
@ -98,12 +98,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
sl-spinner {
|
||||
position: relative;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.roots {
|
||||
ul {
|
||||
list-style: none;
|
||||
|
|
Loading…
Reference in New Issue