Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions apps/tauri/src/ui/ConnectionsPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,6 @@ function treeState(connId: string) {
return tree.stateOf(connId);
}

function filteredRootsFor(connId: string) {
return tree.filteredRootsFor(connId);
}


onUnmounted(() => {
dragging.value = false;
Expand Down Expand Up @@ -407,26 +403,13 @@ onUnmounted(() => {
<QueryaIcon name="refresh" :size="12" />
</button>
</div>
<input
class="filter"
type="search"
placeholder="Filter objects…"
aria-label="Filter objects"
:value="treeState(c.id).filter"
@input="
tree.setFilter(
c.id,
($event.target as HTMLInputElement).value,
)
"
/>
<p v-if="treeState(c.id).loading" class="hint">Loading…</p>
<p v-else-if="treeState(c.id).error" class="hint err">
{{ treeState(c.id).error }}
</p>
<ul v-else class="nodes">
<SqlObjectTreeNodes
:nodes="filteredRootsFor(c.id)"
:nodes="treeState(c.id).roots"
:connection-id="c.id"
:selected-object="selectedObject"
:depth="0"
Expand Down Expand Up @@ -534,26 +517,13 @@ onUnmounted(() => {
<QueryaIcon name="refresh" :size="12" />
</button>
</div>
<input
class="filter"
type="search"
placeholder="Filter objects…"
aria-label="Filter objects"
:value="treeState(c.id).filter"
@input="
tree.setFilter(
c.id,
($event.target as HTMLInputElement).value,
)
"
/>
<p v-if="treeState(c.id).loading" class="hint">Loading…</p>
<p v-else-if="treeState(c.id).error" class="hint err">
{{ treeState(c.id).error }}
</p>
<ul v-else class="nodes">
<SqlObjectTreeNodes
:nodes="filteredRootsFor(c.id)"
:nodes="treeState(c.id).roots"
:connection-id="c.id"
:selected-object="selectedObject"
:depth="0"
Expand Down Expand Up @@ -797,10 +767,6 @@ onUnmounted(() => {
margin-bottom: 4px;
}

.tree .filter {
margin-bottom: 4px;
}

.hint {
margin: 6px 4px;
font-size: 11px;
Expand Down
Loading