From 43516fe7181944eb36a45f457a0b661550e18f04 Mon Sep 17 00:00:00 2001 From: Dinh Nguyen Date: Mon, 22 Jul 2024 12:09:55 +0700 Subject: [PATCH] update query --- marketplace-ui/src/app/app.component.html | 12 ++++++++---- marketplace-ui/src/app/app.component.ts | 12 +++++++++--- .../src/app/shared/constants/common.constant.ts | 6 +++++- 3 files changed, 22 insertions(+), 8 deletions(-) diff --git a/marketplace-ui/src/app/app.component.html b/marketplace-ui/src/app/app.component.html index 347c01580..86dd5834e 100644 --- a/marketplace-ui/src/app/app.component.html +++ b/marketplace-ui/src/app/app.component.html @@ -1,21 +1,25 @@ +@if(!isDesignerViewer()){
+}
+@if(!isDesignerViewer()){ +} @if (loadingService.isLoading()) { -
-
-
-} +
+
+
+} \ No newline at end of file diff --git a/marketplace-ui/src/app/app.component.ts b/marketplace-ui/src/app/app.component.ts index aefe258ab..fde7d8a1d 100644 --- a/marketplace-ui/src/app/app.component.ts +++ b/marketplace-ui/src/app/app.component.ts @@ -9,6 +9,7 @@ import { FooterComponent } from './shared/components/footer/footer.component'; import { HeaderComponent } from './shared/components/header/header.component'; import { LoadingService } from './core/services/loading/loading.service'; import { filter } from 'rxjs'; +import { DESIGNER_VARIABLE } from './shared/constants/common.constant'; @Component({ selector: 'app-root', @@ -20,19 +21,24 @@ import { filter } from 'rxjs'; export class AppComponent { loadingService = inject(LoadingService); isDesignerViewer = signal(false); + ivyVersion = signal(''); constructor( private router: Router, private route: ActivatedRoute - ) {} + ) { } ngOnInit(): void { this.router.events .pipe(filter(event => event instanceof NavigationEnd)) .subscribe(() => { this.route.queryParams.subscribe(params => { - console.log(params['ivy-viewer']); - console.log(params['ivy-version']); + if (params['ivy-viewer'] == DESIGNER_VARIABLE.viewer) { + this.isDesignerViewer.set(true); + } + if (params["ivy-version"]) { + this.ivyVersion.set(params["ivy-version"]); + } }); }); } diff --git a/marketplace-ui/src/app/shared/constants/common.constant.ts b/marketplace-ui/src/app/shared/constants/common.constant.ts index 9df949ebb..1bcaf196c 100644 --- a/marketplace-ui/src/app/shared/constants/common.constant.ts +++ b/marketplace-ui/src/app/shared/constants/common.constant.ts @@ -159,4 +159,8 @@ export const FEEDBACK_SORT_TYPES = [ label: 'common.sort.value.lowest', sortFn: 'rating,asc' } -]; \ No newline at end of file +]; + +export const DESIGNER_VARIABLE = { + viewer: "designer-market" +}; \ No newline at end of file