mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 20:46:01 +00:00
focus connection or database WIP
This commit is contained in:
@@ -83,6 +83,7 @@
|
||||
currentDatabase,
|
||||
expandedConnections,
|
||||
extensions,
|
||||
focusedConnectionOrDatabase,
|
||||
getCurrentConfig,
|
||||
getCurrentDatabase,
|
||||
getCurrentSettings,
|
||||
@@ -135,7 +136,7 @@
|
||||
});
|
||||
};
|
||||
|
||||
const handleClick = async () => {
|
||||
const handleDoubleClick = async () => {
|
||||
const config = getCurrentConfig();
|
||||
if (config.runAsPortal) {
|
||||
await tick();
|
||||
@@ -158,6 +159,10 @@
|
||||
}
|
||||
};
|
||||
|
||||
const handleClick = async (e) => {
|
||||
focusedConnectionOrDatabase.set({ conid: data?._id });
|
||||
};
|
||||
|
||||
const handleSqlRestore = () => {
|
||||
showModal(ImportDatabaseDumpModal, {
|
||||
connection: data,
|
||||
@@ -328,6 +333,7 @@
|
||||
{extInfo}
|
||||
colorMark={passProps?.connectionColorFactory && passProps?.connectionColorFactory({ conid: data._id })}
|
||||
menu={getContextMenu}
|
||||
on:dblclick={handleDoubleClick}
|
||||
on:click={handleClick}
|
||||
on:click
|
||||
on:expand
|
||||
@@ -337,4 +343,5 @@
|
||||
.find(x => x.isNewQuery)
|
||||
.onClick();
|
||||
}}
|
||||
isChoosed={data._id == $focusedConnectionOrDatabase?.conid && !$focusedConnectionOrDatabase?.database}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user