View fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "diuna",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.5",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||
<script src="https://accounts.google.com/gsi/client" async="" defer=""></script>
|
||||
<link rel="manifest" href="manifest.webmanifest">
|
||||
<meta name="theme-color" content="#1976d2">
|
||||
<meta name="theme-color" content="#FF9800">
|
||||
</head>
|
||||
<body class="mat-typography">
|
||||
<app-root></app-root>
|
||||
|
||||
@@ -12,49 +12,49 @@
|
||||
"src": "assets/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "assets/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable any"
|
||||
"purpose": "maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace WebAPI.Controllers
|
||||
new Claim(JwtRegisteredClaimNames.Jti,
|
||||
Guid.NewGuid().ToString())
|
||||
}),
|
||||
Expires = DateTime.UtcNow.AddMinutes(5),
|
||||
Expires = DateTime.UtcNow.AddMinutes(30), // TODO: to long - to fix in the future
|
||||
SigningCredentials = new SigningCredentials
|
||||
(new SymmetricSecurityKey(key),
|
||||
SecurityAlgorithms.HmacSha512Signature)
|
||||
|
||||
Reference in New Issue
Block a user