|
| 1 | +<mat-form-field class="prompt"> |
| 2 | + <mat-label i18n>Prompt</mat-label> |
| 3 | + <textarea matInput |
| 4 | + [ngModel]="authoringComponentContent.prompt" |
| 5 | + (ngModelChange)="promptChanged($event)" |
| 6 | + placeholder="Enter Prompt Here" |
| 7 | + i18n-placeholder |
| 8 | + cdkTextareaAutosize> |
| 9 | + </textarea> |
| 10 | +</mat-form-field> |
| 11 | +<div> |
| 12 | + <mat-form-field class="background-image input"> |
| 13 | + <mat-label i18n>Background Image</mat-label> |
| 14 | + <input matInput |
| 15 | + [(ngModel)]="authoringComponentContent.backgroundImage" |
| 16 | + (ngModelChange)="textInputChange.next($event)"/> |
| 17 | + </mat-form-field> |
| 18 | + <button mat-raised-button |
| 19 | + color="primary" |
| 20 | + (click)="chooseBackgroundImage()" |
| 21 | + matTooltip="Choose an Image" |
| 22 | + matTooltipPosition="above" |
| 23 | + i18n-matTooltip |
| 24 | + aria-label="Image" |
| 25 | + i18n-aria-label> |
| 26 | + <mat-icon>insert_photo</mat-icon> |
| 27 | + </button> |
| 28 | +</div> |
| 29 | +<div> |
| 30 | + <mat-form-field class="input"> |
| 31 | + <mat-label i18n>Canvas Width (px)</mat-label> |
| 32 | + <input matInput |
| 33 | + type="number" |
| 34 | + [(ngModel)]="authoringComponentContent.width" |
| 35 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 36 | + </mat-form-field> |
| 37 | + <mat-form-field class="input"> |
| 38 | + <mat-label i18n>Canvas Height (px)</mat-label> |
| 39 | + <input matInput |
| 40 | + type="number" |
| 41 | + [(ngModel)]="authoringComponentContent.height" |
| 42 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 43 | + </mat-form-field> |
| 44 | +</div> |
| 45 | +<div> |
| 46 | + <mat-form-field class="input"> |
| 47 | + <mat-label i18n>Point Radius Size (px)</mat-label> |
| 48 | + <input matInput |
| 49 | + type="number" |
| 50 | + [(ngModel)]="authoringComponentContent.pointSize" |
| 51 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 52 | + </mat-form-field> |
| 53 | + <mat-form-field class="input"> |
| 54 | + <mat-label i18n>Font Size</mat-label> |
| 55 | + <input matInput |
| 56 | + type="number" |
| 57 | + [(ngModel)]="authoringComponentContent.fontSize" |
| 58 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 59 | + </mat-form-field> |
| 60 | + <mat-form-field class="input"> |
| 61 | + <mat-label i18n>Label Max Character Width</mat-label> |
| 62 | + <input matInput |
| 63 | + type="number" |
| 64 | + [(ngModel)]="authoringComponentContent.labelWidth" |
| 65 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 66 | + </mat-form-field> |
| 67 | +</div> |
| 68 | +<div> |
| 69 | + <div class="checkbox"> |
| 70 | + <mat-checkbox |
| 71 | + color="primary" |
| 72 | + [(ngModel)]="authoringComponentContent.canCreateLabels" |
| 73 | + (change)="componentChanged()" |
| 74 | + i18n> |
| 75 | + Can Student Create Labels |
| 76 | + </mat-checkbox> |
| 77 | + </div> |
| 78 | + <div class="checkbox"> |
| 79 | + <mat-checkbox |
| 80 | + color="primary" |
| 81 | + [(ngModel)]="authoringComponentContent.enableCircles" |
| 82 | + (ngModelChange)="componentChanged()" |
| 83 | + i18n> |
| 84 | + Enable Dots |
| 85 | + </mat-checkbox> |
| 86 | + </div> |
| 87 | + <div class="checkbox"> |
| 88 | + <mat-checkbox |
| 89 | + color="primary" |
| 90 | + [(ngModel)]="authoringComponentContent.enableStudentUploadBackground" |
| 91 | + (ngModelChange)="componentChanged()" |
| 92 | + i18n> |
| 93 | + Allow Student to Upload Image for Background |
| 94 | + </mat-checkbox> |
| 95 | + </div> |
| 96 | +</div> |
| 97 | +<div> |
| 98 | + <div layout="row" class="starter-labels-button-container"> |
| 99 | + <span i18n class="starter-labels-button-label">Starter Labels</span> |
| 100 | + <button mat-raised-button |
| 101 | + color="primary" |
| 102 | + (click)="addLabel()" |
| 103 | + matTooltip="Add Starter Label" |
| 104 | + matTooltipPosition="above" |
| 105 | + i18n-matTooltip |
| 106 | + aria-label="add" |
| 107 | + i18n-aria-label> |
| 108 | + <mat-icon>add</mat-icon> |
| 109 | + </button> |
| 110 | + </div> |
| 111 | + <div *ngIf="authoringComponentContent.labels == null || authoringComponentContent.labels.length === 0" |
| 112 | + class="info-block" |
| 113 | + i18n> |
| 114 | + There are no starter labels. Click the "Add Label" button to add a starter label. |
| 115 | + </div> |
| 116 | + <div *ngFor="let label of authoringComponentContent.labels; index as labelIndex" |
| 117 | + class="starter-label-container"> |
| 118 | + <div> |
| 119 | + <mat-form-field class="input label-input"> |
| 120 | + <mat-label i18n>Text</mat-label> |
| 121 | + <input matInput |
| 122 | + [(ngModel)]="label.text" |
| 123 | + (ngModelChange)="textInputChange.next($event)" |
| 124 | + placeholder="Enter Label Text Here" |
| 125 | + i18n-placeholder/> |
| 126 | + </mat-form-field> |
| 127 | + <mat-form-field class="input color-input"> |
| 128 | + <mat-label i18n>Color</mat-label> |
| 129 | + <input matInput |
| 130 | + [(ngModel)]="label.color" |
| 131 | + (ngModelChange)="textInputChange.next($event)" |
| 132 | + ng-model-options="{ debounce: 1000 }"/> |
| 133 | + </mat-form-field> |
| 134 | + <button mat-raised-button |
| 135 | + color="primary" |
| 136 | + (click)="openColorViewer()" |
| 137 | + matTooltip="View Colors" |
| 138 | + matTooltipPosition="above" |
| 139 | + i18n-matTooltip |
| 140 | + aria-label="Color Palette" |
| 141 | + i18n-aria-label> |
| 142 | + <mat-icon>palette</mat-icon> |
| 143 | + </button> |
| 144 | + </div> |
| 145 | + <div> |
| 146 | + <div class="checkbox"> |
| 147 | + <mat-checkbox |
| 148 | + color="primary" |
| 149 | + [(ngModel)]="label.canEdit" |
| 150 | + (ngModelChange)="componentChanged()" |
| 151 | + i18n> |
| 152 | + Can Student Edit Label |
| 153 | + </mat-checkbox> |
| 154 | + </div> |
| 155 | + <div class="checkbox"> |
| 156 | + <mat-checkbox |
| 157 | + color="primary" |
| 158 | + [(ngModel)]="label.canDelete" |
| 159 | + (ngModelChange)="componentChanged()" |
| 160 | + i18n> |
| 161 | + Can Student Delete Label |
| 162 | + </mat-checkbox> |
| 163 | + </div> |
| 164 | + </div> |
| 165 | + <div *ngIf="authoringComponentContent.enableCircles" |
| 166 | + fxLayout="row wrap" fxLayoutAlign="start center"> |
| 167 | + <span class="coordinate-location-label" i18n>Point Location</span> |
| 168 | + <mat-form-field class="input coordinate-input"> |
| 169 | + <mat-label i18n>X</mat-label> |
| 170 | + <input matInput |
| 171 | + type="number" |
| 172 | + [(ngModel)]="label.pointX" |
| 173 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 174 | + </mat-form-field> |
| 175 | + <mat-form-field class="input coordinate-input"> |
| 176 | + <mat-label i18n>Y</mat-label> |
| 177 | + <input matInput |
| 178 | + type="number" |
| 179 | + [(ngModel)]="label.pointY" |
| 180 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 181 | + </mat-form-field> |
| 182 | + </div> |
| 183 | + <div fxLayout="row wrap" fxLayoutAlign="start center"> |
| 184 | + <span class="coordinate-location-label" i18n>Text Location</span> |
| 185 | + <mat-form-field class="input coordinate-input"> |
| 186 | + <mat-label i18n>X</mat-label> |
| 187 | + <input matInput |
| 188 | + type="number" |
| 189 | + [(ngModel)]="label.textX" |
| 190 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 191 | + </mat-form-field> |
| 192 | + <mat-form-field class="input coordinate-input"> |
| 193 | + <mat-label i18n>Y</mat-label> |
| 194 | + <input matInput |
| 195 | + type="number" |
| 196 | + [(ngModel)]="label.textY" |
| 197 | + (ngModelChange)="numberInputChange.next($event)"/> |
| 198 | + </mat-form-field> |
| 199 | + <span fxFlex></span> |
| 200 | + <button mat-raised-button |
| 201 | + color="primary" |
| 202 | + (click)="deleteLabel(labelIndex, label)" |
| 203 | + matTooltip="Delete Label" |
| 204 | + matTooltipPosition="above" |
| 205 | + i18n-matTooltip |
| 206 | + aria-label="Delete" |
| 207 | + i18n-aria-label> |
| 208 | + <mat-icon>delete</mat-icon> |
| 209 | + </button> |
| 210 | + </div> |
| 211 | + </div> |
| 212 | +</div> |
| 213 | +<div class="starter-labels-buttons-container"> |
| 214 | + <button mat-raised-button |
| 215 | + color="primary" |
| 216 | + class="starter-labels-button" |
| 217 | + (click)="saveStarterLabels()" |
| 218 | + matTooltip="Save Starter Labels" |
| 219 | + matTooltipPosition="above" |
| 220 | + i18n-matTooltip |
| 221 | + aria-label="Save" |
| 222 | + i18n-aria-label> |
| 223 | + <mat-icon>create</mat-icon> |
| 224 | + </button> |
| 225 | + <button mat-raised-button |
| 226 | + color="primary" |
| 227 | + class="starter-labels-button" |
| 228 | + (click)="deleteStarterLabels()" |
| 229 | + matTooltip="Delete Starter Labels" |
| 230 | + matTooltipPosition="above" |
| 231 | + i18n-matTooltip |
| 232 | + aria-label="Delete" |
| 233 | + i18n-aria-label> |
| 234 | + <mat-icon>delete_sweep</mat-icon> |
| 235 | + </button> |
| 236 | +</div> |
0 commit comments