diff --git a/src/app/components/header/info-bar/info-bar.component.html b/src/app/components/header/info-bar/info-bar.component.html index ffd9f3344..8d0c2b851 100644 --- a/src/app/components/header/info-bar/info-bar.component.html +++ b/src/app/components/header/info-bar/info-bar.component.html @@ -27,14 +27,6 @@ {{ 'PRODUCT_TYPES' | translate }}: {{ eventProductTypes }} } - @if ((searchType$ | async) === searchTypes.DISPLACEMENT) { - - - - } @if (breakpoint > breakpoints.SMALL && !!startDate) { {{ 'START' | translate }}: {{ startDate | shortDate }} diff --git a/src/app/components/header/info-bar/info-bar.component.ts b/src/app/components/header/info-bar/info-bar.component.ts index 2e2444c88..450963238 100644 --- a/src/app/components/header/info-bar/info-bar.component.ts +++ b/src/app/components/header/info-bar/info-bar.component.ts @@ -17,9 +17,6 @@ import { CiSearchComponent } from './ci-search/ci-search.component'; import { ShortDatePipe } from '@pipes/short-date.pipe'; import { JoinPipe } from '@pipes/join.pipe'; import { TranslateModule } from '@ngx-translate/core'; -import { DispDataDisclaimerComponent } from '@components/results-menu/timeseries-results-menu/timeseries-displacement-disclaimer-dialog.component'; -import { MatDialog } from '@angular/material/dialog'; -import { MatIcon } from '@angular/material/icon'; // Declare GTM dataLayer array. declare global { @@ -40,14 +37,12 @@ declare global { ShortDatePipe, JoinPipe, TranslateModule, - MatIcon, ], }) export class InfoBarComponent implements OnInit, OnDestroy { private store$ = inject>(Store); private screenSize = inject(services.ScreenSizeService); private hyp3 = inject(services.Hyp3ApiService); - private dialog = inject(MatDialog); public searchType: models.SearchType = models.SearchType.DATASET; public searchTypes = models.SearchType; public searchType$ = this.store$.select(searchStore.getSearchType); @@ -303,15 +298,6 @@ export class InfoBarComponent implements OnInit, OnDestroy { ); } - public onOpenDispDataDisclaimer() { - this.dialog.open(DispDataDisclaimerComponent, { - width: '550px', - height: '325px', - maxWidth: '550px', - maxHeight: '500px', - }); - } - ngOnDestroy() { this.subs.unsubscribe(); } diff --git a/src/app/components/header/processing-queue/processing-options/processing-options.component.html b/src/app/components/header/processing-queue/processing-options/processing-options.component.html index 115178a3d..519bd662f 100644 --- a/src/app/components/header/processing-queue/processing-options/processing-options.component.html +++ b/src/app/components/header/processing-queue/processing-options/processing-options.component.html @@ -4,7 +4,9 @@ @if (selectedJobType.id === jobType.id) { @if (jobType.options.length === 0) {
-

{{ 'NO_PROCESSING_OPTIONS_FOR' | translate }} {{ jobType.name }}

+

+ {{ 'NO_PROCESSING_OPTIONS_FOR' | translate }} {{ jobType.name }} +

} @else {
diff --git a/src/app/components/map/map.component.html b/src/app/components/map/map.component.html index 1c774c48f..3206a785e 100644 --- a/src/app/components/map/map.component.html +++ b/src/app/components/map/map.component.html @@ -93,6 +93,19 @@ } +@if ( + breakpoint > breakpoints.MOBILE && searchType === searchTypes.DISPLACEMENT +) { + +} + @if (searchType === searchTypes.DATASET) { diff --git a/src/app/components/map/map.component.scss b/src/app/components/map/map.component.scss index ed6cb5954..6fac3481e 100644 --- a/src/app/components/map/map.component.scss +++ b/src/app/components/map/map.component.scss @@ -86,6 +86,23 @@ button { right: 10px; } +.opera-logo { + position: fixed; + bottom: 30px; + left: 10px; + width: 110px; + height: auto; + cursor: pointer; + pointer-events: auto; + opacity: 0.85; + transition: opacity 0.2s ease; + z-index: 999; + + &:hover { + opacity: 1; + } +} + .mobile-map-controls { pointer-events: auto; position: fixed; diff --git a/src/app/components/map/map.component.ts b/src/app/components/map/map.component.ts index b30b3d232..f113f20cb 100644 --- a/src/app/components/map/map.component.ts +++ b/src/app/components/map/map.component.ts @@ -31,6 +31,7 @@ import * as sceneStore from '@store/scenes'; import * as models from '@models'; import { CMRProduct, SarviewsEvent } from '@models'; import { + DisplacementDisclaimerService, MapService, PointHistoryService, SarviewsEventsService, @@ -43,6 +44,7 @@ import { StyleLike } from 'ol/style/Style'; import { Feature } from 'ol'; import Geometry from 'ol/geom/Geometry'; import { MatDialog } from '@angular/material/dialog'; +import { MatTooltipModule } from '@angular/material/tooltip'; import WKT from 'ol/format/WKT'; import { getTimeseriesChartStates } from '@store/charts'; import { MatButton, MatFabButton } from '@angular/material/button'; @@ -85,6 +87,7 @@ enum FullscreenControls { AttributionsComponent, AsyncPipe, TranslateModule, + MatTooltipModule, ], }) export class MapComponent implements OnInit, OnDestroy { @@ -96,6 +99,7 @@ export class MapComponent implements OnInit, OnDestroy { private eventMonitoringService = inject(SarviewsEventsService); dialog = inject(MatDialog); private pointHistoryService = inject(PointHistoryService); + private disclaimerService = inject(DisplacementDisclaimerService); @Output() loadUrlState = new EventEmitter(); @ViewChild('overlay', { static: true }) overlayRef: ElementRef; @@ -802,6 +806,10 @@ export class MapComponent implements OnInit, OnDestroy { this.fullscreenControl = FullscreenControls.NONE; } + public onOpenDispDisclaimer(): void { + this.disclaimerService.open(); + } + ngOnDestroy() { this.subs.unsubscribe(); } diff --git a/src/app/components/results-menu/scenes-list-header/scenes-list-header.component.html b/src/app/components/results-menu/scenes-list-header/scenes-list-header.component.html index 8d9deaa82..07cb4584e 100644 --- a/src/app/components/results-menu/scenes-list-header/scenes-list-header.component.html +++ b/src/app/components/results-menu/scenes-list-header/scenes-list-header.component.html @@ -339,7 +339,8 @@
diff --git a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html index c81033b4e..65b24fd1f 100644 --- a/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html +++ b/src/app/components/results-menu/timeseries-results-menu/timeseries-results-menu.component.html @@ -244,6 +244,10 @@ >{{ 'DATA_COURTESY_OF' | translate }} OPERA | +  {{ 'DISCLAIMER' | translate }} + | (DOCUMENT); private language = inject(AsfLanguageService); @@ -459,6 +461,10 @@ export class TimeseriesResultsMenuComponent implements OnInit, OnDestroy { }); } + public onOpenDisclaimer(): void { + this.disclaimerService.open(); + } + public ngOnDestroy() { this.subs.unsubscribe(); this.pointHistoryService.clearPoints(); diff --git a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.html b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.html index dd1bf0025..a4f8c9fe7 100644 --- a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.html +++ b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.html @@ -24,6 +24,14 @@

+ @if (searchType === searchTypes.DISPLACEMENT) { + + *{{ 'DISCLAIMER' | translate }} + + }
diff --git a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.scss b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.scss index d2f73fd4c..91134370a 100644 --- a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.scss +++ b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.scss @@ -242,3 +242,20 @@ transform: translateY(0); } } + +.disclaimer-link { + display: inline-block; + font-size: 12px; + font-style: italic; + color: grey; + cursor: pointer; + pointer-events: auto; + margin-left: 10px; + position: relative; + top: 2px; + z-index: 10; + + &:hover { + text-decoration: underline; + } +} diff --git a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.ts b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.ts index 30c204ea9..d73513a10 100644 --- a/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.ts +++ b/src/app/components/shared/selectors/search-type-selector/search-type-selector.component.ts @@ -18,7 +18,11 @@ import * as userStore from '@store/user'; import * as models from '@models'; -import { EnvironmentService, ScreenSizeService } from '@services'; +import { + DisplacementDisclaimerService, + EnvironmentService, + ScreenSizeService, +} from '@services'; import { AnalyticsEvent, Breakpoints, derivedDatasets } from '@models'; import { TranslateService, TranslateModule } from '@ngx-translate/core'; import { NgClass, AsyncPipe } from '@angular/common'; @@ -59,6 +63,7 @@ export class SearchTypeSelectorComponent implements OnInit, OnDestroy { translate = inject(TranslateService); private store$ = inject>(Store); private screenSize = inject(ScreenSizeService); + private disclaimerService = inject(DisplacementDisclaimerService); env = inject(EnvironmentService); @ViewChild(MatMenuTrigger) trigger: MatMenuTrigger; @@ -241,6 +246,10 @@ export class SearchTypeSelectorComponent implements OnInit, OnDestroy { event.stopPropagation(); } + public onOpenDisclaimer(): void { + this.disclaimerService.open(); + } + ngOnDestroy() { this.subs.unsubscribe(); } diff --git a/src/app/services/displacement-disclaimer.service.ts b/src/app/services/displacement-disclaimer.service.ts new file mode 100644 index 000000000..5637611de --- /dev/null +++ b/src/app/services/displacement-disclaimer.service.ts @@ -0,0 +1,20 @@ +import { inject, Injectable } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { Observable } from 'rxjs'; +import { DispDataDisclaimerComponent } from '@components/results-menu/timeseries-results-menu/timeseries-displacement-disclaimer-dialog.component'; + +@Injectable({ providedIn: 'root' }) +export class DisplacementDisclaimerService { + private dialog = inject(MatDialog); + + open(): Observable { + return this.dialog + .open(DispDataDisclaimerComponent, { + width: '550px', + height: '325px', + maxWidth: '550px', + maxHeight: '500px', + }) + .afterClosed(); + } +} diff --git a/src/app/services/index.ts b/src/app/services/index.ts index f8a99d5da..28be0ca06 100644 --- a/src/app/services/index.ts +++ b/src/app/services/index.ts @@ -43,3 +43,4 @@ export { ExportService } from './export.service'; export { NetcdfService } from './netcdf-service.service'; export { PointHistoryService } from './point-history.service'; export { FrameMapService } from './frame-map.service'; +export { DisplacementDisclaimerService } from './displacement-disclaimer.service'; diff --git a/src/assets/opera-disp-logo.png b/src/assets/opera-disp-logo.png new file mode 100644 index 000000000..0d6ea0339 Binary files /dev/null and b/src/assets/opera-disp-logo.png differ