View fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "diuna",
|
"name": "diuna",
|
||||||
"version": "0.0.3",
|
"version": "0.0.5",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
|
|||||||
@@ -17,15 +17,8 @@ export class AuthService {
|
|||||||
|
|
||||||
ping() {
|
ping() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const headers = new HttpHeaders({
|
this.http$.get<any>(`${environment.api.url}/ping/ping`).subscribe({
|
||||||
'Authorization': `Bearer ${this.apiToken}`
|
|
||||||
})
|
|
||||||
this.http$.get<any>(`${environment.api.url}/ping/ping`, {
|
|
||||||
headers,
|
|
||||||
withCredentials: true
|
|
||||||
}).subscribe({
|
|
||||||
next: (data) => {
|
next: (data) => {
|
||||||
console.log('Ping', data);
|
|
||||||
resolve(data);
|
resolve(data);
|
||||||
},
|
},
|
||||||
error: (e) => {
|
error: (e) => {
|
||||||
|
|||||||
@@ -220,6 +220,6 @@ a:visited {
|
|||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
::ng-deep .mat-simple-snackbar-action {
|
::ng-deep .mat-mdc-snack-bar-action {
|
||||||
color: #000;
|
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 { MatSidenav } from '@angular/material/sidenav';
|
||||||
import { NavigationStart, Router } from '@angular/router';
|
import { NavigationStart, Router } from '@angular/router';
|
||||||
import { SwUpdate } from '@angular/service-worker';
|
import { SwUpdate } from '@angular/service-worker';
|
||||||
@@ -26,6 +26,7 @@ export class MainViewComponent {
|
|||||||
public device$: DeviceService,
|
public device$: DeviceService,
|
||||||
private router$: Router,
|
private router$: Router,
|
||||||
private swUpdate$: SwUpdate,
|
private swUpdate$: SwUpdate,
|
||||||
|
private ngZone$: NgZone
|
||||||
) {
|
) {
|
||||||
this.swUpdate$.versionUpdates.subscribe(() => {
|
this.swUpdate$.versionUpdates.subscribe(() => {
|
||||||
this.reloadApp();
|
this.reloadApp();
|
||||||
@@ -38,7 +39,9 @@ export class MainViewComponent {
|
|||||||
|
|
||||||
//listen to loading subject
|
//listen to loading subject
|
||||||
data$.showLoader.subscribe(loading => {
|
data$.showLoader.subscribe(loading => {
|
||||||
this.loading = loading;
|
this.ngZone$.run(() => {
|
||||||
|
this.loading = loading;
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
reloadApp() {
|
reloadApp() {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
|
||||||
<script src="https://accounts.google.com/gsi/client" async="" defer=""></script>
|
<script src="https://accounts.google.com/gsi/client" async="" defer=""></script>
|
||||||
<link rel="manifest" href="manifest.webmanifest">
|
<link rel="manifest" href="manifest.webmanifest">
|
||||||
<meta name="theme-color" content="#1976d2">
|
<meta name="theme-color" content="#FF9800">
|
||||||
</head>
|
</head>
|
||||||
<body class="mat-typography">
|
<body class="mat-typography">
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
|
|||||||
@@ -12,49 +12,49 @@
|
|||||||
"src": "assets/icons/icon-72x72.png",
|
"src": "assets/icons/icon-72x72.png",
|
||||||
"sizes": "72x72",
|
"sizes": "72x72",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-96x96.png",
|
"src": "assets/icons/icon-96x96.png",
|
||||||
"sizes": "96x96",
|
"sizes": "96x96",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-128x128.png",
|
"src": "assets/icons/icon-128x128.png",
|
||||||
"sizes": "128x128",
|
"sizes": "128x128",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-144x144.png",
|
"src": "assets/icons/icon-144x144.png",
|
||||||
"sizes": "144x144",
|
"sizes": "144x144",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-152x152.png",
|
"src": "assets/icons/icon-152x152.png",
|
||||||
"sizes": "152x152",
|
"sizes": "152x152",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-192x192.png",
|
"src": "assets/icons/icon-192x192.png",
|
||||||
"sizes": "192x192",
|
"sizes": "192x192",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-384x384.png",
|
"src": "assets/icons/icon-384x384.png",
|
||||||
"sizes": "384x384",
|
"sizes": "384x384",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "assets/icons/icon-512x512.png",
|
"src": "assets/icons/icon-512x512.png",
|
||||||
"sizes": "512x512",
|
"sizes": "512x512",
|
||||||
"type": "image/png",
|
"type": "image/png",
|
||||||
"purpose": "maskable any"
|
"purpose": "maskable"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ namespace WebAPI.Controllers
|
|||||||
new Claim(JwtRegisteredClaimNames.Jti,
|
new Claim(JwtRegisteredClaimNames.Jti,
|
||||||
Guid.NewGuid().ToString())
|
Guid.NewGuid().ToString())
|
||||||
}),
|
}),
|
||||||
Expires = DateTime.UtcNow.AddMinutes(5),
|
Expires = DateTime.UtcNow.AddMinutes(30), // TODO: to long - to fix in the future
|
||||||
SigningCredentials = new SigningCredentials
|
SigningCredentials = new SigningCredentials
|
||||||
(new SymmetricSecurityKey(key),
|
(new SymmetricSecurityKey(key),
|
||||||
SecurityAlgorithms.HmacSha512Signature)
|
SecurityAlgorithms.HmacSha512Signature)
|
||||||
|
|||||||
Reference in New Issue
Block a user