This commit is contained in:
2022-12-11 21:30:54 +01:00
parent fbefa6d847
commit d69d571393
7 changed files with 18 additions and 22 deletions

View File

@@ -17,15 +17,8 @@ export class AuthService {
ping() {
return new Promise((resolve, reject) => {
const headers = new HttpHeaders({
'Authorization': `Bearer ${this.apiToken}`
})
this.http$.get<any>(`${environment.api.url}/ping/ping`, {
headers,
withCredentials: true
}).subscribe({
this.http$.get<any>(`${environment.api.url}/ping/ping`).subscribe({
next: (data) => {
console.log('Ping', data);
resolve(data);
},
error: (e) => {

View File

@@ -220,6 +220,6 @@ a:visited {
color: #000;
}
::ng-deep .mat-simple-snackbar-action {
::ng-deep .mat-mdc-snack-bar-action {
color: #000;
}

View File

@@ -1,4 +1,4 @@
import { Component, ViewChild } from '@angular/core';
import { Component, NgZone, ViewChild } from '@angular/core';
import { MatSidenav } from '@angular/material/sidenav';
import { NavigationStart, Router } from '@angular/router';
import { SwUpdate } from '@angular/service-worker';
@@ -26,6 +26,7 @@ export class MainViewComponent {
public device$: DeviceService,
private router$: Router,
private swUpdate$: SwUpdate,
private ngZone$: NgZone
) {
this.swUpdate$.versionUpdates.subscribe(() => {
this.reloadApp();
@@ -38,7 +39,9 @@ export class MainViewComponent {
//listen to loading subject
data$.showLoader.subscribe(loading => {
this.loading = loading;
this.ngZone$.run(() => {
this.loading = loading;
});
});
}
reloadApp() {