[ui] under 1080px screen height, scroll entire content of browse scroll

feat/vaults
Tomáš Mládek 2022-02-15 23:31:17 +01:00
parent c27c9dbb0a
commit a1f1847ead
No known key found for this signature in database
GPG Key ID: 65E225C8B3E2ED8A
1 changed files with 58 additions and 42 deletions

View File

@ -181,6 +181,8 @@
<Spinner centered />
{/if}
</h2>
</header>
<div class="main-content">
{#if groups?.length || editable}
<section class="groups labelborder">
<header><h3>Groups</h3></header>
@ -210,61 +212,63 @@
</div>
</section>
{/if}
</header>
<BlobPreview {address} {editable} {detail} />
<NotesEditor {address} {editable} on:change={onChange} />
{#if !$error}
{#if Boolean($allTypeEntries)}
<div class="attributes">
{#each Object.entries(typedAttributes) as [typeAddr, entries] (typeAddr)}
<AttributeView
{entries}
type={allTypes[typeAddr]}
{editable}
on:change={onChange}
/>
{/each}
<BlobPreview {address} {editable} {detail} />
<NotesEditor {address} {editable} on:change={onChange} />
{#if !$error}
{#if Boolean($allTypeEntries)}
<div class="attributes">
{#each Object.entries(typedAttributes) as [typeAddr, entries] (typeAddr)}
<AttributeView
{entries}
type={allTypes[typeAddr]}
{editable}
on:change={onChange}
/>
{/each}
{#if currentUntypedAttributes.length > 0 || editable}
<AttributeView
title="Other attributes"
{editable}
entries={currentUntypedAttributes}
on:change={onChange}
/>
{/if}
{#if currentUntypedAttributes.length > 0 || editable}
<AttributeView
title="Other attributes"
{editable}
entries={currentUntypedAttributes}
on:change={onChange}
/>
{/if}
{#if currentBacklinks.length > 0}
<AttributeView
title={`Referred to (${$entity.backlinks.length})`}
entries={currentBacklinks}
reverse
on:change={onChange}
/>
{/if}
</div>
{#if currentBacklinks.length > 0}
<AttributeView
title={`Referred to (${$entity.backlinks.length})`}
entries={currentBacklinks}
reverse
on:change={onChange}
/>
{/if}
</div>
{:else}
<Spinner centered />
{/if}
{:else}
<Spinner centered />
<div class="error">
{$error}
</div>
{/if}
{:else}
<div class="error">
{$error}
</div>
{/if}
</div>
</div>
<style scoped lang="scss">
@use "./util";
.inspect {
header h2 {
margin-bottom: 0;
}
.inspect,
.main-content {
flex: auto;
display: flex;
flex-direction: column;
gap: 0.5rem;
h2 {
margin-bottom: 0;
}
min-height: 0;
}
.groups {
@ -292,6 +296,18 @@
overflow-y: auto;
}
@media screen and (max-height: 1080px) {
.main-content {
overflow-y: scroll;
// min-height: 0;
}
.attributes {
height: unset;
overflow-y: unset;
}
}
.error {
color: red;
}