fixed show DB

This commit is contained in:
Jan Prochazka
2023-02-03 09:33:38 +01:00
parent dad9e3ea48
commit dc6eff7f9e
2 changed files with 7 additions and 3 deletions

View File

@@ -8,8 +8,9 @@
const currentDb = currentDbArg == getCurrentValueMarker ? getCurrentDatabase() : currentDbArg;
return (
tab.closedTime == null &&
(!tab.props?.conid || tab.props?.conid == currentDb?.connection?._id) &&
(!tab.props?.database || tab.props?.database == currentDb?.name)
(!tab.props?.conid ||
!tab.props?.database ||
(tab.props?.conid == currentDb?.connection?._id && tab.props?.database == currentDb?.name))
);
}
return tab.closedTime == null;
@@ -529,6 +530,9 @@
<span class="file-name">
{tab.title}
</span>
{#if $lockedDatabaseMode && tab.props?.conid && tab.props?.conid != $currentDatabase?.connection?._id}
<FontIcon icon="img warn" padLeft title="This tab is bound to different server than actual DB" />
{/if}
<TabCloseButton unsaved={tab.unsaved} on:click={e => closeTab(tab.tabid)} />
</div>
{/each}