mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 01:26:01 +00:00
ability to disable tab preview mode
This commit is contained in:
@@ -7,6 +7,7 @@ import localforage from 'localforage';
|
||||
import stableStringify from 'json-stable-stringify';
|
||||
import { saveAllPendingEditorData } from '../query/useEditorData';
|
||||
import { getConnectionInfo } from './metadataLoaders';
|
||||
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||
|
||||
function findFreeNumber(numbers: number[]) {
|
||||
if (numbers.length == 0) return 1;
|
||||
@@ -22,6 +23,13 @@ export default async function openNewTab(newTab, initialData: any = undefined, o
|
||||
|
||||
let existing = null;
|
||||
|
||||
if (!getBoolSettingsValue('behaviour.useTabPreviewMode', true) && newTab.tabPreviewMode) {
|
||||
newTab = {
|
||||
...newTab,
|
||||
tabPreviewMode: false,
|
||||
};
|
||||
}
|
||||
|
||||
const { savedFile, savedFolder, savedFilePath, conid, database } = newTab.props || {};
|
||||
|
||||
if (conid && database) {
|
||||
|
||||
Reference in New Issue
Block a user