diff --git a/apps/red-ui/src/app/components/base-screen/base-screen.component.html b/apps/red-ui/src/app/components/base-screen/base-screen.component.html index 27464cdbd..c6b7b8f21 100644 --- a/apps/red-ui/src/app/components/base-screen/base-screen.component.html +++ b/apps/red-ui/src/app/components/base-screen/base-screen.component.html @@ -25,7 +25,7 @@ [placeholder]="'search.placeholder' | translate" > - +
-
-
+
+
diff --git a/apps/red-ui/src/app/modules/account/base-account-screen/base-account-screen-component.ts b/apps/red-ui/src/app/modules/account/base-account-screen/base-account-screen-component.ts index 2bb8b28f8..3305fc65f 100644 --- a/apps/red-ui/src/app/modules/account/base-account-screen/base-account-screen-component.ts +++ b/apps/red-ui/src/app/modules/account/base-account-screen/base-account-screen-component.ts @@ -11,16 +11,21 @@ import { accountTranslations } from '@translations/account-translations'; export class BaseAccountScreenComponent implements OnInit { readonly translations = accountTranslations; readonly path: string; + readonly isWarningsScreen: boolean; - constructor(private readonly _router: Router, private readonly _hostRef: ViewContainerRef) { + constructor( + private readonly _router: Router, + private readonly _hostRef: ViewContainerRef, + ) { this.path = this._router.url.split('/').pop(); + this.isWarningsScreen = this.path === 'warnings-preferences'; } ngOnInit(): void { - this._setDialogWidth(); + this.#setDialogWidth(); } - private _setDialogWidth() { + #setDialogWidth() { const element = this._hostRef.element.nativeElement as HTMLElement; element.style.setProperty('--width', this.path === 'user-profile' ? 'unset' : '100%'); } diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.html b/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.html index 67efc5106..29a462da6 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.html +++ b/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.html @@ -1,77 +1,79 @@ -
-
-

{{ 'dialog-defaults-form.title' | translate }}

-

{{ 'dialog-defaults-form.redaction.title' | translate }}

-
- - - - {{ - option.label | translate - }} - - - {{ - 'dialog-defaults-form.extra-option-label' | translate - }} +
+ +
+

{{ 'dialog-defaults-form.title' | translate }}

+

{{ 'dialog-defaults-form.redaction.title' | translate }}

+
+ + + + {{ + option.label | translate + }} + + + {{ + 'dialog-defaults-form.extra-option-label' | translate + }} +
+
+ + + + {{ + option.label | translate + }} + + + {{ + 'dialog-defaults-form.extra-option-label' | translate + }} +
+

{{ 'dialog-defaults-form.recommendation.title' | translate }}

+
+ + + + {{ + option.label | translate + }} + + + {{ + 'dialog-defaults-form.extra-option-label' | translate + }} +
+

{{ 'dialog-defaults-form.hint.title' | translate }}

+
+ + + + {{ option.label | translate }} + + + {{ + 'dialog-defaults-form.extra-option-label' | translate + }} +
+
+ + + + {{ option.label | translate }} + + + {{ + 'dialog-defaults-form.extra-option-label' | translate + }} +
-
- - - - {{ - option.label | translate - }} - - - {{ - 'dialog-defaults-form.extra-option-label' | translate - }} +
+
-

{{ 'dialog-defaults-form.recommendation.title' | translate }}

-
- - - - {{ - option.label | translate - }} - - - {{ - 'dialog-defaults-form.extra-option-label' | translate - }} -
-

{{ 'dialog-defaults-form.hint.title' | translate }}

-
- - - - {{ option.label | translate }} - - - {{ - 'dialog-defaults-form.extra-option-label' | translate - }} -
-
- - - - {{ option.label | translate }} - - - {{ - 'dialog-defaults-form.extra-option-label' | translate - }} -
-
-
- -
- + +
diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.scss b/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.scss index 8b82b1023..931d87f46 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.scss +++ b/apps/red-ui/src/app/modules/account/screens/preferences/dialog-defaults/dialog-defaults.component.scss @@ -1,3 +1,16 @@ mat-checkbox { margin: 8px 0 0 8px; } + +h3 { + margin-top: 24px; + margin-bottom: 4px; +} + +form .iqser-input-group:not(first-of-type) { + margin-top: 8px; +} + +.dialog { + margin-bottom: 0; +} diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.html b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.html index 1102780a9..ad1f6dd44 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.html +++ b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.html @@ -1,46 +1,53 @@ -
-
-
- -
- - {{ 'preferences-screen.form.auto-expand-filters-on-action' | translate }} - -
+
+ +
+
+ +
+ + {{ 'preferences-screen.form.auto-expand-filters-on-action' | translate }} + +
-
- - {{ 'preferences-screen.form.open-structured-view-by-default' | translate }} - -
+
+ + {{ 'preferences-screen.form.open-structured-view-by-default' | translate }} + +
-
- - -
-
+
+ + +
+ - -

{{ 'preferences-screen.warnings-subtitle' | translate }}

-

{{ 'preferences-screen.warnings-description' | translate }}

+ +

{{ 'preferences-screen.warnings-subtitle' | translate }}

+

{{ 'preferences-screen.warnings-description' | translate }}

-
- - {{ 'preferences-screen.form.load-all-annotations-warning' | translate }} - -
-
+
+ + {{ 'preferences-screen.form.load-all-annotations-warning' | translate }} + +
+
+ + {{ 'preferences-screen.form.help-mode-dialog' | translate }} + +
+
+
-
-
- -
- +
+ +
+ +
diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.scss b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.scss index 984c6af08..76f9b7458 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.scss +++ b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.scss @@ -1,10 +1,3 @@ -@use 'variables'; - -.content-delimiter { - border-top: 1px solid var(--iqser-separator); - margin-bottom: 15px; -} - .warnings-description { width: 105%; } diff --git a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts index 0d640eb8d..c33a60f26 100644 --- a/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts +++ b/apps/red-ui/src/app/modules/account/screens/preferences/preferences.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { BaseFormComponent, getConfig, IqserPermissionsService, isIqserDevMode, LoadingService } from '@iqser/common-ui'; +import { BaseFormComponent, getConfig, IqserPermissionsService, isIqserDevMode, KEYS, LoadingService } from '@iqser/common-ui'; import { AsControl } from '@iqser/common-ui/lib/utils'; import { Roles } from '@users/roles'; import { PreferencesKeys, UserPreferenceService } from '@users/user-preference.service'; @@ -13,6 +13,7 @@ interface PreferencesForm { tableExtractionType: string; // warnings preferences loadAllAnnotationsWarning: boolean; + helpModeDialog: boolean; [k: string]: any; } @@ -55,6 +56,7 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit { tableExtractionType: [this.userPreferenceService.getTableExtractionType()], // warnings preferences loadAllAnnotationsWarning: [this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning)], + helpModeDialog: [this.userPreferenceService.getBool(KEYS.helpModeDialog)], }); if (!this._permissionsService.has(Roles.managePreferences)) { @@ -95,6 +97,10 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit { ); } + if (this.form.controls.helpModeDialog.value !== this.userPreferenceService.getBool(KEYS.helpModeDialog)) { + await this.userPreferenceService.save(KEYS.helpModeDialog, String(this.form.controls.helpModeDialog.value)); + } + await this.userPreferenceService.reload(); this.#patchValues(); @@ -108,6 +114,7 @@ export class PreferencesComponent extends BaseFormComponent implements OnInit { openScmDialogByDefault: this.userPreferenceService.getOpenScmDialogByDefault(), tableExtractionType: this.userPreferenceService.getTableExtractionType(), loadAllAnnotationsWarning: this.userPreferenceService.getBool(PreferencesKeys.loadAllAnnotationsWarning), + helpModeDialog: this.userPreferenceService.getBool(KEYS.helpModeDialog), }); } } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-clone-dossier-template-dialog/add-clone-dossier-template-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-clone-dossier-template-dialog/add-clone-dossier-template-dialog.component.html index 622e8ed32..eb1b24f9f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-clone-dossier-template-dialog/add-clone-dossier-template-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-clone-dossier-template-dialog/add-clone-dossier-template-dialog.component.html @@ -41,11 +41,6 @@ [label]="'add-clone-dossier-template.save-and-edit' | translate" [type]="iconButtonTypes.dark" > - -
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html index 5acca05b3..e795801a3 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-entity-dialog/add-entity-dialog.component.html @@ -16,7 +16,7 @@ [type]="iconButtonTypes.primary" > - +
diff --git a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html index d6c524524..22a89ba5b 100644 --- a/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/entities/screens/entity-info/entity-info.component.html @@ -27,7 +27,7 @@
- +
diff --git a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html index ff2097450..ef389318d 100644 --- a/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/file-attributes-listing/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html @@ -1,5 +1,5 @@
-
+
@@ -51,7 +51,7 @@ - +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html index b73fa0ade..58636d2b0 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html @@ -116,7 +116,7 @@
- +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html index 1b45af6e6..3c4c15b55 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/force-redaction-dialog/force-annotation-dialog.component.html @@ -44,7 +44,7 @@ > - +
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.html index 6f104f52e..90d8d8ae5 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.html @@ -23,7 +23,7 @@
- {{ translations[data.operation].confirmation | translate : { count: data.highlights.length } }} + {{ translations[data.operation].confirmation | translate: { count: data.highlights.length } }}
@@ -39,7 +39,7 @@
- + diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html index f2d6315d2..b0906c3e3 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.html @@ -33,7 +33,7 @@ (action)="toggleEditingSelectedText()" *ngIf="dictionaryRequest && !isEditingSelectedText" [tooltip]="'redact-text.dialog.content.edit-text' | translate" - [size]="18" + [size]="20" [iconSize]="13" icon="iqser:edit" tooltipPosition="below" @@ -44,7 +44,7 @@ *ngIf="isEditingSelectedText" [showDot]="initialText !== form.get('selectedText').value" [tooltip]="'redact-text.dialog.content.revert-text' | translate" - [size]="18" + [size]="20" [iconSize]="13" class="undo-button" icon="red:undo" diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss index c774426d3..22fe3116d 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/redact-text-dialog/redact-text-dialog.component.scss @@ -19,6 +19,10 @@ iqser-circle-button { &.undo-button { margin-left: 8px; } + + ::ng-deep mat-icon { + padding: 2px; + } } .w-full { diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html index 1acb8a0e6..57a5a3655 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/remove-redaction-dialog/remove-redaction-dialog.component.html @@ -39,7 +39,7 @@
- + diff --git a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html index b8160faad..e4961c79b 100644 --- a/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared-dossiers/dialogs/edit-dossier-dialog/edit-dossier-dialog.component.html @@ -74,7 +74,7 @@
- + diff --git a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html index 42a33d4dd..1e5f43d09 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html +++ b/apps/red-ui/src/app/modules/shared/dialogs/add-dossier-dialog/add-dossier-dialog.component.html @@ -121,7 +121,7 @@ icon="red:assign" > - + diff --git a/apps/red-ui/src/app/translations/account-translations.ts b/apps/red-ui/src/app/translations/account-translations.ts index 77ca13811..88b9efac4 100644 --- a/apps/red-ui/src/app/translations/account-translations.ts +++ b/apps/red-ui/src/app/translations/account-translations.ts @@ -4,5 +4,4 @@ export const accountTranslations: Record = { notifications: _('notifications-screen.title'), 'user-profile': _('user-profile-screen.title'), preferences: _('preferences-screen.title'), - 'warnings-preferences': _('preferences-screen.warnings-title'), }; diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 6786efd13..084bcb5c1 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -686,23 +686,23 @@ }, "dev-mode": "DEV", "dialog-defaults-form": { - "extra-option-label": "", + "extra-option-label": "Apply to all active and future dossiers", "hint": { - "add-dialog": "", - "remove-dialog": "", - "title": "" + "add-dialog": "Add hint", + "remove-dialog": "Remove hint", + "title": "Hint" }, "recommendation": { - "remove-dialog": "", - "title": "" + "remove-dialog": "Remove recommendation", + "title": "Recommendation" }, "redaction": { - "add-dialog": "", - "remove-dialog": "", - "title": "" + "add-dialog": "Redact text", + "remove-dialog": "Remove redaction", + "title": "Redaction" }, - "system-default": "", - "title": "" + "system-default": "Use system default", + "title": "Dialog defaults" }, "dictionary": "Wörterbuch", "dictionary-overview": { diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index dc4bfcdd2..603905e9d 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -1647,9 +1647,11 @@ }, "help-mode": { "bottom-text": "Help mode", - "button-text": "Help mode (H)", "clicking-anywhere-on": " Clicking anywhere on the screen will show you which areas are interactive. Hovering an interactive area will change the mouse cursor to let you know if the element is interactive.", "instructions": "Open help mode instructions", + "options": { + "do-not-show-again": "Do not show again" + }, "welcome-to-help-mode": " Welcome to help mode!
Clicking on interactive elements will open info about them in new tab.
" }, "highlight-action-dialog": { @@ -1973,6 +1975,7 @@ }, "form": { "auto-expand-filters-on-action": "Auto-expand filters on my actions", + "help-mode-dialog": "Help Mode Dialog", "load-all-annotations-warning": "Warning regarding loading all annotations at once in file preview", "open-structured-view-by-default": "Display structured component management modal by default", "table-extraction-type": "Table extraction type" diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index 8a1bde077..90c507af3 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -1647,9 +1647,11 @@ }, "help-mode": { "bottom-text": "Help mode", - "button-text": "Help mode (H)", "clicking-anywhere-on": " Clicking anywhere on the screen will show you which areas are interactive. Hovering an interactive area will change the mouse cursor to let you know if the element is interactive.", "instructions": "Open help mode instructions", + "options": { + "do-not-show-again": "Do not show again" + }, "welcome-to-help-mode": " Welcome to help mode!
Clicking on interactive elements will open info about them in new tab.
" }, "highlight-action-dialog": { @@ -1973,6 +1975,7 @@ }, "form": { "auto-expand-filters-on-action": "Auto expand filters on my actions", + "help-mode-dialog": "Help Mode Dialog", "load-all-annotations-warning": "Warning regarding loading all annotations at once in file preview", "open-structured-view-by-default": "Display Component View by default when opening a document", "table-extraction-type": "Table extraction type" diff --git a/libs/common-ui b/libs/common-ui index 6f288516e..4811d301e 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit 6f288516e3efa36ec9f1f9eb02d0374c988d3432 +Subproject commit 4811d301e6980d3f7fb0125c673cb6b8b9b4f0cf