diff --git a/ui-ngx/src/app/shared/components/image/image-dialog.component.html b/ui-ngx/src/app/shared/components/image/image-dialog.component.html index 6526da5392..05bc4e943c 100644 --- a/ui-ngx/src/app/shared/components/image/image-dialog.component.html +++ b/ui-ngx/src/app/shared/components/image/image-dialog.component.html @@ -30,34 +30,44 @@
-
- - image.name - - - {{ 'image.name-required' | translate }} - - - - -
+ + image.name + + + {{ 'image.name-required' | translate }} + + + + + + image.link + + + +
diff --git a/ui-ngx/src/app/shared/components/image/image-dialog.component.ts b/ui-ngx/src/app/shared/components/image/image-dialog.component.ts index 4cf2e818b1..6904a30096 100644 --- a/ui-ngx/src/app/shared/components/image/image-dialog.component.ts +++ b/ui-ngx/src/app/shared/components/image/image-dialog.component.ts @@ -29,6 +29,7 @@ import { UploadImageDialogData } from '@shared/components/image/upload-image-dialog.component'; import { UrlHolder } from '@shared/pipe/image.pipe'; +import { ImportExportService } from '@shared/import-export/import-export.service'; export interface ImageDialogData { readonly: boolean; @@ -57,6 +58,7 @@ export class ImageDialogComponent extends protected router: Router, private imageService: ImageService, private dialog: MatDialog, + private importExportService: ImportExportService, @Inject(MAT_DIALOG_DATA) private data: ImageDialogData, public dialogRef: MatDialogRef, public fb: UntypedFormBuilder) { @@ -70,10 +72,13 @@ export class ImageDialogComponent extends ngOnInit(): void { this.imageFormGroup = this.fb.group({ - title: [this.image.title, [Validators.required]] + title: [this.image.title, [Validators.required]], + link: [this.image.link, []], }); if (this.data.readonly) { this.imageFormGroup.disable(); + } else { + this.imageFormGroup.get('link').disable(); } } @@ -109,7 +114,7 @@ export class ImageDialogComponent extends if ($event) { $event.stopPropagation(); } - // TODO: + this.importExportService.exportImage(imageResourceType(this.image), this.image.resourceKey); } updateImage($event): void { diff --git a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts index d046294ed6..f821a42c33 100644 --- a/ui-ngx/src/app/shared/components/image/image-gallery.component.ts +++ b/ui-ngx/src/app/shared/components/image/image-gallery.component.ts @@ -624,7 +624,11 @@ export class ImageGalleryComponent extends PageComponent implements OnInit, OnDe data: {} }).afterClosed().subscribe((result) => { if (result) { - this.updateData(); + if (this.selectionMode) { + this.imageSelected.next(result); + } else { + this.updateData(); + } } }); } diff --git a/ui-ngx/src/assets/locale/locale.constant-en_US.json b/ui-ngx/src/assets/locale/locale.constant-en_US.json index d8006debeb..22f8c72654 100644 --- a/ui-ngx/src/assets/locale/locale.constant-en_US.json +++ b/ui-ngx/src/assets/locale/locale.constant-en_US.json @@ -2988,7 +2988,9 @@ "no-image-selected": "No image selected", "browse-from-gallery": "Browse from gallery", "set-link": "Set link", - "image-link": "Image link" + "image-link": "Image link", + "link": "Link", + "copy-image-link": "Copy image link" }, "image-input": { "drop-images-or": "Drag and drop an images or",