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