frontend-tutorial-framework/src/app/ide/ide.component.html

54 lines
2.5 KiB
HTML

<!-- Copyright (C) 2018 Avatao.com Innovative Learning Kft.
All Rights Reserved. See LICENSE file for details. -->
<div class="tfw-grid-ide-statusbar">
<div class="btn-group btn-group-sm flex-wrap tao-grid-center-left">
<button *ngFor="let file of files"
class="btn tfw-tab-btn"
(click)="tabSwitchButtonHandler(file)"
[class.active]="filename === file"
[class.disabled]="filename === file"
[disabled]="filename === file"
[class.tao-tab-btn-saved]="filename === file && codeState === CodeState.SAVED">
<span *ngIf="filename !== file">{{file}}</span>
<span *ngIf="filename === file"
[class.underline]="codeState === CodeState.DIRTY">{{file}}</span>
</button>
</div>
<div class="btn-group-sm tfw-deploy-btn-group">
<button *ngIf="showDeployButton"
type="submit"
class="btn tfw-deploy-btn tao-grid-top-center"
(click)="sendCodeIfDirty(); deployCode()"
[disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED"
[class.deployed]="deployButtonState === DeployButtonState.DEPLOYED"
[class.deploy]="deployButtonState === DeployButtonState.DEPLOYING"
[class.disabled]="deployButtonState === DeployButtonState.DEPLOYING || deployButtonState === DeployButtonState.DEPLOYED"
[class.failed]="deployButtonState === DeployButtonState.FAILED">
<span *ngIf="deployButtonState === DeployButtonState.TODEPLOY">Deploy</span>
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYED">
<img src="images/greentick_icon.svg"/>
<span>Deployed</span>
</span>
<span *ngIf="deployButtonState === DeployButtonState.DEPLOYING"><div class="loader"></div>Reloading app...</span>
<span *ngIf="deployButtonState === DeployButtonState.FAILED">Deployment failed. Retry</span>
</button>
</div>
</div>
<!--div (keyup)="setCodeState(CodeState.DIRTY); setDeployButtonState(DeployButtonState.TODEPLOY); resetAutoSaveCountdown()"
ace-editor
[(text)]="code"
[mode]="language"
[theme]="theme"
[options]="options"
class="tfw-ace-editor">
</div-->
<ngx-monaco-editor [(ngModel)]="code"
class="tfw-ace-editor"
(keyup)="setCodeState(CodeState.DIRTY); setDeployButtonState(DeployButtonState.TODEPLOY); resetAutoSaveCountdown()"
[options]="editorOptions"
></ngx-monaco-editor>