Skip to content

Commit 9e8c0dc

Browse files
committed
always use thumbnail component for files not supported by the media viewer, and switch to themed version of thumbnail component
1 parent c222c44 commit 9e8c0dc

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/app/item-page/media-viewer/media-viewer.component.html

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,7 @@
1616
</ng-container>
1717
</div>
1818
<ng-template #showThumbnail>
19-
<ds-media-viewer-image *ngIf="mediaOptions.image && mediaOptions.video"
20-
[image]="(thumbnailsRD$ | async)?.payload?.page[0]?._links.content.href || thumbnailPlaceholder"
21-
[preview]="false"
22-
></ds-media-viewer-image>
23-
<ds-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
24-
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
19+
<ds-thumbnail [thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
2520
</ds-thumbnail>
2621
</ng-template>
2722
</ng-container>

src/app/item-page/media-viewer/media-viewer.component.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe('MediaViewerComponent', () => {
5555
'dc.title': [
5656
{
5757
language: null,
58-
value: 'test_word.docx',
58+
value: 'test_image.jpg',
5959
},
6060
],
6161
},
@@ -150,9 +150,9 @@ describe('MediaViewerComponent', () => {
150150
expect(mediaItem.thumbnail).toBe(null);
151151
});
152152

153-
it('should display a default, thumbnail', () => {
153+
it('should display a default thumbnail', () => {
154154
const defaultThumbnail = fixture.debugElement.query(
155-
By.css('ds-media-viewer-image'),
155+
By.css('ds-thumbnail')
156156
);
157157
expect(defaultThumbnail.nativeElement).toBeDefined();
158158
});

0 commit comments

Comments
 (0)