From fb0da0b431a86287bd668da21d07a325123d40db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adina=20=C8=9Aeudan?= Date: Sun, 4 Feb 2024 10:37:57 +0200 Subject: [PATCH] RED-3800: Moved some icons to common-ui --- .../annotation-actions.component.html | 36 +++++++++---------- .../pdf-annotation-actions.service.ts | 4 +-- .../src/app/modules/icons/icons.module.ts | 8 ++--- .../red-ui/src/assets/icons/general/check.svg | 11 ------ .../red-ui/src/assets/icons/general/close.svg | 9 ----- apps/red-ui/src/assets/icons/general/edit.svg | 9 ----- .../src/assets/icons/general/resize.svg | 26 -------------- .../src/assets/icons/general/thumb-down.svg | 9 ----- .../src/assets/icons/general/thumb-up.svg | 9 ----- .../red-ui/src/assets/icons/general/trash.svg | 9 ----- libs/common-ui | 2 +- 11 files changed, 25 insertions(+), 107 deletions(-) delete mode 100644 apps/red-ui/src/assets/icons/general/check.svg delete mode 100644 apps/red-ui/src/assets/icons/general/close.svg delete mode 100644 apps/red-ui/src/assets/icons/general/edit.svg delete mode 100644 apps/red-ui/src/assets/icons/general/resize.svg delete mode 100644 apps/red-ui/src/assets/icons/general/thumb-down.svg delete mode 100644 apps/red-ui/src/assets/icons/general/thumb-up.svg delete mode 100644 apps/red-ui/src/assets/icons/general/trash.svg diff --git a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html index cd883f28c..269430b63 100644 --- a/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/modules/file-preview/components/annotation-actions/annotation-actions.component.html @@ -7,20 +7,20 @@ @@ -30,130 +30,130 @@ diff --git a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts index 5bc948141..dae0111cf 100644 --- a/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/file-preview/services/pdf-annotation-actions.service.ts @@ -33,7 +33,7 @@ export class PdfAnnotationActionsService { const firstAnnotation = annotations[0]; // if we already entered resize-mode previously if (firstAnnotation.id === this.#annotationManager.resizingAnnotationId) { - let acceptResizeButton; + let acceptResizeButton: IHeaderElement; if (this.#annotationManager.annotationHasBeenResized) { acceptResizeButton = this.#getButton('check', _('annotation-actions.resize-accept.label'), () => this.#annotationActionsService.acceptResize(firstAnnotation), @@ -107,7 +107,7 @@ export class PdfAnnotationActionsService { #getButton(icon: string, title: string, action: () => void | Promise): IHeaderElement { return { type: 'actionButton', - img: this.#convertPath(`/assets/icons/general/${icon}.svg`), + img: this.#convertPath(`/assets/icons/${icon}.svg`), title: this.#translateService.instant(title), onClick: () => this.#ngZone.run(async () => action()), }; diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index d634861b4..45e74b71f 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -12,7 +12,10 @@ import { getConfig } from '@common-ui/services'; export class IconsModule { readonly config = getConfig(); - constructor(private readonly _iconRegistry: MatIconRegistry, private readonly _sanitizer: DomSanitizer) { + constructor( + private readonly _iconRegistry: MatIconRegistry, + private readonly _sanitizer: DomSanitizer, + ) { const icons = [ 'ai', 'alert-circle', @@ -70,7 +73,6 @@ export class IconsModule { 'reference', 'remove-from-dict', 'report', - 'resize', 'rotation', 'rss', 'rule', @@ -79,8 +81,6 @@ export class IconsModule { 'status', 'status-info', 'template', - 'thumb-down', - 'thumb-up', 'under-construction', 'undo', 'user', diff --git a/apps/red-ui/src/assets/icons/general/check.svg b/apps/red-ui/src/assets/icons/general/check.svg deleted file mode 100644 index 65f074eb0..000000000 --- a/apps/red-ui/src/assets/icons/general/check.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/close.svg b/apps/red-ui/src/assets/icons/general/close.svg deleted file mode 100644 index d12857ac2..000000000 --- a/apps/red-ui/src/assets/icons/general/close.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/edit.svg b/apps/red-ui/src/assets/icons/general/edit.svg deleted file mode 100644 index 7f137cee2..000000000 --- a/apps/red-ui/src/assets/icons/general/edit.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/resize.svg b/apps/red-ui/src/assets/icons/general/resize.svg deleted file mode 100644 index d0bd1e4c2..000000000 --- a/apps/red-ui/src/assets/icons/general/resize.svg +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/thumb-down.svg b/apps/red-ui/src/assets/icons/general/thumb-down.svg deleted file mode 100644 index 30dc2d870..000000000 --- a/apps/red-ui/src/assets/icons/general/thumb-down.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/thumb-up.svg b/apps/red-ui/src/assets/icons/general/thumb-up.svg deleted file mode 100644 index bcbc3ae06..000000000 --- a/apps/red-ui/src/assets/icons/general/thumb-up.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/apps/red-ui/src/assets/icons/general/trash.svg b/apps/red-ui/src/assets/icons/general/trash.svg deleted file mode 100644 index 8916c8532..000000000 --- a/apps/red-ui/src/assets/icons/general/trash.svg +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/libs/common-ui b/libs/common-ui index 7c7cdfda5..b4007f3fe 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 7c7cdfda51edc8896061a633814cfd36fc1b5a16 +Subproject commit b4007f3fe5ff4b82dfad5f4aa83298889fd12570