Frontent login

This commit is contained in:
2022-12-05 17:42:52 +01:00
parent 9f6c99a12e
commit 7330fb90f2
11 changed files with 65 additions and 96 deletions

View File

@@ -1,6 +1,6 @@
import { OnInit } from '@angular/core';
import { Component, ViewChild } from '@angular/core';
import { MatSidenav } from '@angular/material/sidenav';
import { Router } from '@angular/router';
import * as moment from 'moment';
import packageInfo from 'package.json';
import { DataService } from '../services/data.service';
@@ -23,14 +23,18 @@ export class MainViewComponent {
loading: boolean = false;
constructor(
public _data: DataService,
public _device: DeviceService
public data$: DataService,
public device$: DeviceService,
private router$: Router
) { }
reloadApp() {
document.location.reload();
}
logout() {
// @ts-ignore
google.accounts.id.disableAutoSelect();
this.router$.navigate(['']);
this.data$.currentUser = null;
}
}