mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
ACS-8227: remove internal mime type icon pipe (#10142)
This commit is contained in:
@@ -20,7 +20,6 @@
|
||||
[hideInfoButton]="hideInfoButton"
|
||||
[fileName]="fileName"
|
||||
[mimeType]="mimeType"
|
||||
[originalMimeType]="originalMimeType"
|
||||
[urlFile]="urlFileContent"
|
||||
[tracks]="tracks"
|
||||
[readOnly]="readOnly"
|
||||
|
@@ -455,8 +455,8 @@ describe('AlfrescoViewerComponent', () => {
|
||||
//
|
||||
});
|
||||
|
||||
describe('originalMimeType', () => {
|
||||
it('should set originalMimeType based on nodeData content', async () => {
|
||||
describe('mimeType', () => {
|
||||
it('should set mime type based on nodeData content', async () => {
|
||||
const defaultNode: Node = {
|
||||
id: 'mock-id',
|
||||
name: 'Mock Node',
|
||||
@@ -488,7 +488,7 @@ describe('AlfrescoViewerComponent', () => {
|
||||
} as Node);
|
||||
|
||||
await fixture.whenStable();
|
||||
expect(component.originalMimeType).toEqual('application/msWord');
|
||||
expect(component.mimeType).toEqual('application/msWord');
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -211,7 +211,6 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
urlFileContent: string;
|
||||
fileName: string;
|
||||
mimeType: string;
|
||||
originalMimeType: string;
|
||||
nodeEntry: NodeEntry;
|
||||
tracks: Track[] = [];
|
||||
readOnly: boolean = true;
|
||||
@@ -344,8 +343,10 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
}
|
||||
if (nodeRendition) {
|
||||
urlFileContent = nodeRendition.url;
|
||||
mimeType = nodeRendition.mimeType;
|
||||
this.originalMimeType = nodeData?.content?.mimeType;
|
||||
|
||||
const nodeMimeType = nodeData?.content?.mimeType;
|
||||
const renditionMimeType = nodeRendition.mimeType;
|
||||
mimeType = nodeMimeType || renditionMimeType;
|
||||
}
|
||||
} else if (viewerType === 'media') {
|
||||
this.tracks = await this.renditionService.generateMediaTracksRendition(this.nodeId);
|
||||
|
Reference in New Issue
Block a user