mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-28 03:41:48 +08:00
CB-2781 close connection search dialog on logout (#1343)
* CB-2781 close connection search dialog on logout * CB-2781 remove extra subscription
This commit is contained in:
@@ -16,7 +16,7 @@ import { NotificationService } from '@cloudbeaver/core-events';
|
||||
import { Executor, ExecutorInterrupter, IExecutionContextProvider, IExecutorHandler } from '@cloudbeaver/core-executor';
|
||||
import { ISessionAction, ServerConfigResource, sessionActionContext, SessionActionService, SessionDataResource } from '@cloudbeaver/core-root';
|
||||
import { ScreenService } from '@cloudbeaver/core-routing';
|
||||
import { WindowsService } from '@cloudbeaver/core-ui';
|
||||
import { NavigationService, WindowsService } from '@cloudbeaver/core-ui';
|
||||
|
||||
import { AuthDialogService } from './Dialog/AuthDialogService';
|
||||
import type { IAuthOptions } from './IAuthOptions';
|
||||
@@ -47,13 +47,16 @@ export class AuthenticationService extends Bootstrap {
|
||||
private readonly authInfoService: AuthInfoService,
|
||||
private readonly serverConfigResource: ServerConfigResource,
|
||||
private readonly windowsService: WindowsService,
|
||||
private readonly sessionActionService: SessionActionService
|
||||
private readonly sessionActionService: SessionActionService,
|
||||
private readonly navigationService: NavigationService,
|
||||
) {
|
||||
super();
|
||||
|
||||
this.onLogout = new Executor();
|
||||
this.onLogin = new Executor();
|
||||
|
||||
this.onLogout.before(this.navigationService.navigationTask);
|
||||
|
||||
this.authPromise = null;
|
||||
this.configureAuthProvider = null;
|
||||
this.configureIdentityProvider = null;
|
||||
|
||||
@@ -39,7 +39,7 @@ export class ConnectionSearchService {
|
||||
private readonly commonDialogService: CommonDialogService,
|
||||
private readonly projectsService: ProjectsService,
|
||||
private readonly projectInfoResource: ProjectInfoResource,
|
||||
private readonly connectionsManagerService: ConnectionsManagerService
|
||||
private readonly connectionsManagerService: ConnectionsManagerService,
|
||||
) {
|
||||
this.optionsPanelService.closeTask.addHandler(this.closeHandler);
|
||||
|
||||
|
||||
-9
@@ -57,15 +57,6 @@ export class PublicConnectionFormService {
|
||||
}
|
||||
});
|
||||
|
||||
this.authenticationService.onLogout.addHandler(async (event, context) => {
|
||||
if (event === 'before') {
|
||||
const confirmed = await this.close(false);
|
||||
if (!confirmed) {
|
||||
ExecutorInterrupter.interrupt(context);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
makeObservable(this, {
|
||||
formState: observable.shallow,
|
||||
change: action,
|
||||
|
||||
Reference in New Issue
Block a user