mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-17 23:13:04 +00:00
always use thumbnail component for files not supported by the media viewer, and switch to themed version of thumbnail component
This commit is contained in:
@@ -16,12 +16,7 @@
|
||||
</ng-container>
|
||||
</div>
|
||||
<ng-template #showThumbnail>
|
||||
<ds-media-viewer-image *ngIf="mediaOptions.image && mediaOptions.video"
|
||||
[image]="(thumbnailsRD$ | async)?.payload?.page[0]?._links.content.href || thumbnailPlaceholder"
|
||||
[preview]="false"
|
||||
></ds-media-viewer-image>
|
||||
<ds-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
|
||||
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
|
||||
<ds-thumbnail [thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
|
||||
</ds-thumbnail>
|
||||
</ng-template>
|
||||
</ng-container>
|
||||
|
@@ -55,7 +55,7 @@ describe('MediaViewerComponent', () => {
|
||||
'dc.title': [
|
||||
{
|
||||
language: null,
|
||||
value: 'test_word.docx',
|
||||
value: 'test_image.jpg',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -150,9 +150,9 @@ describe('MediaViewerComponent', () => {
|
||||
expect(mediaItem.thumbnail).toBe(null);
|
||||
});
|
||||
|
||||
it('should display a default, thumbnail', () => {
|
||||
it('should display a default thumbnail', () => {
|
||||
const defaultThumbnail = fixture.debugElement.query(
|
||||
By.css('ds-media-viewer-image'),
|
||||
By.css('ds-thumbnail')
|
||||
);
|
||||
expect(defaultThumbnail.nativeElement).toBeDefined();
|
||||
});
|
||||
|
Reference in New Issue
Block a user