BUGFIX switching active sessions in configuration
diff --git a/frontend/config/config.component.html b/frontend/config/config.component.html
index 071778e..654b94c 100644
--- a/frontend/config/config.component.html
+++ b/frontend/config/config.component.html
@@ -1,6 +1,6 @@
<nav #navbar>
<a *ngFor="let session of sessionsService.sessions" [class.active]="session.key==activeSession.key"
- (click)="activeSession.key = session.key">{{session.device.hostname}}:{{session.device.port}}
+ (click)="changeActiveSession(session.key)">{{session.device.hostname}}:{{session.device.port}}
<span *ngIf="session.key==activeSession.key" class="tab-reload tab-action-first" (click)="reloadData(session.key)">o</span>
<span class="tab-close tab-action-last" (click)="disconnect(session.key)">x</span>
</a><a (click)="addSession()"><span class="tab-add tab-action-first tab-action-last">+</span></a>
diff --git a/frontend/config/config.component.ts b/frontend/config/config.component.ts
index 3ea20cd..0618771 100644
--- a/frontend/config/config.component.ts
+++ b/frontend/config/config.component.ts
@@ -125,6 +125,11 @@
this.activeSession = this.sessionsService.getActiveSession(this.sessionsService.activeSession);
}
+ changeActiveSession(key: string) {
+ this.sessionsService.activeSession = key;
+ this.activeSession = this.sessionsService.getActiveSession(this.sessionsService.activeSession);
+ }
+
ngOnDestroy(): void {
this.sessionsService.changingView();
}