-
Notifications
You must be signed in to change notification settings - Fork 233
Expand file tree
/
Copy pathcode-editor.component.html
More file actions
59 lines (53 loc) · 3.4 KB
/
code-editor.component.html
File metadata and controls
59 lines (53 loc) · 3.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<div [style.width.px]=width [style.minHeight]="height+'vh'" style="margin-top: 0px;">
<div class=" text text-center" style="display:flex;height: 100vh; background-color: whitesmoke; font-size: 1.4em;"
*ngIf="names.length == 0">
<p style="margin:auto auto;">No Programmable Component in this Circuit</p>
</div>
<div *ngIf="names.length>0">
<div class="inline-block"
style="display: flex; background-color:whitesmoke; justify-content: space-between;margin:auto;">
<span style="flex:1 1 auto;"></span>
<button class="btn btn-light btn-sm mb-1 mt-2 mr-1 " matTooltip="Increase font size" style="font-size: 16px; max-height:30px;background: transparent;"
(click)="IncreaseFont()"><i>A+</i></button>
<button class="btn btn-light btn-sm mb-1 mt-2 mr-1 " matTooltip="Decrease font size" style="font-size: 16px; max-height:30px;background: transparent;"
(click)="DecreaseFont()"><i>A-</i></button>
<button class="btn btn-light btn-sm mb-1 mt-2 mr-1 " matTooltip="Download ino file" style="font-size: 16px; max-height:30px;background: transparent;"
(click)="DownloadCode()"><i class="fa fa-download"></i></button>
<button class="btn btn-light btn-sm mb-1 mt-2 mr-1 " matTooltip="Upload ino file" style="font-size: 16px; max-height:30px;background: transparent;"
(click)="uploadInput.click()"><i class="fa fa-upload"></i></button>
<input id = "UploadCodeBTN" type="file" accept=".ino" #uploadInput style="display: none;" (change)="UploadCode($event)">
<button class="btn btn-light btn-sm mb-1 mt-2 mr-1 " matTooltip="Include Library" style="font-size:16px; max-height:30px;background: transparent;"
(click)="openFolder()"><i class="fas fa-box"></i></button>
<form>
<div class="form-group mt-2 " style="max-height: 20px; box-shadow: whitesmoke; ">
<select id="inputState" class="form-control form-control-sm" (change)="chooseArduino(chooseArduinoController)"
#chooseArduinoController>
<option *ngFor="let name of names">{{name}}</option>
</select>
</div>
</form>
<form>
<div class="form-group mt-2 " style="max-height: 20px; box-shadow: whitesmoke; ">
<select id="inputState" class="form-control form-control-sm" (change)="chooseLanguage(chooseController)"
#chooseController>
<option *ngFor="let name of lang">{{name}}</option>
</select>
</div>
</form>
</div>
<div id="lib"
style="display: none; flex-direction: column; z-index: 1000;position: absolute; overflow-y: scroll; overflow-x: hidden; height: 600vh;background-color: lightgray">
<div class="alert alert-dark" role="alert" *ngFor="let record of records;let i = index">
<button type="button" class="btn btn-outline-primary btn-sm include" (click)="Include(i)">Include</button>
<div class="name">{{record.name}}</div>
<div class="description">{{record.Description}}</div>
<span style="flex:1 1 auto;"></span>
<button class="btn btn-sm icon"><a href={{record.url}} target="_blank"><i
class="fas fa-external-link-alt"></i></a></button>
</div>
</div>
<ngx-monaco-editor id="editor" style="height: calc(100vh - 135px); display: block;" [options]="editorOptions" [(ngModel)]="code"
(ngModelChange)="codeChanged()" (onInit)="onInit($event)">
</ngx-monaco-editor>
</div>
</div>