ACS-8227: remove internal mime type icon pipe (#10142)

This commit is contained in:
Denys Vuika
2024-09-10 10:07:18 -04:00
committed by GitHub
parent b1260e06ea
commit b1abe2c8a6
16 changed files with 31 additions and 123 deletions

View File

@@ -20,7 +20,6 @@
[hideInfoButton]="hideInfoButton"
[fileName]="fileName"
[mimeType]="mimeType"
[originalMimeType]="originalMimeType"
[urlFile]="urlFileContent"
[tracks]="tracks"
[readOnly]="readOnly"

View File

@@ -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');
});
});

View File

@@ -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);