implemented post und put image;
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
|
||||
<mat-expansion-panel
|
||||
*ngFor="let image of images | slice:paginationGetStart():paginationGetEnd(); let i = index"
|
||||
(opened)="loadImage(i, image.filename.split('.')[0])"
|
||||
(opened)="loadImage(i + paginationGetStart(), image.filename.split('.')[0])"
|
||||
>
|
||||
<mat-expansion-panel-header (click)="$event.stopPropagation()">
|
||||
<span style="width: 30em"
|
||||
@@ -24,19 +24,23 @@
|
||||
<div style="width: 20em; height: 20em; border: solid; margin-bottom: 1em; display: flex">
|
||||
<img *ngIf="image.image_b64, let b64; else loadingImage"
|
||||
[src]="b64"
|
||||
style="width: 100%; margin: auto" [alt]="image.filename"/>
|
||||
style="width: 100%; margin: auto" [alt]="image.filename"/>
|
||||
<ng-template #loadingImage>
|
||||
<mat-spinner style="margin: auto;"></mat-spinner>
|
||||
</ng-template>
|
||||
|
||||
</div>
|
||||
|
||||
<angular-file-uploader style="margin-left: 0 !important;"
|
||||
[config]="getImageUpdateConfig(image.filename)">
|
||||
</angular-file-uploader>
|
||||
<app-file-uploader [mode]="'put'"
|
||||
[filename]="image.filename.split('.')[0]"
|
||||
[meta]=image
|
||||
(reload)="loadImage(i + paginationGetStart(), $event.split('.')[0])"
|
||||
></app-file-uploader>
|
||||
|
||||
<span style="float: right">
|
||||
<button mat-raised-button color="warn" (click)="deleteImage(image)">Delete</button>
|
||||
<button mat-raised-button color="warn" (click)="deleteImage(image)">
|
||||
Delete
|
||||
</button>
|
||||
</span>
|
||||
</ng-template>
|
||||
</mat-expansion-panel>
|
||||
@@ -48,7 +52,7 @@
|
||||
showFirstLastButtons
|
||||
></mat-paginator>
|
||||
|
||||
<mat-divider style="margin-top: 2em"></mat-divider>
|
||||
<h3>Upload New Image</h3>
|
||||
<angular-file-uploader style="margin-left: 0 !important;"
|
||||
[config]="imageUploadConfig" id="generalUpload">
|
||||
</angular-file-uploader>
|
||||
<app-file-uploader [mode]="'post'" (reload)="reload.emit()"></app-file-uploader>
|
||||
<mat-divider style="margin-top: 2em"></mat-divider>
|
||||
|
||||
Reference in New Issue
Block a user