Skip to content

Commit

Permalink
[sc-8799] Format summary displayed in resource preview (#1314)
Browse files Browse the repository at this point in the history
* [sc-8799] Format summary displayed in resource preview

* Improvement
  • Loading branch information
operramon authored Feb 9, 2024
1 parent e6a76fe commit d6774db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
<p>{{ resource.title }}</p>

<div class="title-xxs">{{ 'resource.summary' | translate }}</div>
<p>{{ resource.summary || '–' }}</p>
<p [innerHtml]="(summary | async) || '-'"></p>

<div class="title-xxs">{{ 'resource.thumbnail.label' | translate }}</div>
<div class="thumbnails-container">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export class PreviewComponent implements OnInit, OnDestroy {
);
extraMetadata = this.resource.pipe(map((resource) => JSON.stringify(resource.extra?.metadata, null, 2)));
extraMetadataFullscreen = false;
summary = this.resource.pipe(map((resource) => (resource.summary || '').replace(/\n/g, '<br>')));

private _noField = new ReplaySubject<boolean>(1);
noField: Observable<boolean> = this._noField.asObservable();
Expand Down

0 comments on commit d6774db

Please sign in to comment.