mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 20:46:01 +00:00
renamed singleDatabaseMode to lockedDatabaseMode
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
<script lang="ts" context="module">
|
||||
const getCurrentValueMarker: any = {};
|
||||
|
||||
export function shouldShowTab(tab, singleDbMode = getCurrentValueMarker, currentDb = getCurrentValueMarker) {
|
||||
if (singleDbMode == getCurrentValueMarker) {
|
||||
singleDbMode = getSingleDatabaseMode();
|
||||
export function shouldShowTab(tab, lockedDbMode = getCurrentValueMarker, currentDb = getCurrentValueMarker) {
|
||||
if (lockedDbMode == getCurrentValueMarker) {
|
||||
lockedDbMode = getLockedDatabaseMode();
|
||||
}
|
||||
if (singleDbMode) {
|
||||
if (lockedDbMode) {
|
||||
if (currentDb == getCurrentValueMarker) {
|
||||
currentDb = getCurrentDatabase();
|
||||
}
|
||||
@@ -250,8 +250,8 @@
|
||||
activeTabId,
|
||||
getActiveTabId,
|
||||
getCurrentDatabase,
|
||||
singleDatabaseMode,
|
||||
getSingleDatabaseMode,
|
||||
lockedDatabaseMode,
|
||||
getLockedDatabaseMode,
|
||||
} from '../stores';
|
||||
import tabs from '../tabs';
|
||||
import { setSelectedTab } from '../utility/common';
|
||||
@@ -264,7 +264,7 @@
|
||||
import TabCloseButton from '../elements/TabCloseButton.svelte';
|
||||
import CloseTabModal from '../modals/CloseTabModal.svelte';
|
||||
|
||||
$: showTabFilterFunc = tab => shouldShowTab(tab, $singleDatabaseMode, $currentDatabase);
|
||||
$: showTabFilterFunc = tab => shouldShowTab(tab, $lockedDatabaseMode, $currentDatabase);
|
||||
$: connectionList = useConnectionList();
|
||||
|
||||
$: currentDbKey =
|
||||
@@ -443,7 +443,7 @@
|
||||
<div class="tabs" on:wheel={handleTabsWheel} bind:this={domTabs}>
|
||||
{#each groupedTabs as tabGroup}
|
||||
<div class="db-wrapper">
|
||||
{#if !$singleDatabaseMode}
|
||||
{#if !$lockedDatabaseMode}
|
||||
<div
|
||||
class="db-name"
|
||||
class:selected={draggingDbGroup
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
visibleSelectedWidget,
|
||||
visibleWidgetSideBar,
|
||||
visibleHamburgerMenuWidget,
|
||||
singleDatabaseMode,
|
||||
lockedDatabaseMode,
|
||||
} from '../stores';
|
||||
import mainMenuDefinition from '../../../../app/src/mainMenuDefinition';
|
||||
import hasPermission from '../utility/hasPermission';
|
||||
@@ -112,12 +112,12 @@
|
||||
|
||||
<div
|
||||
class="wrapper"
|
||||
title={`Toggle whether tabs from all databases are visible. Currently - ${$singleDatabaseMode ? 'NO' : 'YES'}`}
|
||||
title={`Toggle whether tabs from all databases are visible. Currently - ${$lockedDatabaseMode ? 'NO' : 'YES'}`}
|
||||
on:click={() => {
|
||||
$singleDatabaseMode = !$singleDatabaseMode;
|
||||
$lockedDatabaseMode = !$lockedDatabaseMode;
|
||||
}}
|
||||
>
|
||||
<FontIcon icon={$singleDatabaseMode ? 'icon single-database-mode' : 'icon multi-database-mode'} />
|
||||
<FontIcon icon={$lockedDatabaseMode ? 'icon locked-database-mode' : 'icon unlocked-database-mode'} />
|
||||
</div>
|
||||
<div class="wrapper" on:click={handleSettingsMenu} bind:this={domSettings}>
|
||||
<FontIcon icon="icon settings" />
|
||||
|
||||
Reference in New Issue
Block a user