mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 03:11:56 +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"
|
||||
class="btn btn-secondary"
|
||||
[class.btn-success]="saveButtonState === 'SAVED'"
|
||||
[class.btn-warning]="saveButtonState === 'SAVING'"
|
||||
[class.btn-info]="saveButtonState === 'SAVING'"
|
||||
[class.disabled]="saveButtonState === 'SAVING'"
|
||||
><span *ngIf="saveButtonState === 'DIRTY'">Save!</span>
|
||||
<span *ngIf="saveButtonState === 'SAVED'">Saved!</span>
|
||||
<span *ngIf="saveButtonState === 'SAVING'">Saving...</span></button>
|
||||
<span *ngIf="saveButtonState === 'SAVED'">Done!</span>
|
||||
<span *ngIf="saveButtonState === 'SAVING'">Reloading...</span></button>
|
||||
|
@ -36,7 +36,7 @@ export class WebideComponent implements OnInit {
|
||||
command_handlers = { 'reload': this.reloadHandler.bind(this),
|
||||
'read': this.readHandler.bind(this),
|
||||
'select': this.selectHandler.bind(this),
|
||||
'write': this.writeHandler.bind(this)};
|
||||
'write': () => {}};
|
||||
|
||||
constructor(private webSocketService: WebSocketService,
|
||||
private changeDetectorRef: ChangeDetectorRef,
|
||||
@ -47,7 +47,7 @@ export class WebideComponent implements OnInit {
|
||||
this.subscribeWS();
|
||||
this.requestCode();
|
||||
this.processManagerService.init();
|
||||
this.processManagerService.subscribeCallback('login', (event) => { console.log('CICÁK!!'); });
|
||||
this.processManagerService.subscribeCallback('login', (event) => { this.setButtonStateSaved(); });
|
||||
}
|
||||
|
||||
subscribeWS() {
|
||||
@ -76,7 +76,7 @@ export class WebideComponent implements OnInit {
|
||||
this.updateFileData(data);
|
||||
}
|
||||
|
||||
writeHandler(data: SourceCode) {
|
||||
setButtonStateSaved() {
|
||||
this.saveButtonState = 'SAVED';
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user