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