diff --git a/frontend/src/components/grid-items.svelte b/frontend/src/components/grid-items.svelte index c3d7624..e93b0a6 100644 --- a/frontend/src/components/grid-items.svelte +++ b/frontend/src/components/grid-items.svelte @@ -40,14 +40,16 @@ } function select(itemKey) { - activeKey = itemKey; - if (level === 0) { - activePath = [ itemKey ]; + if (activeKey !== itemKey) { + activeKey = itemKey; + if (level === 0) { + activePath = [ itemKey ]; + } + else { + activePath = [ ...path, itemKey ]; + } + dispatch('select', { level, itemKey }); } - else { - activePath = [ ...path, itemKey ]; - } - dispatch('select', { level, itemKey }); } function closeAll() { diff --git a/frontend/src/components/tabbar.svelte b/frontend/src/components/tabbar.svelte index 475ccbd..c9668e1 100644 --- a/frontend/src/components/tabbar.svelte +++ b/frontend/src/components/tabbar.svelte @@ -1,8 +1,10 @@ removeView(e.detail)} + bind:selectedKey={activeViewKey} /> - {#if activeTab === 'list'} - - - - Hide object indicators ({'{...}'} and [...]) in list view and show nothing instead + {#if $views[activeViewKey]} + + {#key activeViewKey} + + View name + + + {/key} + + View type + + List view + Table view + - {:else if activeTab === 'table'} - {#each config.columns as column, columnIndex} - - - + + {#if $views[activeViewKey].type === 'list'} + + + + Hide object indicators ({'{...}'} and [...]) in list view and show nothing instead - addColumn(columnIndex)} title="Add column before this one"> - - - moveColumn(columnIndex, -1)} disabled={columnIndex === 0} title="Move column one position up"> - - - moveColumn(columnIndex, 1)} disabled={columnIndex === config.columns.length - 1} title="Move column one position down"> - - - removeColumn(columnIndex)} title="Remove this column"> - - - {/each} - - Add column - - - Add suggested columns - + {:else if $views[activeViewKey].type === 'table'} + {#each $views[activeViewKey].columns as column, columnIndex} + + + + + addColumn(columnIndex)} title="Add column before this one"> + + + moveColumn(columnIndex, -1)} disabled={columnIndex === 0} title="Move column one position up"> + + + moveColumn(columnIndex, 1)} disabled={columnIndex === $views[activeViewKey].columns.length - 1} title="Move column one position down"> + + + removeColumn(columnIndex)} title="Remove this column"> + + + + {/each} + + Add column + + + Add suggested columns + + {/if} {/if} @@ -105,9 +160,17 @@ padding: 1rem; } + .meta { + display: grid; + grid-template: 1fr / 1fr 1fr; + gap: 0.5rem; + margin-bottom: 1rem; + } + .flex { display: flex; gap: 0.5rem; + align-items: center; } .column { diff --git a/frontend/src/organisms/connection/collection/find.svelte b/frontend/src/organisms/connection/collection/find.svelte index 8eb6601..d6497a8 100644 --- a/frontend/src/organisms/connection/collection/find.svelte +++ b/frontend/src/organisms/connection/collection/find.svelte @@ -1,5 +1,5 @@