From 338fa2b6e75629d65a5acaee7075fef6f209cb6f Mon Sep 17 00:00:00 2001 From: Nicolas Molina Date: Wed, 20 Nov 2024 10:45:35 -0400 Subject: [PATCH] chore(edit-content): Fix error with selecting files #30060 --- .../dot-file-field-preview.component.html | 23 +++--- .../dot-file-field-preview.component.ts | 78 ++++++++----------- ...dot-edit-content-file-field.component.html | 1 - .../dot-edit-content-file-field.const.ts | 8 ++ .../lib/services/dot-edit-content.service.ts | 4 +- 5 files changed, 55 insertions(+), 59 deletions(-) diff --git a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html index 1c11b70fa56e..f79f48737967 100644 --- a/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html +++ b/core-web/libs/edit-content/src/lib/fields/dot-edit-content-file-field/components/dot-file-field-preview/dot-file-field-preview.component.html @@ -1,24 +1,23 @@ -@let previewFile = $previewFile(); -@let metadata = $metadata(); -@let downloadLink = $downloadLink(); +@let fileInfo = $fileInfo(); +@let metadata = fileInfo.metadata;
@if (metadata?.editableAsText) {
- {{ $content() }} + {{ fileInfo.content }}
} @else {
- @if (previewFile.source === 'temp') { + @if (fileInfo.source === 'temp') { } @else { } @@ -56,12 +55,12 @@ data-testId="info-btn" icon="pi pi-info" /> - @if (downloadLink) { + @if (fileInfo.downloadLink) { + (click)="downloadAsset(fileInfo.downloadLink)" /> }