- corretto problema ROGNOSO : Risolvere la questione "Sessioni multiple", se apro 2 browser l'ultimo va a cancellare il precedente, e mi da errore di email non valida !
Il problema era sulla fetch nel service worker, gestita in quel modo personalizzato, andava in conflitto, non tenendo le chiamate bloccanti, ma uscivano prima che arrivasse la risposta del server. - Per chi è da tanto che non si collega a RISO, compare "Email non verificata"... (si risolve chiudendo su ESCI e riloggandosi)... però andrebbe sistemata. (stesso problema di prima).
This commit is contained in:
@@ -8250,10 +8250,10 @@ export const tools = {
|
||||
return {
|
||||
idSector: tools.getSelectionByTable('sectors', 0, true),
|
||||
idSkill: tools.getSelectionByTable('skills', 0, true),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', []),
|
||||
idStatusSkill: tools.getSelectionByTable('statusSkills', [shared_consts.STATUSSKILL_DI_PERSONA]),
|
||||
idContribType: tools.getSelectionByTable('contribtypes', []),
|
||||
dateTimeStart: tools.getDateTomorrowByTime(21),
|
||||
dateTimeEnd: tools.getDateTomorrowByTime(23),
|
||||
dateTimeEnd: null,
|
||||
idCity: tools.getCitySel(),
|
||||
NumLevel: 0,
|
||||
adType: tools.getSelectionByTable('adtypes', costanti.AdType.OFFRO),
|
||||
@@ -9153,20 +9153,19 @@ export const tools = {
|
||||
// console.log('checkApp (homescreen=', globalStore.homescreen)
|
||||
|
||||
try {
|
||||
let displayMode = 'browser';
|
||||
const mqStandAlone = '(display-mode: standalone)';
|
||||
// @ts-ignore
|
||||
if (
|
||||
(navigator && navigator.standalone) ||
|
||||
window.matchMedia(mqStandAlone).matches
|
||||
) {
|
||||
// console.log('navigator.standalone')
|
||||
displayMode = 'standalone';
|
||||
}
|
||||
// prova altro 2
|
||||
// console.log('displayMode = ', displayMode)
|
||||
// Rileva iOS
|
||||
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent);
|
||||
|
||||
globalStore.isAppRunning = displayMode === 'standalone' || globalStore.homescreen;
|
||||
// Modalità standalone su iOS (Safari)
|
||||
const isStandaloneIOS = isIOS && (navigator as any).standalone === true;
|
||||
|
||||
// Modalità standalone su altri browser (Chromium, Firefox, ecc.)
|
||||
const isStandaloneOther = window.matchMedia('(display-mode: standalone)').matches;
|
||||
|
||||
const isStandalone = isStandaloneIOS || isStandaloneOther;
|
||||
|
||||
// Imposta lo stato
|
||||
globalStore.isAppRunning = isStandalone || globalStore.homescreen;
|
||||
} catch (e) {
|
||||
console.log('error navigator.standalone ?!', e);
|
||||
}
|
||||
@@ -9175,10 +9174,11 @@ export const tools = {
|
||||
try {
|
||||
// console.log('initprompt')
|
||||
const globalStore = useGlobalStore();
|
||||
console.log('ADD: beforeinstallprompt');
|
||||
|
||||
window.addEventListener('beforeinstallprompt', (event) => {
|
||||
console.log('*** ESSGUI: beforeinstallprompt');
|
||||
event.preventDefault();
|
||||
console.log('beforeinstallprompt !');
|
||||
// Stash the event so it can be triggered later.
|
||||
globalStore.deferredPrompt = event;
|
||||
|
||||
@@ -11194,7 +11194,9 @@ export const tools = {
|
||||
getmenuByPath(path: string) {
|
||||
const myroutes = static_data.routes;
|
||||
|
||||
const norm = path ? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase() : undefined;
|
||||
const norm = path
|
||||
? (path.startsWith('/') ? path : `/${path}`).trim().toLowerCase()
|
||||
: undefined;
|
||||
|
||||
const mymenus = myroutes.find((menu: any) => menu.path === norm);
|
||||
|
||||
@@ -11203,9 +11205,21 @@ export const tools = {
|
||||
return mymenus;
|
||||
},
|
||||
norm(path?: string): string | undefined {
|
||||
return typeof path === 'string' ? path.trim().replace(/^\/+|\/+$/g, '').toLowerCase() : undefined;
|
||||
return typeof path === 'string'
|
||||
? path
|
||||
.trim()
|
||||
.replace(/^\/+|\/+$/g, '')
|
||||
.toLowerCase()
|
||||
: undefined;
|
||||
},
|
||||
|
||||
isInTelegramWebView() {
|
||||
try {
|
||||
return /Telegram/.test(navigator.userAgent);
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
},
|
||||
// FINE !
|
||||
|
||||
// getLocale() {
|
||||
|
||||
Reference in New Issue
Block a user