mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-15 23:41:55 +00:00
Refactor setButtonState family of callbacks
This commit is contained in:
parent
3266854db8
commit
3cfcf8fddc
@ -9,7 +9,7 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div (keypress)="setSaveButtonStateDirty(); setDeployButtonStateTodeploy(); resetAutoSaveCountdown()"
|
||||
<div (keypress)="setSaveButtonState('DIRTY'); setDeployButtonState('TODEPLOY'); resetAutoSaveCountdown()"
|
||||
ace-editor
|
||||
[(text)]="code"
|
||||
[mode]="language"
|
||||
|
@ -50,7 +50,7 @@ export class WebideComponent implements OnInit {
|
||||
this.subscribeWS();
|
||||
this.requestCode();
|
||||
this.processManagerService.init();
|
||||
this.processManagerService.subscribeCallback('login', (event) => { 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() {
|
||||
|
Loading…
Reference in New Issue
Block a user