mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 21:16:00 +00:00
fixed keyboard navigation
This commit is contained in:
@@ -77,6 +77,7 @@
|
||||
function getFocusFlatList() {
|
||||
const expanded = $expandedConnections;
|
||||
const opened = $openedConnections;
|
||||
const status = $serverStatus;
|
||||
|
||||
const res = [];
|
||||
for (const con of [...connectionsWithParent, ...connectionsWithoutParent]) {
|
||||
@@ -91,7 +92,7 @@
|
||||
database: con.singleDatabase ? con.defaultDatabase : null,
|
||||
});
|
||||
|
||||
if ((expanded.includes(con._id) && opened.includes(con._id)) || filter) {
|
||||
if ((expanded.includes(con._id) && opened.includes(con._id) && status?.[con._id]?.name == 'ok') || filter) {
|
||||
for (const db of _.sortBy(databases, x => x.sortOrder ?? x.name)) {
|
||||
if (!filterName(filter, con.displayName, con.server, db.name)) {
|
||||
continue;
|
||||
|
||||
@@ -13,6 +13,9 @@
|
||||
export let connection;
|
||||
|
||||
$: serverStatus = useServerStatus();
|
||||
$: focusedServerStatus = $focusedConnectionOrDatabase?.conid
|
||||
? $serverStatus?.[$focusedConnectionOrDatabase?.conid]
|
||||
: null;
|
||||
</script>
|
||||
|
||||
<div class="no-focused-info">
|
||||
@@ -47,9 +50,9 @@
|
||||
/>
|
||||
{/if}
|
||||
{:else}
|
||||
{#if $focusedConnectionOrDatabase?.conid && $serverStatus?.[$focusedConnectionOrDatabase?.conid]?.message}
|
||||
{#if focusedServerStatus?.name == 'error' && focusedServerStatus?.message}
|
||||
<div class="m-1">Error connecting <b>{getConnectionLabel($focusedConnectionOrDatabase?.connection)}</b>:</div>
|
||||
<ErrorInfo message={$serverStatus?.[$focusedConnectionOrDatabase?.conid]?.message} />
|
||||
<ErrorInfo message={focusedServerStatus?.message} />
|
||||
<div class="m-3" />
|
||||
{/if}
|
||||
{#if connection}
|
||||
|
||||
Reference in New Issue
Block a user