0.3.14:
Se errore di connessione al Server: compare l'username telegram ! Se Cookie disattivati: non riesci a loggare. sui Gruppi: non si vede il Comune ! Sei stato accettato da paoloar77 a far parte del Gruppo Terraw. MSG SBAGLIATO l'immagine dell'amministratore del gruppo non compariva
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.13"
|
||||
APP_VERSION="0.3.14"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -796,7 +796,13 @@ export default defineComponent({
|
||||
recCatGrp: 1,
|
||||
}
|
||||
},
|
||||
|
||||
lookup5: {
|
||||
lk_tab: 'cities',
|
||||
lk_LF: 'idCity',
|
||||
lk_FF: '_id',
|
||||
lk_as: 'mycities',
|
||||
af_objId_tab: '',
|
||||
},
|
||||
}
|
||||
|
||||
} else if (props.table === toolsext.TABMYGOODS) {
|
||||
|
||||
@@ -76,7 +76,8 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function condividipag() {
|
||||
return tools.copyStringToClipboard($q, self.location.host + tools.getPathByGroup(myrec.value, props.table), true)
|
||||
const msg = self.location.host + tools.getPathByGroup(myrec.value, props.table)
|
||||
return tools.copyStringToClipboard($q, msg, true)
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
@@ -312,6 +312,7 @@ export default defineComponent({
|
||||
|
||||
// Check if exist other array:
|
||||
if (props.col) {
|
||||
|
||||
if (props.col.remote_table && props.col.remote_key && props.col.remote_field) {
|
||||
|
||||
try {
|
||||
|
||||
@@ -118,13 +118,14 @@ export default defineComponent({
|
||||
})
|
||||
.then((riscode: number) => {
|
||||
if (riscode === tools.OK) {
|
||||
// console.log(' -> eseguo emit(loginOk)')
|
||||
console.log(' -> eseguo emit(loginOk)')
|
||||
|
||||
emit('loginOk')
|
||||
|
||||
globalStore.createPushSubscription()
|
||||
|
||||
} else {
|
||||
console.log(' -> eseguo emit(checkErrors)')
|
||||
emit('checkErrors', riscode)
|
||||
}
|
||||
|
||||
|
||||
@@ -23,9 +23,11 @@ export default defineComponent({
|
||||
setup(props) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
return {
|
||||
userStore,
|
||||
globalStore,
|
||||
tools,
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="q-ma-md">
|
||||
<div v-if="!globalStore.serverError" class="q-ma-md">
|
||||
<CVerifyTelegram v-if="!tools.TelegVerificato() || !tools.isUsernameTelegOk()">
|
||||
|
||||
</CVerifyTelegram>
|
||||
|
||||
@@ -84,11 +84,11 @@ async function Request(type: string, path: string, payload: any): Promise<Types.
|
||||
}
|
||||
if (setAuthToken) {
|
||||
userStore.UpdatePwd(x_auth_token)
|
||||
tools.localStSetItem(toolsext.localStorage.token, x_auth_token)
|
||||
localStorage.setItem(toolsext.localStorage.token, x_auth_token)
|
||||
}
|
||||
|
||||
userStore.setAuth(x_auth_token)
|
||||
tools.localStSetItem(toolsext.localStorage.token, x_auth_token)
|
||||
localStorage.setItem(toolsext.localStorage.token, x_auth_token)
|
||||
}
|
||||
|
||||
globalStore.setStateConnection(ricevuto ? 'online' : 'offline')
|
||||
|
||||
@@ -670,7 +670,7 @@ export const colmyGoods = [
|
||||
fieldtype: costanti.FieldType.string,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
noshowlabel: true,
|
||||
maxlength: 90,
|
||||
maxlength: 120,
|
||||
required: true,
|
||||
sortable: false,
|
||||
}),
|
||||
@@ -837,7 +837,7 @@ export const colmySkills = [
|
||||
fieldtype: costanti.FieldType.string,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
noshowlabel: true,
|
||||
maxlength: 90,
|
||||
maxlength: 120,
|
||||
required: true,
|
||||
sortable: false,
|
||||
}),
|
||||
@@ -1010,7 +1010,7 @@ export const colmyBachecas = [
|
||||
fieldtype: costanti.FieldType.string,
|
||||
showWhen: costanti.showWhen.NewRec + costanti.showWhen.InPage + costanti.showWhen.InEdit + costanti.showWhen.InView_OnlyifExist,
|
||||
noshowlabel: true,
|
||||
maxlength: 90,
|
||||
maxlength: 120,
|
||||
required: true,
|
||||
sortable: false,
|
||||
}),
|
||||
|
||||
@@ -3364,6 +3364,10 @@ export const tools = {
|
||||
localStorage.setItem(item, value)
|
||||
},
|
||||
|
||||
localStReal(item: string, value : string) {
|
||||
localStorage.setItem(item, value)
|
||||
},
|
||||
|
||||
setCookie(mytok: any, value: string) {
|
||||
// console.log('setCookie', mytok, value)
|
||||
if (localStorage.getItem('cookie-id') === 'decline')
|
||||
@@ -4138,8 +4142,9 @@ export const tools = {
|
||||
|
||||
isLogged() {
|
||||
const userStore = useUserStore()
|
||||
const globalStore = useGlobalStore()
|
||||
if (!!userStore)
|
||||
return userStore.isLogged
|
||||
return userStore.isLogged && !globalStore.serverError
|
||||
else
|
||||
return false
|
||||
},
|
||||
|
||||
@@ -540,8 +540,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
tools.localStSetItem(toolsext.localStorage.perm, String(myuser.perm) || '')
|
||||
if (myuser.profile !== undefined) tools.localStSetItem(toolsext.localStorage.img, (myuser.profile.img) ? String(myuser.profile.img) || '' : '')
|
||||
else tools.localStSetItem(toolsext.localStorage.img, '')
|
||||
tools.localStSetItem(toolsext.localStorage.token, this.x_auth_token)
|
||||
tools.localStSetItem(toolsext.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(toolsext.localStorage.token, this.x_auth_token)
|
||||
localStorage.setItem(toolsext.localStorage.expirationDate, expirationDate.toString())
|
||||
tools.localStSetItem(toolsext.localStorage.isLogged, String(true))
|
||||
tools.localStSetItem(toolsext.localStorage.verified_email, String(myuser.verified_email))
|
||||
tools.localStSetItem(toolsext.localStorage.verified_by_aportador, String(myuser.verified_by_aportador))
|
||||
@@ -600,8 +600,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
tools.localStSetItem(toolsext.localStorage.username, newuser.username)
|
||||
tools.localStSetItem(toolsext.localStorage.name, newuser.name)
|
||||
tools.localStSetItem(toolsext.localStorage.surname, newuser.surname)
|
||||
tools.localStSetItem(toolsext.localStorage.token, this.x_auth_token)
|
||||
tools.localStSetItem(toolsext.localStorage.expirationDate, expirationDate.toString())
|
||||
localStorage.setItem(toolsext.localStorage.token, this.x_auth_token)
|
||||
localStorage.setItem(toolsext.localStorage.expirationDate, expirationDate.toString())
|
||||
tools.localStSetItem(toolsext.localStorage.verified_email, String(false))
|
||||
tools.localStSetItem(toolsext.localStorage.verified_by_aportador, String(false))
|
||||
|
||||
@@ -815,6 +815,8 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
this.isLogged = isok && isLogged
|
||||
|
||||
console.log('this.isLogged', this.isLogged, 'isok', isok, 'isLogged', isLogged)
|
||||
|
||||
if (static_data.functionality.ENABLE_TODOS_LOADING)
|
||||
await todos.dbLoad({ checkPending: true })
|
||||
|
||||
@@ -842,7 +844,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
try {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
// console.log('*** autologin_FromLocalStorage ***')
|
||||
console.log('*** autologin_FromLocalStorage ***')
|
||||
// INIT
|
||||
|
||||
let isLogged = false
|
||||
@@ -850,7 +852,23 @@ export const useUserStore = defineStore('UserStore', {
|
||||
this.lang = tools.getItemLS(toolsext.localStorage.lang)
|
||||
|
||||
const token = localStorage.getItem(toolsext.localStorage.token)
|
||||
|
||||
if (token) {
|
||||
const expirationDateStr = localStorage.getItem(toolsext.localStorage.expirationDate)
|
||||
const expirationDate = new Date(String(expirationDateStr))
|
||||
const now = tools.getDateNow()
|
||||
if (now < expirationDate) {
|
||||
this.setAuth(token)
|
||||
isLogged = true
|
||||
|
||||
} else {
|
||||
// ++ ?? che fare qui
|
||||
}
|
||||
} else {
|
||||
isLogged = tools.isLogged()
|
||||
}
|
||||
|
||||
/*if (token) {
|
||||
const expirationDateStr = localStorage.getItem(toolsext.localStorage.expirationDate)
|
||||
const expirationDate = new Date(String(expirationDateStr))
|
||||
const now = tools.getDateNow()
|
||||
@@ -900,7 +918,9 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
isLogged = true
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
return await this.setGlobal($router, isLogged)
|
||||
.then((loadstorage: any) => {
|
||||
|
||||
@@ -1327,17 +1327,21 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
this.mypage = (res.data.mypage) ? [...res.data.mypage] : []
|
||||
}
|
||||
|
||||
let isLogged = false
|
||||
|
||||
// console.log('res.data.myuser', res.data.myuser)
|
||||
if (res.data.myuser) {
|
||||
userStore.authUser(res.data.myuser)
|
||||
|
||||
userStore.updateLocalStorage(res.data.myuser)
|
||||
|
||||
isLogged = !!res.data.myuser.username
|
||||
} else {
|
||||
// User not exist !!
|
||||
|
||||
}
|
||||
|
||||
const isLogged = localStorage.getItem(toolsext.localStorage.username)
|
||||
// const isLogged = localStorage.getItem(toolsext.localStorage.username)
|
||||
console.log('isLogged', isLogged)
|
||||
|
||||
// calendarStore.editable = userStore.isAdmin || userStore.isManager || userStore.isTutor
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
<CMyUser
|
||||
:mycontact="user"
|
||||
:visu="costanti.FIND_PEOPLE"
|
||||
@setCmd="setCmd"
|
||||
@setCmd="tools.setCmd"
|
||||
>
|
||||
</CMyUser>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user