integration layer; merge work on indicators from forks with existing ingestion pipeline
This commit is contained in:
+25
-4
@@ -1,10 +1,31 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { RouterOutlet } from '@angular/router';
|
||||
import { Component, computed, inject } from '@angular/core';
|
||||
import { toSignal } from '@angular/core/rxjs-interop';
|
||||
import { ActivatedRoute, NavigationEnd, Router, RouterLink, RouterOutlet } from '@angular/router';
|
||||
import { filter, map } from 'rxjs';
|
||||
|
||||
@Component({
|
||||
imports: [RouterOutlet],
|
||||
imports: [RouterLink, RouterOutlet],
|
||||
selector: 'app-root',
|
||||
styleUrl: './app.scss',
|
||||
templateUrl: './app.html',
|
||||
})
|
||||
export class App {}
|
||||
export class App {
|
||||
private readonly router = inject(Router);
|
||||
private readonly route = inject(ActivatedRoute);
|
||||
|
||||
private readonly leafRouteData = toSignal(
|
||||
this.router.events.pipe(
|
||||
filter((event) => event instanceof NavigationEnd),
|
||||
map(() => {
|
||||
let route = this.route;
|
||||
while (route.firstChild) route = route.firstChild;
|
||||
return route.snapshot.data;
|
||||
}),
|
||||
),
|
||||
{ initialValue: {} as Record<string, unknown> },
|
||||
);
|
||||
|
||||
/** Full-height workspace routes (`data.workspace`) drop the marketing footer. */
|
||||
readonly workspace = computed(() => !!this.leafRouteData()['workspace']);
|
||||
readonly breadcrumb = computed(() => this.leafRouteData()['breadcrumb'] as string | undefined);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user