diff --git a/src/app/webide/webide.component.html b/src/app/webide/webide.component.html index 9054c88..163476b 100644 --- a/src/app/webide/webide.component.html +++ b/src/app/webide/webide.component.html @@ -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'" >Save! - Saved! - Saving... + Done! + Reloading... diff --git a/src/app/webide/webide.component.ts b/src/app/webide/webide.component.ts index 53bfd05..6fc1ec5 100644 --- a/src/app/webide/webide.component.ts +++ b/src/app/webide/webide.component.ts @@ -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'; }