mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 05:51:55 +00:00
Update webide frontend to emphasize that a process is being reloaded
This commit is contained in:
parent
0779ad2ef6
commit
52298cbd8c
@ -23,8 +23,8 @@
|
|||||||
type="submit"
|
type="submit"
|
||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
[class.btn-success]="saveButtonState === 'SAVED'"
|
[class.btn-success]="saveButtonState === 'SAVED'"
|
||||||
[class.btn-warning]="saveButtonState === 'SAVING'"
|
[class.btn-info]="saveButtonState === 'SAVING'"
|
||||||
[class.disabled]="saveButtonState === 'SAVING'"
|
[class.disabled]="saveButtonState === 'SAVING'"
|
||||||
><span *ngIf="saveButtonState === 'DIRTY'">Save!</span>
|
><span *ngIf="saveButtonState === 'DIRTY'">Save!</span>
|
||||||
<span *ngIf="saveButtonState === 'SAVED'">Saved!</span>
|
<span *ngIf="saveButtonState === 'SAVED'">Done!</span>
|
||||||
<span *ngIf="saveButtonState === 'SAVING'">Saving...</span></button>
|
<span *ngIf="saveButtonState === 'SAVING'">Reloading...</span></button>
|
||||||
|
@ -36,7 +36,7 @@ export class WebideComponent implements OnInit {
|
|||||||
command_handlers = { 'reload': this.reloadHandler.bind(this),
|
command_handlers = { 'reload': this.reloadHandler.bind(this),
|
||||||
'read': this.readHandler.bind(this),
|
'read': this.readHandler.bind(this),
|
||||||
'select': this.selectHandler.bind(this),
|
'select': this.selectHandler.bind(this),
|
||||||
'write': this.writeHandler.bind(this)};
|
'write': () => {}};
|
||||||
|
|
||||||
constructor(private webSocketService: WebSocketService,
|
constructor(private webSocketService: WebSocketService,
|
||||||
private changeDetectorRef: ChangeDetectorRef,
|
private changeDetectorRef: ChangeDetectorRef,
|
||||||
@ -47,7 +47,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) => { console.log('CICÁK!!'); });
|
this.processManagerService.subscribeCallback('login', (event) => { this.setButtonStateSaved(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
subscribeWS() {
|
subscribeWS() {
|
||||||
@ -76,7 +76,7 @@ export class WebideComponent implements OnInit {
|
|||||||
this.updateFileData(data);
|
this.updateFileData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
writeHandler(data: SourceCode) {
|
setButtonStateSaved() {
|
||||||
this.saveButtonState = 'SAVED';
|
this.saveButtonState = 'SAVED';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user