comment period
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
import { Component, HostListener } from '@angular/core';
|
||||
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { UserService } from '../../services/user.service';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { MatIconRegistry } from '@angular/material/icon';
|
||||
import { DateAdapter } from '@angular/material/core';
|
||||
|
||||
import { AuthService } from '../../services/auth.service';
|
||||
import { UserService } from '../../services/user.service';
|
||||
import { I18nService } from '../../services/i18n.service';
|
||||
import { SettingsService } from '../../services/settings.service';
|
||||
|
||||
@Component({
|
||||
selector: 'ui-main',
|
||||
templateUrl: './main.ui.html',
|
||||
styleUrls : ['./main.ui.scss']
|
||||
styleUrls: [ './main.ui.scss' ]
|
||||
})
|
||||
|
||||
export class UiMain {
|
||||
@@ -21,12 +22,13 @@ export class UiMain {
|
||||
currentLocale: String;
|
||||
datetimeformat: String;
|
||||
locales;
|
||||
authenticated : boolean = false;
|
||||
authenticated: boolean = false;
|
||||
|
||||
constructor(
|
||||
private i18n: I18nService,
|
||||
private authService: AuthService,
|
||||
private userService: UserService,
|
||||
private settingsService: SettingsService,
|
||||
private router: Router,
|
||||
private iconRegistry: MatIconRegistry,
|
||||
private sanitizer: DomSanitizer,
|
||||
@@ -34,7 +36,7 @@ export class UiMain {
|
||||
iconRegistry.addSvgIcon('logo', sanitizer.bypassSecurityTrustResourceUrl('assets/icons/logo.svg'));
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
async ngOnInit() {
|
||||
this.datetimeformat = this.i18n.get('format.datetime', []);
|
||||
this.currentLocale = this.i18n.getLocale();
|
||||
this.locales = this.i18n.getLocales();
|
||||
@@ -57,6 +59,8 @@ export class UiMain {
|
||||
this.darkTheme = true;
|
||||
window.document.body.classList.add("dark-theme");
|
||||
}
|
||||
|
||||
await this.settingsService.getSettings();
|
||||
}
|
||||
|
||||
setLocale(locale) {
|
||||
|
||||
Reference in New Issue
Block a user