feat(webui): all column sections can now be hidden
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
b3796d362c
commit
d29df7ef9a
7 changed files with 10 additions and 8 deletions
|
@ -14,7 +14,7 @@
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
export let entities: string[];
|
export let entities: string[];
|
||||||
export let hide = false;
|
export let hidden = false;
|
||||||
|
|
||||||
export let header = '';
|
export let header = '';
|
||||||
export let icon: string | null = null;
|
export let icon: string | null = null;
|
||||||
|
@ -40,7 +40,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LabelBorder {hide}>
|
<LabelBorder {hidden}>
|
||||||
<span slot="header"
|
<span slot="header"
|
||||||
>{#if icon}<Icon plain name={icon} />
|
>{#if icon}<Icon plain name={icon} />
|
||||||
{/if}{header}</span
|
{/if}{header}</span
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LabelBorder hide={entries.length === 0 && entities.length === 0}>
|
<LabelBorder hidden={entries.length === 0 && entities.length === 0}>
|
||||||
<svelte:fragment slot="header-full">
|
<svelte:fragment slot="header-full">
|
||||||
<h3 class:highlighted>
|
<h3 class:highlighted>
|
||||||
{#if group}
|
{#if group}
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
entities={Object.keys(groups)}
|
entities={Object.keys(groups)}
|
||||||
header={$i18n.t('Groups') || ''}
|
header={$i18n.t('Groups') || ''}
|
||||||
icon="link-alt"
|
icon="link-alt"
|
||||||
hide={Object.keys(groups).length === 0}
|
hidden={Object.keys(groups).length === 0}
|
||||||
on:add={(e) => addGroup(e.detail)}
|
on:add={(e) => addGroup(e.detail)}
|
||||||
on:remove={(e) => removeGroup(e.detail)}
|
on:remove={(e) => removeGroup(e.detail)}
|
||||||
on:highlighted
|
on:highlighted
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
const addresses = context ? context.addresses : readable([]);
|
const addresses = context ? context.addresses : readable([]);
|
||||||
|
|
||||||
function onClick(ev: MouseEvent) {
|
function onClick(ev: MouseEvent) {
|
||||||
|
ev.preventDefault();
|
||||||
|
ev.stopPropagation();
|
||||||
if (window.location.pathname.startsWith('/browse')) {
|
if (window.location.pathname.startsWith('/browse')) {
|
||||||
let newAddresses = $addresses.concat();
|
let newAddresses = $addresses.concat();
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
on:click
|
on:click|preventDefault|stopPropagation
|
||||||
class:active
|
class:active
|
||||||
class:outline
|
class:outline
|
||||||
class:subdued
|
class:subdued
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { slide } from 'svelte/transition';
|
import { slide } from 'svelte/transition';
|
||||||
|
|
||||||
export let hide = false;
|
export let hide = true;
|
||||||
let hidden = true;
|
export let hidden = true;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<section class="labelborder" class:hide class:hidden>
|
<section class="labelborder" class:hide class:hidden>
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<LabelBorder hide={!notes?.length}>
|
<LabelBorder hidden={!notes?.length}>
|
||||||
<span slot="header"><Icon plain name="note" /> {$i18n.t('Notes')}</span>
|
<span slot="header"><Icon plain name="note" /> {$i18n.t('Notes')}</span>
|
||||||
<div class="notes" contenteditable on:input={onInput} bind:this={contentEl}>
|
<div class="notes" contenteditable on:input={onInput} bind:this={contentEl}>
|
||||||
{#each (notes || '\n').split('\n') as line, idx}
|
{#each (notes || '\n').split('\n') as line, idx}
|
||||||
|
|
Loading…
Reference in a new issue