connection tree UX

This commit is contained in:
Jan Prochazka
2024-11-28 17:53:22 +01:00
parent 4fb6128499
commit 2ca17e826c
2 changed files with 24 additions and 7 deletions

View File

@@ -41,6 +41,7 @@
extensions,
focusedConnectionOrDatabase,
getSelectedDatabaseObjectAppObject,
openedConnections,
selectedDatabaseObjectAppObject,
} from '../stores';
import newQuery from '../query/newQuery';
@@ -230,11 +231,13 @@
<div class="m-1 ml-3 mb-3">
<b>{getConnectionLabel($connection)}</b>
</div>
<FormStyledButton
value={`Connect to ${getConnectionLabel($focusedConnectionOrDatabase?.connection)}`}
skipWidth
on:click={() => openConnection($focusedConnectionOrDatabase?.connection)}
/>
{#if !$openedConnections.includes($focusedConnectionOrDatabase?.conid)}
<FormStyledButton
value={`Connect to ${getConnectionLabel($focusedConnectionOrDatabase?.connection)}`}
skipWidth
on:click={() => openConnection($focusedConnectionOrDatabase?.connection)}
/>
{/if}
<FormStyledButton
value={`Show ${getConnectionLabel($connection)}`}
skipWidth