From 3cfcf8fddc3a8f844975443330e0b295d2918281 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Fri, 2 Mar 2018 15:48:45 +0100 Subject: [PATCH] Refactor setButtonState family of callbacks --- src/app/webide/webide.component.html | 2 +- src/app/webide/webide.component.ts | 14 +++++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/app/webide/webide.component.html b/src/app/webide/webide.component.html index 9ae5301..abee9d4 100644 --- a/src/app/webide/webide.component.html +++ b/src/app/webide/webide.component.html @@ -9,7 +9,7 @@ -
{ this.setDeployButtonStateDeployed(); }); + this.processManagerService.subscribeCallback('login', (event) => { this.setDeployButtonState('DEPLOYED'); }); this.resetAutoSaveCountdown(); } @@ -100,16 +100,12 @@ export class WebideComponent implements OnInit { this.requestCode(); } - setSaveButtonStateDirty() { - this.saveButtonState = 'DIRTY'; + setSaveButtonState(state: string) { + this.saveButtonState = state; } - setDeployButtonStateDeployed() { - this.deployButtonState = 'DEPLOYED'; - } - - setDeployButtonStateTodeploy() { - this.deployButtonState = 'TODEPLOY'; + setDeployButtonState(state: string) { + this.deployButtonState = state; } deployCode() {