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

@@ -1,6 +1,6 @@
{
"name": "diuna",
"version": "0.0.3",
"version": "0.0.5",
"scripts": {
"ng": "ng",
"start": "ng serve",

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,8 +39,10 @@ export class MainViewComponent {
//listen to loading subject
data$.showLoader.subscribe(loading => {
this.ngZone$.run(() => {
this.loading = loading;
});
});
}
reloadApp() {
document.location.reload();

View File

@@ -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>

View File

@@ -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"
}
]
}

View File

@@ -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)