From 216fc43d3abc25d8f8781f03f422c1c00a731897 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Thu, 4 Jul 2024 14:10:12 +0300 Subject: [PATCH] ui fixes --- dmp-frontend/src/app/app.component.ts | 14 ++++++++------ .../annotation-dialog.component.html | 9 ++++----- .../annotation-dialog.component.ts | 3 +-- .../table-of-contents.component.ts | 2 +- .../src/assets/images/annotations/paper-plane.svg | 14 ++++++++++++++ 5 files changed, 28 insertions(+), 14 deletions(-) create mode 100644 dmp-frontend/src/assets/images/annotations/paper-plane.svg diff --git a/dmp-frontend/src/app/app.component.ts b/dmp-frontend/src/app/app.component.ts index ab96bdb2a..d584f1716 100644 --- a/dmp-frontend/src/app/app.component.ts +++ b/dmp-frontend/src/app/app.component.ts @@ -8,22 +8,19 @@ import { filter, map, switchMap } from 'rxjs/operators'; import { AuthService, LoginStatus } from './core/services/auth/auth.service'; import { CultureService } from './core/services/culture/culture-service'; // import { BreadCrumbResolverService } from './ui/misc/breadcrumb/service/breadcrumb.service'; -import { Title } from '@angular/platform-browser'; +import { DomSanitizer, Title } from '@angular/platform-browser'; import { CookieService } from "ngx-cookie-service"; import { NgcCookieConsentService, NgcStatusChangeEvent } from "ngx-cookieconsent"; import { ConfigurationService } from './core/services/configuration/configuration.service'; import { LanguageService } from './core/services/language/language.service'; import { MatSidenav } from '@angular/material/sidenav'; -import { nameof } from 'ts-simple-nameof'; -import { TenantConfigurationType } from './core/common/enum/tenant-configuration-type'; -import { CssColorsTenantConfiguration, TenantConfiguration } from './core/model/tenant-configuaration/tenant-configuration'; import { MatomoService } from './core/services/matomo/matomo-service'; import { SideNavService } from './core/services/sidenav/side-nav.sevice'; -import { TenantConfigurationService } from './core/services/tenant-configuration/tenant-configuration.service'; import { TimezoneService } from './core/services/timezone/timezone-service'; import { BreadcrumbService } from './ui/misc/breadcrumb/breadcrumb.service'; import { TenantHandlingService } from './core/services/tenant/tenant-handling.service'; +import { MatIconRegistry } from '@angular/material/icon'; declare const gapi: any; @@ -62,11 +59,16 @@ export class AppComponent implements OnInit, AfterViewInit { private matomoService: MatomoService, private tenantHandlingService: TenantHandlingService, private sidenavService: SideNavService, - private breadcrumbService: BreadcrumbService + private breadcrumbService: BreadcrumbService, + private sanitizer: DomSanitizer, + public iconRegistry: MatIconRegistry, ) { this.initializeServices(); this.matomoService.init(); this.helpContentEnabled = configurationService.helpService.enabled; + + const paperPlaneIconSrc = this.sanitizer.bypassSecurityTrustResourceUrl('/assets/images/annotations/paper-plane.svg'); + iconRegistry.addSvgIcon('paperPlane', paperPlaneIconSrc); } ngAfterViewInit(): void { setTimeout(() => { diff --git a/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.html b/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.html index 148692bf0..fb6435e39 100644 --- a/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.html +++ b/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.html @@ -15,7 +15,6 @@
-
@@ -77,7 +76,7 @@
-
+
@@ -90,7 +89,7 @@
-
+
{{getParentAnnotation(thread).author.name}} @@ -182,8 +181,8 @@
-
diff --git a/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts b/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts index 320aa4bf9..7d7c3253a 100644 --- a/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts +++ b/dmp-frontend/src/app/ui/annotations/annotation-dialog-component/annotation-dialog.component.ts @@ -22,7 +22,6 @@ import { takeUntil } from 'rxjs/operators'; import { nameof } from 'ts-simple-nameof'; import { AnnotationStatusArrayEditorModel } from './annotation-status-editor.model'; import { StatusService } from '@annotation-service/services/http/status.service'; -import { InternalStatus } from '@annotation-service/core/enum/internal-status.enum'; import { ConfigurationService } from '@app/core/services/configuration/configuration.service'; import { MatSelectionList } from '@angular/material/list'; @@ -55,7 +54,7 @@ export class AnnotationDialogComponent extends BaseComponent { public annotationStatusFormGroup: UntypedFormGroup; public listingStatuses: Status[] = []; public dmpUsersMentionNames: string[] = []; - + @ViewChild('annotationStatus') annotationStatus: MatSelectionList; diff --git a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.component.ts b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.component.ts index 460a7777f..83c0bb3b9 100644 --- a/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.component.ts +++ b/dmp-frontend/src/app/ui/description/editor/table-of-contents/table-of-contents.component.ts @@ -341,7 +341,7 @@ export class TableOfContentsComponent extends BaseComponent implements OnInit, O this.pauseIntersectionObserver = true; this.tocentrySelected = entry; this.entrySelected.emit({ entry: entry, execute: execute }); - setTimeout(() => this.pauseIntersectionObserver = false, 1000); + setTimeout(() => this.pauseIntersectionObserver = false, 2000); } /** diff --git a/dmp-frontend/src/assets/images/annotations/paper-plane.svg b/dmp-frontend/src/assets/images/annotations/paper-plane.svg new file mode 100644 index 000000000..a893ac2d6 --- /dev/null +++ b/dmp-frontend/src/assets/images/annotations/paper-plane.svg @@ -0,0 +1,14 @@ + + + + + + + +