info-library 2.14.49-beta.2 → 2.14.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2020/layouts/topmenu/topmenu.component.mjs +2 -2
- package/esm2020/service/authentication.service.mjs +8 -8
- package/fesm2015/info-library.mjs +8 -8
- package/fesm2015/info-library.mjs.map +1 -1
- package/fesm2020/info-library.mjs +8 -8
- package/fesm2020/info-library.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1088,13 +1088,13 @@ class InfoAuthenticationService {
|
|
|
1088
1088
|
if (this._sessao.TempoInatividade == null || this._sessao.TempoInatividade <= 0)
|
|
1089
1089
|
return;
|
|
1090
1090
|
let tempoSessao = this._sessao.TempoInatividade;
|
|
1091
|
-
|
|
1091
|
+
this._utilities.setLocalStorage('ms', new Date().valueOf().toString());
|
|
1092
1092
|
this._sessionTimeInterval = setInterval(() => {
|
|
1093
1093
|
if (tempoSessao > 0) {
|
|
1094
1094
|
tempoSessao--;
|
|
1095
1095
|
return;
|
|
1096
1096
|
}
|
|
1097
|
-
let tempoRestante = Math.round(this._sessao.TempoInatividade - ((new Date().valueOf() - parseInt(
|
|
1097
|
+
let tempoRestante = Math.round(this._sessao.TempoInatividade - ((new Date().valueOf() - parseInt(this._utilities.getLocalStorage('ms'))) / 1000));
|
|
1098
1098
|
if (!isNaN(tempoRestante) && tempoRestante > 0) {
|
|
1099
1099
|
tempoSessao = tempoRestante;
|
|
1100
1100
|
return;
|
|
@@ -1114,7 +1114,7 @@ class InfoAuthenticationService {
|
|
|
1114
1114
|
width: '500px'
|
|
1115
1115
|
});
|
|
1116
1116
|
ref.afterClosed().subscribe((r) => {
|
|
1117
|
-
if (r != null && (r.modalAction == InfoModalAction.Yes || (this._sessao.TempoInatividade - ((new Date().valueOf() - parseInt(
|
|
1117
|
+
if (r != null && (r.modalAction == InfoModalAction.Yes || (this._sessao.TempoInatividade - ((new Date().valueOf() - parseInt(this._utilities.getLocalStorage('ms'))) / 1000)) > 0)) {
|
|
1118
1118
|
this._sessionActive = true;
|
|
1119
1119
|
this.refreshSessionTime();
|
|
1120
1120
|
}
|
|
@@ -1276,8 +1276,8 @@ class InfoAuthenticationService {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
removeSessao() {
|
|
1278
1278
|
Object.keys(localStorage).forEach((key) => {
|
|
1279
|
-
if (!key.includes('Dashboard') && !key.includes('cols'))
|
|
1280
|
-
|
|
1279
|
+
if (!key.includes('Dashboard') && !key.includes('cols') && !key.includes('_'))
|
|
1280
|
+
localStorage.removeItem(key);
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
definePaginaAtiva(url) {
|
|
@@ -1288,8 +1288,8 @@ class InfoAuthenticationService {
|
|
|
1288
1288
|
let aux = url.substring(1).replace(/-/g, '').toLowerCase().split('/');
|
|
1289
1289
|
let tituloMenu = aux.length > 0 ? aux[0].toString() : url;
|
|
1290
1290
|
let parametrosUrl = url.split('/').slice(2);
|
|
1291
|
-
if (tituloMenu.indexOf('
|
|
1292
|
-
this._plataforma.PaginaAtiva = { Icone: 'widgets', Titulo: '
|
|
1291
|
+
if (tituloMenu.indexOf('nicio') > -1)
|
|
1292
|
+
this._plataforma.PaginaAtiva = { Icone: 'widgets', Titulo: 'Inicio' };
|
|
1293
1293
|
else {
|
|
1294
1294
|
let item = this._plataforma.Menu.filter(m => m.Title.toLowerCase().indexOf(tituloMenu) > -1);
|
|
1295
1295
|
let subTitulo = "";
|
|
@@ -8341,7 +8341,7 @@ class InfoTopMenuComponent {
|
|
|
8341
8341
|
this.loading = false;
|
|
8342
8342
|
this.menu = [];
|
|
8343
8343
|
this.openSubmenu = '';
|
|
8344
|
-
this.menuAtivo = '
|
|
8344
|
+
this.menuAtivo = 'Inicio';
|
|
8345
8345
|
}
|
|
8346
8346
|
ngOnInit() {
|
|
8347
8347
|
if (!this._authentication.isLogged() || this.api == null)
|