remote-access/shared/ssh-key-input/ssh-key-input.component.ts
OnInit
OnChanges
ControlValueAccessor
| providers |
)
|
| selector | c8y-ssh-key-input |
| standalone | true |
| imports |
C8yTranslatePipe
NgIf
|
| templateUrl | ./ssh-key-input.component.html |
C8yTranslatePipe
NgIf
DropAreaComponent
FormsModule
)
OnInit
OnChanges
ControlValueAccessor
<div class="form-group">
<div class="tight-grid">
<div class="col-xs-8">
<input
[placeholder]="'e.g. {{ example }}' | translate : { example: placeholder }"
type="text"
class="form-control"
[ngModel]="value"
(ngModelChange)="newValue($event)"
[readonly]="readonly"
[ngModelOptions]="{standalone: true}"
/>
</div>
<div class="col-xs-4" *ngIf="!readonly">
<c8y-drop-area class="drop-area-sm" (dropped)="onKeyFileSelected($event)" [maxAllowedFiles]="1" [icon]="'upload'"></c8y-drop-area>
</div>
</div>
</div>