mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +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>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #showThumbnail>
|
<ng-template #showThumbnail>
|
||||||
<ds-themed-media-viewer-image *ngIf="mediaOptions.image && mediaOptions.video"
|
<ds-themed-thumbnail [thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
|
||||||
[image]="(thumbnailsRD$ | async)?.payload?.page[0]?._links.content.href || thumbnailPlaceholder"
|
</ds-themed-thumbnail>
|
||||||
[preview]="false"
|
|
||||||
></ds-themed-media-viewer-image>
|
|
||||||
<ds-thumbnail *ngIf="!(mediaOptions.image && mediaOptions.video)"
|
|
||||||
[thumbnail]="(thumbnailsRD$ | async)?.payload?.page[0]">
|
|
||||||
</ds-thumbnail>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@@ -139,9 +139,9 @@ describe('MediaViewerComponent', () => {
|
|||||||
expect(mediaItem.thumbnail).toBe(null);
|
expect(mediaItem.thumbnail).toBe(null);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display a default, thumbnail', () => {
|
it('should display a default thumbnail', () => {
|
||||||
const defaultThumbnail = fixture.debugElement.query(
|
const defaultThumbnail = fixture.debugElement.query(
|
||||||
By.css('ds-themed-media-viewer-image')
|
By.css('ds-themed-thumbnail')
|
||||||
);
|
);
|
||||||
expect(defaultThumbnail.nativeElement).toBeDefined();
|
expect(defaultThumbnail.nativeElement).toBeDefined();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user