[Monitor | new-theme]: app.component.ts: Removed deprecated RootMenuItem and used MenuItem instead.

This commit is contained in:
Konstantina Galouni 2022-09-21 00:08:20 +03:00
parent 52b38d4a85
commit 550411b98a
2 changed files with 9 additions and 11 deletions

View File

@ -2,7 +2,7 @@ import {Component, ViewChild} from '@angular/core';
import {ActivatedRoute, NavigationEnd, Router} from '@angular/router'; import {ActivatedRoute, NavigationEnd, Router} from '@angular/router';
import {EnvProperties} from './openaireLibrary/utils/properties/env-properties'; import {EnvProperties} from './openaireLibrary/utils/properties/env-properties';
import {MenuItem, RootMenuItem} from './openaireLibrary/sharedComponents/menu'; import {MenuItem} from './openaireLibrary/sharedComponents/menu';
import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service'; import {EnvironmentSpecificService} from './openaireLibrary/utils/properties/environment-specific.service';
import {Session, User} from './openaireLibrary/login/utils/helper.class'; import {Session, User} from './openaireLibrary/login/utils/helper.class';
import {UserManagementService} from "./openaireLibrary/services/user-management.service"; import {UserManagementService} from "./openaireLibrary/services/user-management.service";
@ -72,7 +72,7 @@ import {ResourcesService} from "./openaireLibrary/monitor/services/resources.ser
}) })
export class AppComponent { export class AppComponent {
userMenuItems: MenuItem[] = []; userMenuItems: MenuItem[] = [];
menuItems: RootMenuItem [] = []; menuItems: MenuItem [] = [];
bottomMenuItems: MenuItem[] = []; bottomMenuItems: MenuItem[] = [];
properties: EnvProperties = properties; properties: EnvProperties = properties;
showMenu: boolean = false; showMenu: boolean = false;
@ -151,17 +151,15 @@ export class AppComponent {
public buildMenu() { public buildMenu() {
this.menuItems = []; this.menuItems = [];
this.menuItems.push({ this.menuItems.push(
rootItem: new MenuItem("stakeholders", "Browse " + this.stakeholderEntities.STAKEHOLDERS, "", "/browse", false, [], null, {}), new MenuItem("stakeholders", "Browse " + this.stakeholderEntities.STAKEHOLDERS, "", "/browse", false, [], null, {})
items: [] );
});
if(this.properties.environment !== 'production') { if(this.properties.environment !== 'production') {
this.resourcesService.setResourcesDeprecated(this.menuItems); this.resourcesService.setResourcesDeprecated(this.menuItems);
} }
this.menuItems.push({ this.menuItems.push(
rootItem: new MenuItem("about", "About", "", "/about", false, [], null, {}), new MenuItem("about", "About", "", "/about", false, [], null, {})
items: [] );
});
this.bottomMenuItems = [ this.bottomMenuItems = [
new MenuItem("", "About", "https://beta.openaire.eu/project-factsheets", "", false, [], [], {}), new MenuItem("", "About", "https://beta.openaire.eu/project-factsheets", "", false, [], [], {}),
new MenuItem("", "News - Events", "https://beta.openaire.eu/news-events", "", false, [], [], {}), new MenuItem("", "News - Events", "https://beta.openaire.eu/news-events", "", false, [], [], {}),

@ -1 +1 @@
Subproject commit 945cee4519a4f5b2c5e53dd5c069d4f038f987e6 Subproject commit 4cec2907da5e1bf55cf59930c23dd9a45c569b89