You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
frontend/src/app/home/home.page.ts

29 lines
651 B

import {Component, OnInit} from '@angular/core';
import {ApiService} from '../service/api.service';
import {isDebug, debug} from '../utility';
@Component({
selector: 'app-home',
templateUrl: 'home.page.html',
styleUrls: ['home.page.scss'],
})
export class HomePage implements OnInit {
constructor(
public readonly api: ApiService,
) {}
ngOnInit() {
if ( !this.api.isAuthenticated || this.api.isPublicUser ) {
if ( isDebug() ) {
debug('Forcing authentication...');
setTimeout(() => {
this.api.forceRestart();
}, 2000);
} else {
this.api.forceRestart();
}
}
}
}