mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 03:26:00 +00:00
ability to disable tab preview mode
This commit is contained in:
@@ -287,6 +287,7 @@
|
|||||||
'img import': 'mdi mdi-database-import color-icon-green',
|
'img import': 'mdi mdi-database-import color-icon-green',
|
||||||
'img export': 'mdi mdi-database-export color-icon-green',
|
'img export': 'mdi mdi-database-export color-icon-green',
|
||||||
'img transform': 'mdi mdi-rotate-orbit color-icon-blue',
|
'img transform': 'mdi mdi-rotate-orbit color-icon-blue',
|
||||||
|
'img tip': 'mdi mdi-lightbulb-on color-icon-yellow',
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ ORDER BY
|
|||||||
{ label: 'Connection', slot: 2 },
|
{ label: 'Connection', slot: 2 },
|
||||||
{ label: 'Themes', slot: 3 },
|
{ label: 'Themes', slot: 3 },
|
||||||
{ label: 'Default Actions', slot: 4 },
|
{ label: 'Default Actions', slot: 4 },
|
||||||
{ label: 'Confirmations', slot: 5 },
|
{ label: 'Behaviour', slot: 5 },
|
||||||
{ label: 'Other', slot: 6 },
|
{ label: 'Other', slot: 6 },
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
@@ -331,6 +331,17 @@ ORDER BY
|
|||||||
/>
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="5">
|
<svelte:fragment slot="5">
|
||||||
|
<div class="heading">Behaviour</div>
|
||||||
|
|
||||||
|
<FormCheckboxField name="behaviour.useTabPreviewMode" label="Use tab preview mode" defaultValue={true} />
|
||||||
|
|
||||||
|
<div class="tip">
|
||||||
|
<FontIcon icon="img tip" /> When you single-click or select a file in the "Tables, Views, Functions" view, it
|
||||||
|
is shown in a preview mode and reuses an existing tab (preview tab). This is useful if you are quickly browsing
|
||||||
|
tables and don't want every visited table to have its own tab. When you start editing the table or use double-click
|
||||||
|
to open the table from the "Tables" view, a new tab is dedicated to that table.
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="heading">Confirmations</div>
|
<div class="heading">Confirmations</div>
|
||||||
|
|
||||||
<FormCheckboxField name="skipConfirm.tableDataSave" label="Skip confirmation when saving table data (SQL)" />
|
<FormCheckboxField name="skipConfirm.tableDataSave" label="Skip confirmation when saving table data (SQL)" />
|
||||||
@@ -405,6 +416,11 @@ ORDER BY
|
|||||||
margin-top: var(--dim-large-form-margin);
|
margin-top: var(--dim-large-form-margin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tip {
|
||||||
|
margin-left: var(--dim-large-form-margin);
|
||||||
|
margin-top: var(--dim-large-form-margin);
|
||||||
|
}
|
||||||
|
|
||||||
.themes {
|
.themes {
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import localforage from 'localforage';
|
|||||||
import stableStringify from 'json-stable-stringify';
|
import stableStringify from 'json-stable-stringify';
|
||||||
import { saveAllPendingEditorData } from '../query/useEditorData';
|
import { saveAllPendingEditorData } from '../query/useEditorData';
|
||||||
import { getConnectionInfo } from './metadataLoaders';
|
import { getConnectionInfo } from './metadataLoaders';
|
||||||
|
import { getBoolSettingsValue } from '../settings/settingsTools';
|
||||||
|
|
||||||
function findFreeNumber(numbers: number[]) {
|
function findFreeNumber(numbers: number[]) {
|
||||||
if (numbers.length == 0) return 1;
|
if (numbers.length == 0) return 1;
|
||||||
@@ -22,6 +23,13 @@ export default async function openNewTab(newTab, initialData: any = undefined, o
|
|||||||
|
|
||||||
let existing = null;
|
let existing = null;
|
||||||
|
|
||||||
|
if (!getBoolSettingsValue('behaviour.useTabPreviewMode', true) && newTab.tabPreviewMode) {
|
||||||
|
newTab = {
|
||||||
|
...newTab,
|
||||||
|
tabPreviewMode: false,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
const { savedFile, savedFolder, savedFilePath, conid, database } = newTab.props || {};
|
const { savedFile, savedFolder, savedFilePath, conid, database } = newTab.props || {};
|
||||||
|
|
||||||
if (conid && database) {
|
if (conid && database) {
|
||||||
|
|||||||
Reference in New Issue
Block a user