mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-01-16 05:31:56 +00:00
Implement tab switching saving files
This commit is contained in:
parent
277d253fbf
commit
2d6289609f
@ -3,7 +3,7 @@
|
|||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
[class.active]="filename === file"
|
[class.active]="filename === file"
|
||||||
[class.disabled]="filename === file"
|
[class.disabled]="filename === file"
|
||||||
(click)="selectCode(file); requestCode()"
|
(click)="sendCodeContents(); selectCode(file); requestCode()"
|
||||||
[disabled]="filename === file">
|
[disabled]="filename === file">
|
||||||
{{file}}
|
{{file}}
|
||||||
</button>
|
</button>
|
||||||
|
@ -85,12 +85,16 @@ export class WebideComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sendCode() {
|
sendCode() {
|
||||||
|
this.sendCodeContents();
|
||||||
|
this.saveButtonState = 'SAVING';
|
||||||
|
this.processManagerService.restartProcess('login');
|
||||||
|
}
|
||||||
|
|
||||||
|
sendCodeContents() {
|
||||||
this.webSocketService.send(this.key_id, {
|
this.webSocketService.send(this.key_id, {
|
||||||
'command': 'write',
|
'command': 'write',
|
||||||
'content': this.code
|
'content': this.code
|
||||||
});
|
});
|
||||||
this.saveButtonState = 'SAVING';
|
|
||||||
this.processManagerService.restartProcess('login');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
requestCode() {
|
requestCode() {
|
||||||
|
Loading…
Reference in New Issue
Block a user