aboutsummaryrefslogtreecommitdiffstats
path: root/webapp/src/app/@theme/components/header/header.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/src/app/@theme/components/header/header.component.ts')
-rw-r--r--webapp/src/app/@theme/components/header/header.component.ts31
1 files changed, 28 insertions, 3 deletions
diff --git a/webapp/src/app/@theme/components/header/header.component.ts b/webapp/src/app/@theme/components/header/header.component.ts
index e2a84cb..4a9ac0f 100644
--- a/webapp/src/app/@theme/components/header/header.component.ts
+++ b/webapp/src/app/@theme/components/header/header.component.ts
@@ -5,6 +5,9 @@ import { NbMenuService, NbSidebarService } from '@nebular/theme';
import { UserService } from '../../../@core-xds/services/users.service';
import { AnalyticsService } from '../../../@core/utils/analytics.service';
+import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
+import { AboutModalComponent } from '../../../pages/about/about-modal/about-modal.component';
+
@Component({
selector: 'ngx-header',
styleUrls: ['./header.component.scss'],
@@ -19,10 +22,23 @@ export class HeaderComponent implements OnInit {
userMenu = [{ title: 'Profile' }, { title: 'Log out' }];
+ // XDS_MODS - FIXME: better to define own XDS component instead of reuse nb-user
+ helpName = '?';
+ helpMenu = [
+ {
+ title: 'Online XDS documentation',
+ target: '_blank',
+ url: 'http://docs.automotivelinux.org/docs/devguides/en/dev/#xcross-development-system-user\'s-guide',
+ },
+ { title: 'About' },
+ ];
+
constructor(private sidebarService: NbSidebarService,
- private menuService: NbMenuService,
- private userService: UserService,
- private analyticsService: AnalyticsService) {
+ private menuService: NbMenuService,
+ private userService: UserService,
+ private analyticsService: AnalyticsService,
+ private modalService: NgbModal,
+ ) {
}
ngOnInit() {
@@ -48,4 +64,13 @@ export class HeaderComponent implements OnInit {
startSearch() {
this.analyticsService.trackEvent('startSearch');
}
+
+ // XDS_MODS
+ helpClick($event: any) {
+ if ($event.title === 'About') {
+ // FIXME SEB - move code in XDS part
+ const activeModal = this.modalService.open(AboutModalComponent, { size: 'lg', container: 'nb-layout' });
+ }
+
+ }
}