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"
|
||||
},
|
||||
"LOADING": "Loading",
|
||||
"UNKNOWN_FORMAT": "Couldn't load preview",
|
||||
"UNKNOWN_FORMAT": "Couldn't load preview. Unknown format.",
|
||||
"SIDEBAR": {
|
||||
"THUMBNAILS": {
|
||||
"PAGE": "Page {{ pageNum }}"
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<div class="adf-viewer__unknown-format-view">
|
||||
<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>
|
||||
</div>
|
||||
|
@@ -200,6 +200,8 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
@Output()
|
||||
invalidSharedLink = new EventEmitter();
|
||||
|
||||
TRY_TIMEOUT: number = 2000;
|
||||
|
||||
viewerType = 'unknown';
|
||||
isLoading = false;
|
||||
nodeEntry: NodeEntry;
|
||||
@@ -692,8 +694,12 @@ export class ViewerComponent implements OnChanges, OnInit, OnDestroy {
|
||||
this.viewerType = 'error_in_creation';
|
||||
return reject();
|
||||
});
|
||||
} else {
|
||||
this.isLoading = false;
|
||||
this.viewerType = 'error_in_creation';
|
||||
clearInterval(intervalId);
|
||||
}
|
||||
}, 1000);
|
||||
}, this.TRY_TIMEOUT);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user