Merge branch 'RED-3800' into 'master'

RED-3800: Moved visibility icons to common-ui

Closes RED-3800

See merge request redactmanager/red-ui!448
This commit is contained in:
Dan Percic 2024-06-10 15:56:51 +02:00
commit 93f8a0a4d3
7 changed files with 28 additions and 40 deletions

View File

@ -7,20 +7,20 @@
<ng-container *ngIf="resizing && annotationPermissions.canResizeAnnotation">
<iqser-circle-button
(action)="acceptResize()"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-accept_resize' : 'annotations-accept_resize'"
[class.disabled]="!resized"
[tooltipPosition]="tooltipPosition"
[tooltip]="resized ? ('annotation-actions.resize-accept.label' | translate) : ''"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-accept_resize' : 'annotations-accept_resize'"
icon="iqser:check"
></iqser-circle-button>
<iqser-circle-button
(action)="cancelResize()"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-cancel_resize' : 'annotations-cancel_resize'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize-cancel.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-cancel_resize' : 'annotations-cancel_resize'"
icon="iqser:close"
></iqser-circle-button>
</ng-container>
@ -31,10 +31,10 @@
(action)="resize()"
*ngIf="canResize"
[attr.help-mode-key]="helpModeKey('resize')"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-resize' : 'annotations-resize'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.resize.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-resize' : 'annotations-resize'"
icon="iqser:resize"
></iqser-circle-button>
@ -42,10 +42,10 @@
(action)="annotationActionsService.editRedaction(annotations)"
*ngIf="canEdit"
[attr.help-mode-key]="helpModeKey('edit')"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-edit' : 'annotations-edit'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.edit-redaction.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-edit' : 'annotations-edit'"
icon="iqser:edit"
></iqser-circle-button>
@ -53,14 +53,14 @@
(action)="acceptRecommendation()"
*ngIf="canAcceptRecommendation"
[attr.help-mode-key]="helpModeKey('accept')"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
[type]="buttonType"
[buttonId]="
annotations.length === 1
? 'annotation-' + annotations[0].id + '-accept_recommendation'
: 'annotations-accept_recommendation'
"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.accept-recommendation.label' | translate"
[type]="buttonType"
icon="iqser:check"
></iqser-circle-button>
@ -104,21 +104,21 @@
(action)="annotationActionsService.forceAnnotation(annotations)"
*ngIf="canForceRedaction"
[attr.help-mode-key]="helpModeKey('force')"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_redaction' : 'annotations-force_redaction'"
[icon]="isImageHint ? 'red:pdftron-action-add-redaction' : 'iqser:thumb-up'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-redaction.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_redaction' : 'annotations-force_redaction'"
[icon]="isImageHint ? 'red:pdftron-action-add-redaction' : 'iqser:thumb-up'"
></iqser-circle-button>
<iqser-circle-button
(action)="annotationActionsService.forceAnnotation(annotations, true)"
*ngIf="canForceHint"
[attr.help-mode-key]="actionsHelpModeKey"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_hint' : 'annotations-force_hint'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.force-hint.label' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-force_hint' : 'annotations-force_hint'"
icon="iqser:thumb-up"
></iqser-circle-button>
@ -126,31 +126,31 @@
(action)="hideAnnotation()"
*ngIf="isImage && isVisible() && !hideSkipped"
[attr.help-mode-key]="helpModeKey('hide')"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-hide' : 'annotations-hide'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.hide' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-hide' : 'annotations-hide'"
icon="red:visibility-off"
icon="iqser:visibility-off"
></iqser-circle-button>
<iqser-circle-button
(action)="showAnnotation()"
*ngIf="isImage && !isVisible() && !hideSkipped"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-show' : 'annotations-show'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.show' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-show' : 'annotations-show'"
icon="red:visibility"
icon="iqser:visibility"
></iqser-circle-button>
<iqser-circle-button
(action)="removeRedaction()"
*ngIf="canRemoveRedaction"
[attr.help-mode-key]="helpModeKey('remove')"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-remove' : 'annotations-remove'"
[tooltipPosition]="tooltipPosition"
[tooltip]="'annotation-actions.remove-annotation.remove-redaction' | translate"
[type]="buttonType"
[buttonId]="annotations.length === 1 ? 'annotation-' + annotations[0].id + '-remove' : 'annotations-remove'"
icon="iqser:trash"
></iqser-circle-button>
</ng-container>

View File

@ -68,8 +68,8 @@
<iqser-circle-button
(action)="multiSelectService.deactivate()"
[type]="circleButtonTypes.primary"
[tooltip]="'file-preview.tabs.multi-select.close' | translate"
[type]="circleButtonTypes.primary"
icon="iqser:close"
tooltipPosition="before"
></iqser-circle-button>
@ -223,7 +223,7 @@
<iqser-circle-button
(action)="skippedService.toggleSkipped()"
*ngIf="filter.id === 'skipped'"
[icon]="skippedService.hideSkipped() ? 'red:visibility-off' : 'red:visibility'"
[icon]="skippedService.hideSkipped() ? 'iqser:visibility-off' : 'iqser:visibility'"
[tooltip]="
(skippedService.hideSkipped() ? 'file-preview.tabs.annotations.show-skipped' : 'file-preview.tabs.annotations.hide-skipped')
| translate

View File

@ -38,21 +38,12 @@ import { ManualRedactionService } from './manual-redaction.service';
import { MultiSelectService } from './multi-select.service';
import { PdfAnnotationActionsService } from './pdf-annotation-actions.service';
import { ViewModeService } from './view-mode.service';
import { SkippedService } from './skipped.service';
import Annotation = Core.Annotations.Annotation;
import Quad = Core.Math.Quad;
import { SkippedService } from './skipped.service';
@Injectable()
export class PdfProxyService {
readonly #convertPath = inject(UI_ROOT_PATH_FN);
readonly #visibilityOffIcon = this.#convertPath('/assets/icons/general/visibility-off.svg');
readonly #visibilityIcon = this.#convertPath('/assets/icons/general/visibility.svg');
readonly #falsePositiveIcon = this.#convertPath('/assets/icons/general/pdftron-action-false-positive.svg');
readonly #addRedactionIcon = this._iqserPermissionsService.has(Roles.getRss)
? this.#convertPath('/assets/icons/general/pdftron-action-add-annotation.svg')
: this.#convertPath('/assets/icons/general/pdftron-action-add-redaction.svg');
readonly #isDocumine = getConfig().IS_DOCUMINE;
readonly #addHintIcon = this.#convertPath('/assets/icons/general/pdftron-action-add-hint.svg');
readonly annotationSelected$ = this.#annotationSelected$;
readonly manualAnnotationRequested$ = new Subject<ManualRedactionEntryWrapper>();
readonly redactTextRequested$ = new Subject<ManualRedactionEntryWrapper>();
@ -71,6 +62,15 @@ export class PdfProxyService {
const isAllowed = this._permissionsService.canPerformAnnotationActions(this._state.file(), this._state.dossier());
return isAllowed && isStandard;
});
readonly #convertPath = inject(UI_ROOT_PATH_FN);
readonly #visibilityOffIcon = this.#convertPath('/assets/icons/visibility-off.svg');
readonly #visibilityIcon = this.#convertPath('/assets/icons/visibility.svg');
readonly #falsePositiveIcon = this.#convertPath('/assets/icons/general/pdftron-action-false-positive.svg');
readonly #addRedactionIcon = this._iqserPermissionsService.has(Roles.getRss)
? this.#convertPath('/assets/icons/general/pdftron-action-add-annotation.svg')
: this.#convertPath('/assets/icons/general/pdftron-action-add-redaction.svg');
readonly #isDocumine = getConfig().IS_DOCUMINE;
readonly #addHintIcon = this.#convertPath('/assets/icons/general/pdftron-action-add-hint.svg');
constructor(
private readonly _translateService: TranslateService,

View File

@ -83,8 +83,6 @@ export class IconsModule {
'under-construction',
'undo',
'user',
'visibility',
'visibility-off',
'warning',
'pdftron-action-add-redaction',
];

View File

@ -1,5 +0,0 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0zm0 0h24v24H0z" fill="none" />
<path
d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z" />
</svg>

Before

Width:  |  Height:  |  Size: 704 B

View File

@ -1,5 +0,0 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="M0 0h24v24H0z" fill="none" />
<path
d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" />
</svg>

Before

Width:  |  Height:  |  Size: 369 B

@ -1 +1 @@
Subproject commit 5eef6d403a57c224eec836d9d98787c6a128c50a
Subproject commit 04eaca1600149e3f4e803fd2334c25465197dbf6