|
|
|
@ -1,29 +1,24 @@
|
|
|
|
|
import { Location } from '@angular/common';
|
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
|
import { Component, ElementRef, EventEmitter, OnInit, Output, ViewChild } from '@angular/core';
|
|
|
|
|
import { MatDialog } from '@angular/material/dialog';
|
|
|
|
|
import { MatMenuTrigger } from '@angular/material/menu';
|
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
|
import { AppRole } from '@app/core/common/enum/app-role';
|
|
|
|
|
import { UserListingModel } from '@app/core/model/user/user-listing';
|
|
|
|
|
import { AuthService } from '@app/core/services/auth/auth.service';
|
|
|
|
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
|
|
|
import { LanguageService } from '@app/core/services/language/language.service';
|
|
|
|
|
import { MatomoService } from '@app/core/services/matomo/matomo-service';
|
|
|
|
|
import { ProgressIndicationService } from '@app/core/services/progress-indication/progress-indication-service';
|
|
|
|
|
import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice';
|
|
|
|
|
import { UserService } from '@app/core/services/user/user.service';
|
|
|
|
|
import { BaseComponent } from '@common/base/base.component';
|
|
|
|
|
import { takeUntil } from 'rxjs/operators';
|
|
|
|
|
import { StartNewDmpDialogComponent } from '../dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
|
|
|
|
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
|
|
|
|
import { UserDialogComponent } from '../misc/navigation/user-dialog/user-dialog.component';
|
|
|
|
|
import { DATASETS_ROUTES, DMP_ROUTES, GENERAL_ROUTES } from '../sidebar/sidebar.component';
|
|
|
|
|
import { LanguageService } from '@app/core/services/language/language.service';
|
|
|
|
|
import { UserService } from '@app/core/services/user/user.service';
|
|
|
|
|
import { FaqDialogComponent } from '../faq/dialog/faq-dialog.component';
|
|
|
|
|
import { DmpInvitationDialogComponent } from '../dmp/invitation/dmp-invitation-dialog.component';
|
|
|
|
|
import { StartNewDmpDialogComponent } from '../dmp/start-new-dmp-dialogue/start-new-dmp-dialog.component';
|
|
|
|
|
import { UserListingModel } from '@app/core/model/user/user-listing';
|
|
|
|
|
import { Principal } from '@app/core/model/auth/principal';
|
|
|
|
|
import { MatomoService } from '@app/core/services/matomo/matomo-service';
|
|
|
|
|
import { HttpClient } from '@angular/common/http';
|
|
|
|
|
import { SideNavService } from '@app/core/services/sidenav/side-nav.sevice';
|
|
|
|
|
import { ConfigurationService } from '@app/core/services/configuration/configuration.service';
|
|
|
|
|
|
|
|
|
|
const availableLanguages: any[] = require('../../../assets/resources/language.json');
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-navbar',
|
|
|
|
|
templateUrl: './navbar.component.html',
|
|
|
|
@ -36,8 +31,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|
|
|
|
mobile_menu_visible: any = 0;
|
|
|
|
|
private toggleButton: any;
|
|
|
|
|
private sidebarVisible: boolean;
|
|
|
|
|
languages = availableLanguages;
|
|
|
|
|
language = this.languages[0];
|
|
|
|
|
languages = [];
|
|
|
|
|
currentRoute: string;
|
|
|
|
|
selectedLanguage: string;
|
|
|
|
|
private user: UserListingModel;
|
|
|
|
@ -60,6 +54,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|
|
|
|
super();
|
|
|
|
|
this.location = location;
|
|
|
|
|
this.sidebarVisible = false;
|
|
|
|
|
this.languages = this.configurationService.availableLanguages;
|
|
|
|
|
this.selectedLanguage = this.configurationService.defaultLanguage || 'en';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -266,7 +261,7 @@ export class NavbarComponent extends BaseComponent implements OnInit {
|
|
|
|
|
this.sidebarToggled.emit(event);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toggleMyNav(event){
|
|
|
|
|
toggleMyNav(event) {
|
|
|
|
|
this.sidenavService.toggle();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|