mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 08:33:11 +00:00
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018, 2019 StApps
|
||||
* Copyright (C) 2018-2020 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
@@ -15,7 +15,7 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {LangChangeEvent, TranslateService} from '@ngx-translate/core';
|
||||
import {SCAppConfigurationMenuCategory, SCLanguage, SCThingTranslator, SCTranslations} from '@openstapps/core';
|
||||
import {Logger} from '@openstapps/logger';
|
||||
import {NGXLogger} from 'ngx-logger';
|
||||
import {ConfigProvider} from '../../config/config.provider';
|
||||
|
||||
/**
|
||||
@@ -46,8 +46,9 @@ export class NavigationComponent {
|
||||
*/
|
||||
translator: SCThingTranslator;
|
||||
|
||||
constructor(private configProvider: ConfigProvider,
|
||||
public translateService: TranslateService) {
|
||||
constructor(private readonly configProvider: ConfigProvider,
|
||||
public translateService: TranslateService,
|
||||
private readonly logger: NGXLogger) {
|
||||
this.loadMenuEntries();
|
||||
translateService.onLangChange.subscribe((event: LangChangeEvent) => {
|
||||
this.language = event.lang as keyof SCTranslations<SCLanguage>;
|
||||
@@ -63,7 +64,7 @@ export class NavigationComponent {
|
||||
try {
|
||||
this.menu = await this.configProvider.getValue('menus') as SCAppConfigurationMenuCategory[];
|
||||
} catch (error) {
|
||||
Logger.error(`error from loading menu entries: ${error}`);
|
||||
this.logger.error(`error from loading menu entries: ${error}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user