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">
|
<section [class.hidden]="!viewReady">
|
||||||
<div class="page-header">
|
<div class="page-header">
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<mat-slide-toggle [(ngModel)]="redactedView" color="primary" labelPosition="after">
|
<div
|
||||||
{{ 'file-preview.view-toggle' | translate }}
|
class="fit-content"
|
||||||
</mat-slide-toggle>
|
[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>
|
||||||
|
|
||||||
<div class="flex-1 filename page-title">
|
<div class="flex-1 filename page-title">
|
||||||
|
|||||||
@ -118,6 +118,13 @@ export class FilePreviewScreenComponent implements OnInit {
|
|||||||
|
|
||||||
canPerformAnnotationActions: boolean;
|
canPerformAnnotationActions: boolean;
|
||||||
|
|
||||||
|
get canNotSwitchToRedactedView() {
|
||||||
|
return (
|
||||||
|
this.appStateService.fileNotUpToDateWithDictionary() ||
|
||||||
|
this.fileData?.entriesToAdd?.length > 0
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public ngOnInit(): void {
|
public ngOnInit(): void {
|
||||||
this.canPerformAnnotationActions = this.appStateService.canPerformAnnotationActionsOnCurrentFile();
|
this.canPerformAnnotationActions = this.appStateService.canPerformAnnotationActionsOnCurrentFile();
|
||||||
this._loadFileData().subscribe(() => {});
|
this._loadFileData().subscribe(() => {});
|
||||||
|
|||||||
@ -247,6 +247,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"file-preview": {
|
"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... ",
|
"reanalyse-file": "File reanalysis in progress... ",
|
||||||
"view-toggle": "Redacted View",
|
"view-toggle": "Redacted View",
|
||||||
"tabs": {
|
"tabs": {
|
||||||
|
|||||||
@ -198,3 +198,7 @@ body {
|
|||||||
height: calc(100vh - 61px);
|
height: calc(100vh - 61px);
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.fit-content {
|
||||||
|
width: fit-content;
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user