mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 12:33:58 +00:00
new query on middle mouse click
This commit is contained in:
@@ -123,7 +123,7 @@
|
|||||||
text: 'Connect',
|
text: 'Connect',
|
||||||
onClick: handleConnect,
|
onClick: handleConnect,
|
||||||
},
|
},
|
||||||
{ onClick: handleNewQuery, text: 'New query' },
|
{ onClick: handleNewQuery, text: 'New query', isNewQuery: true },
|
||||||
$openedConnections.includes(data._id) &&
|
$openedConnections.includes(data._id) &&
|
||||||
data.status && {
|
data.status && {
|
||||||
text: 'Refresh',
|
text: 'Refresh',
|
||||||
@@ -191,10 +191,8 @@
|
|||||||
on:click
|
on:click
|
||||||
on:expand
|
on:expand
|
||||||
on:middleclick={() => {
|
on:middleclick={() => {
|
||||||
if (data.singleDatabase) {
|
_.flattenDeep(getContextMenu())
|
||||||
getDatabaseMenuItems(data, data.defaultDatabase, $extensions, $currentDatabase)
|
.find(x => x.isNewQuery)
|
||||||
.find(x => x.isNewQuery)
|
.onClick();
|
||||||
.onClick();
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
if (tab.props && tab.props.conid && tab.props.database) return tab.props.database;
|
if (tab.props && tab.props.conid && tab.props.database) return tab.props.database;
|
||||||
if (tab.props && tab.props.conid) {
|
if (tab.props && tab.props.conid) {
|
||||||
const connection = connectionList?.find(x => x._id == tab.props.conid);
|
const connection = connectionList?.find(x => x._id == tab.props.conid);
|
||||||
if (connection) return getConnectionLabel(connection.displayName, { allowExplicitDatabase: false });
|
if (connection) return getConnectionLabel(connection, { allowExplicitDatabase: false });
|
||||||
return '???';
|
return '???';
|
||||||
}
|
}
|
||||||
if (tab.props && tab.props.archiveFolder) return tab.props.archiveFolder;
|
if (tab.props && tab.props.archiveFolder) return tab.props.archiveFolder;
|
||||||
|
|||||||
Reference in New Issue
Block a user