diff --git a/src/atlasViewer/atlasViewer.template.html b/src/atlasViewer/atlasViewer.template.html index 25a3c4ffea3cfadaf03516675dbfa734cf5c7629..1f2f2f9ead5674c3365a8ce25ae499d2ee829732 100644 --- a/src/atlasViewer/atlasViewer.template.html +++ b/src/atlasViewer/atlasViewer.template.html @@ -48,6 +48,7 @@ [quick-tour-description-md]="quickTourFinale.descriptionMd" [quick-tour-order]="quickTourFinale.order" [quick-tour-overwrite-arrow]="emptyArrowTmpl" + [quick-tour-severity]="'low'" #media="iavMediaQuery"> <!-- prevent default is required so that user do not zoom in on UI or scroll on mobile UI --> <iav-cmp-viewer-container @@ -166,4 +167,4 @@ </ng-template> <ng-template #emptyArrowTmpl> -</ng-template> \ No newline at end of file +</ng-template> diff --git a/src/ui/quickTour/quickTour.service.ts b/src/ui/quickTour/quickTour.service.ts index 21f856420bcf5fee7807f4806ad6d57ca7b088be..31fe272ae196a25b22eb0b6ed1c102767ee0f3f0 100644 --- a/src/ui/quickTour/quickTour.service.ts +++ b/src/ui/quickTour/quickTour.service.ts @@ -40,6 +40,8 @@ export class QuickTourService { private startTourDialogRef: MatDialogRef<any> + public autoStartTriggered = false + constructor( private overlay: Overlay, /** @@ -70,22 +72,22 @@ export class QuickTourService { } autoStart() { - if (!localStorage.getItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED)) { - this.startTourDialogRef = this.matDialog.open(StartTourDialogDialog) - this.startTourDialogRef.afterClosed().pipe(take(1)).subscribe(res => { - switch (res) { - case 'start': - this.startTour() - localStorage.setItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED, 'true') - break; - case 'close': - localStorage.setItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED, 'true') - break; - default: - break; - } - }) - } + this.autoStartTriggered = true + this.startTourDialogRef = this.matDialog.open(StartTourDialogDialog) + this.startTourDialogRef.afterClosed().pipe(take(1)).subscribe(res => { + switch (res) { + case 'start': + this.startTour() + localStorage.setItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED, 'true') + break; + case 'close': + localStorage.setItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED, 'true') + break; + default: + break; + } + }) + } public startTour() { diff --git a/src/ui/quickTour/quickTourThis.directive.ts b/src/ui/quickTour/quickTourThis.directive.ts index a31830416bff9625bb084835db36ed36976e15d7..be1263111be1f723b4ce38c99c9be462a7107bc8 100644 --- a/src/ui/quickTour/quickTourThis.directive.ts +++ b/src/ui/quickTour/quickTourThis.directive.ts @@ -1,6 +1,7 @@ import { Directive, ElementRef, Input, OnChanges, OnDestroy, OnInit, TemplateRef } from "@angular/core"; import { QuickTourService } from "src/ui/quickTour/quickTour.service"; import { IQuickTourOverwritePosition, TQuickTourPosition } from "src/ui/quickTour/constrants"; +import {LOCAL_STORAGE_CONST} from "src/util/constants"; @Directive({ selector: '[quick-tour]', @@ -14,7 +15,7 @@ export class QuickTourThis implements OnInit, OnChanges, OnDestroy { @Input('quick-tour-position') position: TQuickTourPosition @Input('quick-tour-overwrite-position') overwritePosition: IQuickTourOverwritePosition @Input('quick-tour-overwrite-arrow') overWriteArrow: TemplateRef<any> | string - @Input('quick-tour-check-auto-start') quickTourCheckAutoStart: boolean + @Input('quick-tour-severity') quickTourSeverity: 'low' | 'medium' | 'high' = 'medium' private attachedTmpl: ElementRef @@ -31,7 +32,7 @@ export class QuickTourThis implements OnInit, OnChanges, OnDestroy { ngOnInit() { this.quickTourService.register(this) - if (this.quickTourCheckAutoStart) { + if (!localStorage.getItem(LOCAL_STORAGE_CONST.QUICK_TOUR_VIEWED) && this.quickTourSeverity !== 'low' && !this.quickTourService.autoStartTriggered) { this.quickTourService.autoStart() } diff --git a/src/ui/topMenu/topMenuCmp/topMenu.template.html b/src/ui/topMenu/topMenuCmp/topMenu.template.html index 96799b36b8c832987b74ce0add621ac97634fde2..3341eaaf58f677841ae2becaf5ba37f3626ca46a 100644 --- a/src/ui/topMenu/topMenuCmp/topMenu.template.html +++ b/src/ui/topMenu/topMenuCmp/topMenu.template.html @@ -45,6 +45,7 @@ quick-tour [quick-tour-description]="quickTourData.description" [quick-tour-order]="quickTourData.order" + [quick-tour-severity]="'low'" [iav-key-listener]="keyListenerConfig" (iav-key-event)="openTmplWithDialog(helperOnePager, helperOnePagerConfig)"> diff --git a/src/viewerModule/viewerCmp/viewerCmp.template.html b/src/viewerModule/viewerCmp/viewerCmp.template.html index b4fc9ca931fd16708cc893b1484871456e0826cc..60c5381d55ed4e532dfe7c25550da99d5d3545b1 100644 --- a/src/viewerModule/viewerCmp/viewerCmp.template.html +++ b/src/viewerModule/viewerCmp/viewerCmp.template.html @@ -154,8 +154,7 @@ class="iv-custom-comp bg card m-2 mat-elevation-z2" quick-tour [quick-tour-description]="quickTourAtlasSelector.description" - [quick-tour-order]="quickTourAtlasSelector.order" - [quick-tour-check-auto-start]="true"> + [quick-tour-order]="quickTourAtlasSelector.order"> <atlas-dropdown-selector class="pe-all mt-2"> </atlas-dropdown-selector> </div> @@ -260,7 +259,7 @@ </atlas-layer-selector> <!-- chips --> - <div class="flex-grow-0 p-1 flex-shrink-1 overflow-y-hidden overflow-x-auto pe-all"> + <div *ngIf="parcellationSelected$ | async" class="flex-grow-0 p-1 flex-shrink-1 overflow-y-hidden overflow-x-auto pe-all"> <mat-chip-list class="d-inline-block" quick-tour