matefun.component.html 7.76 KB
Newer Older
1
2
3
4
<notificacion></notificacion> 
<div class="container-fluid" style=" padding-left: 0px; padding-right: 0px; margin-top: -13px; margin-left: -6px; margin-right: -6px;">
    <div class="row">
        <div class="col-md-6">
5
            <ngb-tabset [destroyOnHide]=false (tabChange)="onChangeTab($event)">
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
60
61
62
                <ngb-tab id="ProgramBtn"title="Programa">
                    <ng-template ngbTabContent>

            <div class="card">
                <div class="card-header">
                    <form>
                        <input type="text" name="archivo" class="nomArchivoInp form-control form-control-sm" 
                        [disabled]="!archivo.editable || archivo.estado=='Corregido' || archivo.estado == 'Entregado'"
                        *ngIf="archivo" [(ngModel)]="archivo.nombre" (keyup)="archivoModificado()" placeholder="nombre del archivo" />

                        <button id="downloadFileButton" (click)="downloadFile()" style="margin-left: 10px; float: right;"  class="btn btn-sm btn-secondary" placement="bottom" ngbPopover="Exportar (Ctrl+E)" triggers="mouseenter:mouseleave" tiggers="click">
                            <i class="fa fa-download "></i>
                        </button>

                        <button style="margin-left: 10px; float: right;" id="popover" class="btn btn-sm btn-secondary" placement="bottom" [ngbPopover]=popoverContent #popover="ngbPopover" popoverTitle="Configuración" tiggers="click">
                            <i class="fa fa-gear"></i>
                        </button>
                        <div style="margin-left: 10px; float: right;" ngbPopover="Guardar archivo (Ctrl+G)" triggers="mouseenter:mouseleave" placement="bottom" >
                            <button [disabled]="!modificado" (click)="guardarArchivo()" class="btn btn-sm btn-secondary" >
                                <i class="fa fa-save"></i>
                            </button>
                        </div>
                        <button style="margin-left: 10px; float: right;" (click)="reiniciarInterprete()" class="btn btn-sm btn-secondary" ngbPopover="Reiniciar intérprete (Ctrl+R)" triggers="mouseenter:mouseleave" placement="bottom">
                            <i class="fa fa-refresh"></i>
                        </button>
                        <button style="margin-left: 10px; float: right;" (click)="runCode()" class="btn btn-sm btn-secondary" ngbPopover="Cargar programa (Ctrl+P)" triggers="mouseenter:mouseleave" placement="bottom">
                            <i class="fa fa-play"></i>
                        </button>
                        <button style="float: right;" (click)="seleccionarDirectorio()" class="btn btn-sm btn-secondary" ngbPopover="Nuevo archivo (Ctrl+A)" triggers="mouseenter:mouseleave" placement="bottom">
                            <i class="fa fa-plus"></i>
                        </button>
                        <ng-template #popoverContent style="width: 15em">
                            <div style="width: 12em">
                                <div class="form-group">
                                    <label>Tema:</label>
                                    <select name="theme" class="form-control form-control-sm" #selectTheme (change)=updateConfig(selectTheme.value)>
                                        <option *ngFor="let theme of themes" [selected]="theme==configCodeMirror.theme" value='{{theme}}'>{{theme}}</option>
                                    </select>
                                </div>
                                <div class="form-group">
                                    <label>Tamaño de fuente:</label>
                                    <div>
                                        <button class="btn btn-sm btn-secondary" (click)="aumentarFuente()">A⁺</button>
                                        <button class="btn btn-sm btn-secondary" (click)="disminuirFuente()">A⁻</button>
                                        {{configCodeMirror.fontSize}}px                                    
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label>
                                        <input type="checkbox" style="width: 15px; display: inline-block;" name="argumentoF" class="form-control form-control-sm" [(ngModel)]=argumentoF>
                                        Mostrar advertencias de uso de funciones
                                    </label>
                                    <br>
                                    <label>
                                        <input type="checkbox" style="width: 15px; display: inline-block;" name="argumentoI" class="form-control form-control-sm" [(ngModel)]=argumentoI>
                                        Mostrar advertencias de uso de operadores infijos
                                    </label>
Franco Pariani's avatar
Franco Pariani committed
63
64
65
66
67
                                    <br>
                                    <label>
                                        <input type="checkbox" style="width: 15px; display: inline-block;" name="hintsCheck" class="form-control form-control-sm" [(ngModel)]=hintsCheck (change)="changeHints()">
                                        Mostrar sugerencias de autocompletar
                                    </label>
68
69
70
71
72
73
74
75
                                </div>
                                <div class="form-group">
                                    <button class="btn btn-secondary" (click)="saveConfig()">Guardar</button>
                                </div>
                            </div>
                        </ng-template>
                    </form>
                </div>
76
                <codemirror class="codemirrorPrograma" [(ngModel)]="archivo.contenido" (keyup)="archivoModificado($event)" [config]="configCodeMirror" [ngStyle]="{'font-size': configCodeMirror.fontSize+'px'}">
77
78
79
80
81
                </codemirror>
            </div>

            </ng-template>
                </ngb-tab>
82
                <!-- <ngb-tab id="FigurasBtn" title="Figuras OLD">
83
84
85
                    <ng-template ngbTabContent>
                        <canvas-component (canvasComp)=canvasC></canvas-component>
                    </ng-template>
86
87
                </ngb-tab> -->
                <ngb-tab id="FigurasBtn2D" title="Figuras 2D">
88
                    <ng-template ngbTabContent>
Diego Rey's avatar
Diego Rey committed
89
                        <graph2D-component (graph2DComp)=graph2DComp></graph2D-component>
90
                    </ng-template>
91
                </ngb-tab>
92
                <ngb-tab id="FigurasBtn3D" title="Figuras 3D">
93
                    <ng-template ngbTabContent>
Diego Rey's avatar
Diego Rey committed
94
                        <graph3d-component (graph3DComp)=graph3DComp></graph3d-component>
95
96
                    </ng-template>
                </ngb-tab>
Diego Rey's avatar
Diego Rey committed
97

98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
            </ngb-tabset> 

        </div>

        <div class="col-md-6">
            <!--  
            <ngb-tabset [destroyOnHide]=false>
                <ngb-tab title="Programa">
                    <ng-template ngbTabContent>

                        <div class="card">
                            <div id="console" > </div>
                        </div>

                    </ng-template>
                </ngb-tab>
                <ngb-tab title="Figuras">
                    <ng-template ngbTabContent>
                        <canvas-component (canvasComp)=canvasC></canvas-component>
                    </ng-template>
                </ngb-tab>
            </ngb-tabset> 
            -->
            


            <div class="card">
                <div id="console"> </div>
            </div>
           <!--
            <canvas-component (canvasComp)=canvasC></canvas-component>
            
             <div class="card">
                <div id="svgHaskell">
                </div>
            </div> -->

        </div>
    </div>
137
    <span class="version">v{{version}}</span>
138
139
</div>