versione 1.2.14 :
- aggiornati i file di configurazione, ENV e script non funzionanti., package. - corretto custom-service-worker.js con CORS - ottimizzato il server, la chiamata Load iniziale (senza promise, con async/await).
This commit is contained in:
@@ -111,24 +111,26 @@ async function sendSwMsgIfAvailable() {
|
||||
|
||||
const count = await checkPendingMsg()
|
||||
if (count) {
|
||||
return navigator.serviceWorker.ready
|
||||
.then(() => globalroutines('readall', 'swmsg')
|
||||
.then((arr_recmsg) => {
|
||||
if (arr_recmsg.length > 0) {
|
||||
console.log('---------------------- 2) navigator (2) .serviceWorker.ready')
|
||||
let promiseChain = Promise.resolve()
|
||||
if (useServiceWorker()) {
|
||||
return navigator.serviceWorker.ready
|
||||
.then(() => globalroutines('readall', 'swmsg')
|
||||
.then((arr_recmsg) => {
|
||||
if (arr_recmsg.length > 0) {
|
||||
console.log('---------------------- 2) navigator (2) .serviceWorker.ready')
|
||||
let promiseChain = Promise.resolve()
|
||||
|
||||
for (const rec of arr_recmsg) {
|
||||
// #Alternative to SyncManager
|
||||
promiseChain = promiseChain.then(() => Api.syncAlternative(rec._id)
|
||||
.then(() => {
|
||||
//++Todo conv: something = true
|
||||
}))
|
||||
for (const rec of arr_recmsg) {
|
||||
// #Alternative to SyncManager
|
||||
promiseChain = promiseChain.then(() => Api.syncAlternative(rec._id)
|
||||
.then(() => {
|
||||
//++Todo conv: something = true
|
||||
}))
|
||||
}
|
||||
return promiseChain
|
||||
}
|
||||
return promiseChain
|
||||
}
|
||||
return null
|
||||
}))
|
||||
return null
|
||||
}))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5406,7 +5406,7 @@ export const tools = {
|
||||
isVerified(): boolean {
|
||||
const globalStore = useGlobalStore()
|
||||
const site = globalStore.site
|
||||
if (site.confpages.enableRegMultiChoice) {
|
||||
if (site.confpages?.enableRegMultiChoice) {
|
||||
return this.TelegVerificato() || this.isEmailVerified()
|
||||
}
|
||||
|
||||
@@ -5441,7 +5441,7 @@ export const tools = {
|
||||
getLinkUserTelegramByUser(userprofile: IUserFields) {
|
||||
|
||||
if (userprofile) {
|
||||
if (userprofile.profile.username_telegram) {
|
||||
if (userprofile.profile?.username_telegram) {
|
||||
return 'https://t.me/' + userprofile.profile.username_telegram
|
||||
}
|
||||
} else {
|
||||
@@ -7960,7 +7960,11 @@ export const tools = {
|
||||
return config[name]*/
|
||||
|
||||
try {
|
||||
return name ? import.meta.env[name] : ''
|
||||
let myenv = name ? import.meta.env[name] : ''
|
||||
|
||||
// console.log('--- ENV: ', name, myenv)
|
||||
|
||||
return myenv
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user