auth db login workflow

This commit is contained in:
Jan Prochazka
2024-08-06 12:45:28 +02:00
parent 5d6d827044
commit 196c0b8a3e
7 changed files with 70 additions and 12 deletions

View File

@@ -551,7 +551,7 @@ registerCommand({
id: 'app.logout',
category: 'App',
name: 'Logout',
testEnabled: () => getCurrentConfig()?.login != null,
testEnabled: () => getCurrentConfig()?.isUserLoggedIn,
onClick: doLogout,
});
@@ -559,7 +559,7 @@ registerCommand({
id: 'app.disconnect',
category: 'App',
name: 'Disconnect',
testEnabled: () => getCurrentConfig()?.singleConnection != null,
testEnabled: () => getCurrentConfig()?.singleConnection != null && !getCurrentConfig()?.isUserLoggedIn,
onClick: () => disconnectServerConnection(getCurrentConfig()?.singleConnection?._id),
});
@@ -873,7 +873,6 @@ registerCommand({
onClick: () => showModal(UploadErrorModal),
});
const electron = getElectron();
if (electron) {
electron.addEventListener('run-command', (e, commandId) => runCommand(commandId));