57053: progress menu bar

This commit is contained in:
lotte
2018-11-16 17:00:06 +01:00
parent 0c4784346b
commit cd5c7b72c2
22 changed files with 386 additions and 127 deletions

View File

@@ -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() {