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

@@ -233,7 +233,7 @@
<style> <style>
.padLeft { .padLeft {
margin-right: 0.25rem; margin-left: 0.25rem;
} }
.padRight { .padRight {

View File

@@ -8,8 +8,9 @@
const currentDb = currentDbArg == getCurrentValueMarker ? getCurrentDatabase() : currentDbArg; const currentDb = currentDbArg == getCurrentValueMarker ? getCurrentDatabase() : currentDbArg;
return ( return (
tab.closedTime == null && tab.closedTime == null &&
(!tab.props?.conid || tab.props?.conid == currentDb?.connection?._id) && (!tab.props?.conid ||
(!tab.props?.database || tab.props?.database == currentDb?.name) !tab.props?.database ||
(tab.props?.conid == currentDb?.connection?._id && tab.props?.database == currentDb?.name))
); );
} }
return tab.closedTime == null; return tab.closedTime == null;
@@ -529,6 +530,9 @@
<span class="file-name"> <span class="file-name">
{tab.title} {tab.title}
</span> </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)} /> <TabCloseButton unsaved={tab.unsaved} on:click={e => closeTab(tab.tabid)} />
</div> </div>
{/each} {/each}