mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
57053: progress menu bar
This commit is contained in:
@@ -23,6 +23,8 @@ import { NativeWindowRef, NativeWindowService } from './shared/services/window.s
|
||||
import { isAuthenticated } from './core/auth/selectors';
|
||||
import { AuthService } from './core/auth/auth.service';
|
||||
import { Angulartics2GoogleAnalytics } from 'angulartics2/ga';
|
||||
import variables from '../styles/_exposed_variables.scss';
|
||||
import { CSSVariableService } from './shared/sass-helper/sass-helper.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ds-app',
|
||||
@@ -42,7 +44,8 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
private metadata: MetadataService,
|
||||
private angulartics2GoogleAnalytics: Angulartics2GoogleAnalytics,
|
||||
private authService: AuthService,
|
||||
private router: Router
|
||||
private router: Router,
|
||||
private cssService: CSSVariableService
|
||||
) {
|
||||
// this language will be used as a fallback when a translation isn't found in the current language
|
||||
translate.setDefaultLang('en');
|
||||
@@ -54,6 +57,8 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
if (config.debug) {
|
||||
console.info(config);
|
||||
}
|
||||
this.storeCSSVariables();
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -67,7 +72,13 @@ export class AppComponent implements OnInit, AfterViewInit {
|
||||
first(),
|
||||
filter((authenticated) => !authenticated)
|
||||
).subscribe((authenticated) => this.authService.checkAuthenticationToken());
|
||||
}
|
||||
|
||||
private storeCSSVariables() {
|
||||
const vars = variables.locals;
|
||||
Object.keys(vars).forEach((name: string) => {
|
||||
this.cssService.addCSSVariable(name, vars[name]);
|
||||
})
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
|
Reference in New Issue
Block a user