All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
Caused by BREAKING CHANGE: by default the output will be set to blob. Using blob instead of a base64 should decrease the memory usage. If you wish to keep using base64, simply add output="base64" to the <image-cropper> tag. (https://github.com/Mawi137/ngx-image-cropper/releases/tag/7.0.0)
37 lines
1.5 KiB
HTML
37 lines
1.5 KiB
HTML
<ng-template #upload_modal let-modal>
|
|
<div class="modal-header">
|
|
<h4 class="modal-title" i18n>Edit image</h4>
|
|
<button type="button" class="close" aria-label="Close" (click)="modal.dismiss('Cross click')">
|
|
<span aria-hidden="true">×</span>
|
|
</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<div class="cropper">
|
|
<div *ngIf="!isImageLoaded" class="no-image" (click)="fileInput.click()">
|
|
<i class="fal fa-image"></i>
|
|
<div i18n>No image selected</div>
|
|
</div>
|
|
<image-cropper #imageCropper output="base64"
|
|
[imageChangedEvent]="imageChangedEvent"
|
|
[maintainAspectRatio]="true"
|
|
[format]="imageType"
|
|
[aspectRatio]="aspectRatio"
|
|
[autoCrop]="true"
|
|
[resizeToWidth]="maxWidth"
|
|
[roundCropper]="roundImage"
|
|
(imageCropped)="imageCropped($event)"
|
|
(imageLoaded)="imageLoaded($event)"
|
|
(cropperReady)="cropperReady()"
|
|
(loadImageFailed)="loadImageFailed()"
|
|
[imageURL]="imageUrl"
|
|
></image-cropper>
|
|
</div>
|
|
<input #fileInput type="file" (change)="fileChangeEvent($event)" style="display:none" accept="image/*"/>
|
|
<span class="btn btn-primary" (click)="fileInput.click()" i18n>Select image</span>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="submit" class="btn btn-primary" i18n [disabled]="!isImageLoaded" (click)="save()">Apply</button>
|
|
<button type="button" autofocus class="btn btn-secondary" (click)="modal.close('Save click')" i18n="@@buttonCancel">Cancel</button>
|
|
</div>
|
|
</ng-template>
|