mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4480] Change Viewer behaviour when opening unsupported files (#4922)
* [ADF-4480] Change Viewer behaviour when opening unsuported files * [ADF-4480] Fix identations * [ADF-4480] Make timeout of rendition retry constant
This commit is contained in:
committed by
Eugenio Romano
parent
18ed4e3c1d
commit
dc450a3af2
@@ -298,7 +298,7 @@
|
|||||||
"OF": "of"
|
"OF": "of"
|
||||||
},
|
},
|
||||||
"LOADING": "Loading",
|
"LOADING": "Loading",
|
||||||
"UNKNOWN_FORMAT": "Couldn't load preview",
|
"UNKNOWN_FORMAT": "Couldn't load preview. Unknown format.",
|
||||||
"SIDEBAR": {
|
"SIDEBAR": {
|
||||||
"THUMBNAILS": {
|
"THUMBNAILS": {
|
||||||
"PAGE": "Page {{ pageNum }}"
|
"PAGE": "Page {{ pageNum }}"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="adf-viewer__unknown-format-view">
|
<div class="adf-viewer__unknown-format-view">
|
||||||
<div>
|
<div>
|
||||||
<mat-icon class="icon">wifi_tethering</mat-icon>
|
<mat-icon class="icon">error</mat-icon>
|
||||||
<div class="label">{{ 'ADF_VIEWER.UNKNOWN_FORMAT' | translate }}</div>
|
<div class="label">{{ 'ADF_VIEWER.UNKNOWN_FORMAT' | translate }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -200,6 +200,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
@Output()
|
@Output()
|
||||||
invalidSharedLink = new EventEmitter();
|
invalidSharedLink = new EventEmitter();
|
||||||
|
|
||||||
|
TRY_TIMEOUT: number = 2000;
|
||||||
|
|
||||||
viewerType = 'unknown';
|
viewerType = 'unknown';
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
nodeEntry: NodeEntry;
|
nodeEntry: NodeEntry;
|
||||||
@@ -692,8 +694,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
this.viewerType = 'error_in_creation';
|
this.viewerType = 'error_in_creation';
|
||||||
return reject();
|
return reject();
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.isLoading = false;
|
||||||
|
this.viewerType = 'error_in_creation';
|
||||||
|
clearInterval(intervalId);
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, this.TRY_TIMEOUT);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user