View fix
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -220,6 +220,6 @@ a:visited {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
::ng-deep .mat-simple-snackbar-action {
|
||||
::ng-deep .mat-mdc-snack-bar-action {
|
||||
color: #000;
|
||||
}
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user