mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-04-04 05:32:40 +00:00
31 lines
999 B
HTML
31 lines
999 B
HTML
<div class="btn-group btn-group-sm flex-wrap">
|
|
<button *ngFor="let file of files"
|
|
class="btn btn-secondary"
|
|
[class.active]="filename === file"
|
|
[class.disabled]="filename === file"
|
|
(click)="tabSwitchButtonHandler(file)"
|
|
[disabled]="filename === file">
|
|
{{file}}
|
|
</button>
|
|
</div>
|
|
|
|
<div (textChanged)="setButtonStateDirty()"
|
|
ace-editor
|
|
[(text)]="code"
|
|
[mode]="language"
|
|
[theme]="theme"
|
|
class="tfw-ace-editor"
|
|
>
|
|
</div>
|
|
|
|
<button (click)="sendCode()"
|
|
[disabled]="saveButtonState === 'SAVING'"
|
|
type="submit"
|
|
class="btn btn-secondary"
|
|
[class.btn-success]="saveButtonState === 'SAVED'"
|
|
[class.btn-info]="saveButtonState === 'SAVING'"
|
|
[class.disabled]="saveButtonState === 'SAVING'"
|
|
><span *ngIf="saveButtonState === 'DIRTY'">Save!</span>
|
|
<span *ngIf="saveButtonState === 'SAVED'">Done!</span>
|
|
<span *ngIf="saveButtonState === 'SAVING'"><div class="loader"></div>Reloading...</span></button>
|