- attivita
- gestione degli script sul server - creato websocket per interagire con gli script del server.
This commit is contained in:
@@ -74,12 +74,15 @@ export const tools = {
|
||||
COOK_MAP_CENTER_LONG: 'MAP_LONG',
|
||||
COOK_MAP_ZOOM: 'MAP_Z',
|
||||
COOK_CATEGORIA: 'CATEG',
|
||||
COOK_MAPBOUNDS: 'MAP-B',
|
||||
|
||||
FRIENDS_SEARCH: 'FR_SE',
|
||||
GROUP_SEARCH: 'GR_SE',
|
||||
CIRCUIT_SEARCH: 'CI_SE',
|
||||
CIRCUIT_USE: 'CIR_U',
|
||||
|
||||
BUTT_ADDREC: 1,
|
||||
|
||||
getprefCountries: ['it', 'es', 'us'],
|
||||
|
||||
APORTADOR_NONE: '------',
|
||||
@@ -2148,9 +2151,10 @@ export const tools = {
|
||||
},
|
||||
|
||||
strToObj(mystr: string): any {
|
||||
if (mystr)
|
||||
if (mystr) {
|
||||
mystr = decodeURIComponent(mystr)
|
||||
return JSON.parse(mystr)
|
||||
else
|
||||
} else
|
||||
return null
|
||||
},
|
||||
|
||||
@@ -4407,6 +4411,13 @@ export const tools = {
|
||||
getvers() {
|
||||
return process.env.APP_VERSION
|
||||
},
|
||||
getWssUrl(): string | URL {
|
||||
let myurl = process.env.APP_URL!
|
||||
if (myurl)
|
||||
return myurl.replace(/(https?:\/\/[^:]+):\d+/, `$1:3000`).replace(/^http/, 'wss');
|
||||
else
|
||||
return ''
|
||||
},
|
||||
getheaders() {
|
||||
const userStore = useUserStore()
|
||||
return [{ name: 'x-auth', value: userStore.x_auth_token }, { name: 'x-refrtok', value: userStore.refreshToken }]
|
||||
@@ -8709,6 +8720,21 @@ export const tools = {
|
||||
console.error('Errore durante la conversione:', error);
|
||||
return 0
|
||||
}
|
||||
},
|
||||
|
||||
getLabelAddrec(ind: any) {
|
||||
return (ind >= 0) ? translate('grid.newrecord') + ` ` + costanti.MAINCARDS[ind].strsingolo : ''
|
||||
},
|
||||
|
||||
getCoordinatesToShow(coordinate_gps: any) {
|
||||
|
||||
if (coordinate_gps) {
|
||||
if (coordinate_gps.coordinates) {
|
||||
const lng = coordinate_gps.coordinates[0]
|
||||
const lat = coordinate_gps.coordinates[1]
|
||||
return `Coordinate: ${lng}, Lat: ${lat}`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FINE !
|
||||
|
||||
Reference in New Issue
Block a user