Redacted view no longer available if data is out of sync
This commit is contained in:
parent
cf1132745a
commit
081a25d3d6
@ -1,9 +1,24 @@
|
||||
<section [class.hidden]="!viewReady">
|
||||
<div class="page-header">
|
||||
<div class="flex-1">
|
||||
<mat-slide-toggle [(ngModel)]="redactedView" color="primary" labelPosition="after">
|
||||
{{ 'file-preview.view-toggle' | translate }}
|
||||
</mat-slide-toggle>
|
||||
<div
|
||||
class="fit-content"
|
||||
[matTooltip]="
|
||||
(canNotSwitchToRedactedView
|
||||
? 'file-preview.cannot-show-redacted-view'
|
||||
: 'file-preview.show-redacted-view'
|
||||
) | translate
|
||||
"
|
||||
>
|
||||
<mat-slide-toggle
|
||||
[(ngModel)]="redactedView"
|
||||
color="primary"
|
||||
labelPosition="after"
|
||||
[disabled]="canNotSwitchToRedactedView"
|
||||
>
|
||||
{{ 'file-preview.view-toggle' | translate }}
|
||||
</mat-slide-toggle>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-1 filename page-title">
|
||||
|
||||
@ -118,6 +118,13 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
|
||||
canPerformAnnotationActions: boolean;
|
||||
|
||||
get canNotSwitchToRedactedView() {
|
||||
return (
|
||||
this.appStateService.fileNotUpToDateWithDictionary() ||
|
||||
this.fileData?.entriesToAdd?.length > 0
|
||||
);
|
||||
}
|
||||
|
||||
public ngOnInit(): void {
|
||||
this.canPerformAnnotationActions = this.appStateService.canPerformAnnotationActionsOnCurrentFile();
|
||||
this._loadFileData().subscribe(() => {});
|
||||
|
||||
@ -247,6 +247,8 @@
|
||||
}
|
||||
},
|
||||
"file-preview": {
|
||||
"show-redacted-view": "Show Redacted Preview",
|
||||
"cannot-show-redacted-view": "Redactions out of sync. Redacted Preview only available after reanalysis",
|
||||
"reanalyse-file": "File reanalysis in progress... ",
|
||||
"view-toggle": "Redacted View",
|
||||
"tabs": {
|
||||
|
||||
@ -198,3 +198,7 @@ body {
|
||||
height: calc(100vh - 61px);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fit-content {
|
||||
width: fit-content;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user