mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 16:36:00 +00:00
better workflow for askUser, when closing window
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
import { closeCurrentModal, showModal } from './modalTools';
|
||||
import { callServerPing } from '../utility/connectionsPinger';
|
||||
import { getConnectionLabel } from 'dbgate-tools';
|
||||
import { openedConnections } from '../stores';
|
||||
|
||||
export let conid;
|
||||
export let passwordMode;
|
||||
@@ -74,7 +75,11 @@
|
||||
|
||||
onDestroy(() => {
|
||||
currentModalConid = null;
|
||||
if (onCancel && !closedWithOk) onCancel();
|
||||
|
||||
if (!closedWithOk) {
|
||||
if (onCancel) onCancel();
|
||||
openedConnections.update(x => _.without(x, conid));
|
||||
}
|
||||
});
|
||||
|
||||
function handleCancelTest() {
|
||||
@@ -83,8 +88,9 @@
|
||||
}
|
||||
|
||||
async function handleSubmit(ev) {
|
||||
closedWithOk = true;
|
||||
|
||||
if (onConnect) {
|
||||
closedWithOk = true;
|
||||
onConnect({
|
||||
...testedConnection,
|
||||
user: usedPasswordMode == 'askUser' ? $values['user'] : testedConnection.user,
|
||||
|
||||
Reference in New Issue
Block a user