|
|
@ -29,19 +29,22 @@ import { |
|
|
}) |
|
|
}) |
|
|
export class AppsMenuComponent implements OnDestroy, OnInit { |
|
|
export class AppsMenuComponent implements OnDestroy, OnInit { |
|
|
private appsSubscription: Subscription; |
|
|
private appsSubscription: Subscription; |
|
|
|
|
|
private appSubscription: Subscription; |
|
|
|
|
|
|
|
|
public modalMenu = new ModalView(false, true); |
|
|
public modalMenu = new ModalView(false, true); |
|
|
public modalDialog = new ModalView(); |
|
|
public modalDialog = new ModalView(); |
|
|
|
|
|
|
|
|
public apps: AppDto[] = []; |
|
|
public apps: AppDto[] = []; |
|
|
|
|
|
public selectedApp: AppDto; |
|
|
|
|
|
|
|
|
constructor(public readonly ctx: AppContext, |
|
|
constructor( |
|
|
private readonly appsStore: AppsStoreService |
|
|
private readonly appsStore: AppsStoreService |
|
|
) { |
|
|
) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnDestroy() { |
|
|
public ngOnDestroy() { |
|
|
this.appsSubscription.unsubscribe(); |
|
|
this.appsSubscription.unsubscribe(); |
|
|
|
|
|
this.appSubscription.unsubscribe(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public ngOnInit() { |
|
|
public ngOnInit() { |
|
|
@ -49,6 +52,11 @@ export class AppsMenuComponent implements OnDestroy, OnInit { |
|
|
this.appsStore.apps.subscribe(apps => { |
|
|
this.appsStore.apps.subscribe(apps => { |
|
|
this.apps = apps; |
|
|
this.apps = apps; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.appSubscription = |
|
|
|
|
|
this.appsStore.selectedApp.subscribe(app => { |
|
|
|
|
|
this.selectedApp = app; |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public createApp() { |
|
|
public createApp() { |
|
|
|