File

app.component.ts

Description

Development dashboard showing links to development applications.

Metadata

Index

Properties

Properties

logs
Default value : changelogs(devApps().dashboard.routerLink)
navService
Default value : inject(NavigationService)
nshmpService
Default value : inject(NshmpService)
sections
Type : ApplicationSections[]
Default value : [ { gridClass: 'grid-col-10', sections: [ { applications: this.navService.devMainApps().map(navigation => ({navigation})), gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1', }, ], }, ]
title
Type : string
Default value : 'Development Applications'
import {AsyncPipe} from '@angular/common';
import {Component, inject} from '@angular/core';
import {
  NshmpAboutContentComponent,
  NshmpAboutNavMenuComponent,
  NshmpAboutOptionsComponent,
  NshmpAboutUsingApplicationExpansionPanelComponent,
} from '@ghsc/nshmp-lib-ng/about';
import {
  ApplicationSections,
  NshmpDashboardComponent,
  NshmpDashboardDescriptionComponent,
  NshmpDashboardTitleComponent,
  NshmpService,
} from '@ghsc/nshmp-lib-ng/nshmp';
import {NshmpTemplateAboutComponent, NshmpTemplateComponent} from '@ghsc/nshmp-template';
import {NavigationService} from 'projects/nshmp-apps/src/shared/services/navigation.service';
import {devApps} from 'projects/nshmp-apps/src/shared/utils/applications.utils';

import {changelogs} from '../../changelog';

/**
 * Development dashboard showing links to development applications.
 */
@Component({
  imports: [
    NshmpTemplateComponent,
    NshmpTemplateAboutComponent,
    NshmpAboutContentComponent,
    NshmpDashboardComponent,
    NshmpDashboardTitleComponent,
    NshmpDashboardDescriptionComponent,
    AsyncPipe,
    NshmpAboutOptionsComponent,
    NshmpAboutNavMenuComponent,
    NshmpAboutUsingApplicationExpansionPanelComponent,
  ],
  selector: 'app-app',
  styleUrl: './app.component.scss',
  templateUrl: './app.component.html',
})
export class AppComponent {
  navService = inject(NavigationService);
  nshmpService = inject(NshmpService);

  title = 'Development Applications';

  logs = changelogs(devApps().dashboard.routerLink);

  sections: ApplicationSections[] = [
    {
      gridClass: 'grid-col-10',
      sections: [
        {
          applications: this.navService.devMainApps().map(navigation => ({navigation})),
          gridClass: 'grid-col-12 tablet-lg:grid-col-8 grid-offset-1',
        },
      ],
    },
  ];
}
<nshmp-template #template [navigationList]="navService.devNavigation()" [title]="title">
  <!-- Dashboard -->
  <nshmp-dashboard [sections]="sections">
    <nshmp-dashboard-title>
      USGS Development
      <br />
      Earthquake
      <br />
      Hazard Toolbox
    </nshmp-dashboard-title>
    <nshmp-dashboard-description />
  </nshmp-dashboard>

  <!-- About page -->
  <nshmp-template-about
    [applicationName]="nshmpService.applicationName$ | async"
    [applicationVersion]="(nshmpService.versionInfo$ | async)?.version ?? ''"
  >
    <nshmp-about-content [showSavingSettingPanel]="false" [changelogs]="logs">
      <nshmp-about-using-application-expansion-panel>
        <nshmp-about-nav-menu />
        <nshmp-about-options />
      </nshmp-about-using-application-expansion-panel>
    </nshmp-about-content>
  </nshmp-template-about>
</nshmp-template>
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""