- 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:
4
.env
4
.env
@@ -1,6 +1,6 @@
|
||||
VITE_APP_VERSION="1.2.71"
|
||||
VITE_APP_VERSION="1.2.72"
|
||||
VITE_LANG_DEFAULT="it"
|
||||
VITE_PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
|
||||
VITE_SERVICE_WORKER_FILE="sw-1.2.71.js"
|
||||
VITE_SERVICE_WORKER_FILE="sw-1.2.72.js"
|
||||
VITE_PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
|
||||
VITE_VUE_ROUTER_MODE="history"
|
||||
@@ -10,7 +10,7 @@
|
||||
<meta name="description" content="<%= productDescription %>">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
<meta name="msapplication-tap-highlight" content="no">
|
||||
<meta name="version" content="1.2.71">
|
||||
<meta name="version" content="1.2.72">
|
||||
<meta name="viewport"
|
||||
content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width<% if (ctx.mode.cordova || ctx.mode.capacitor) { %>, viewport-fit=cover<% } %>">
|
||||
|
||||
|
||||
12
package.json
12
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"productName": "Riso 💚 - Rete Italiana Scambi Orizzontali",
|
||||
"description": "Progetto RISO (Rete Italiana Scambi Orizzontali) promuove una rete di comunità locali che favoriscono scambi di beni, servizi e ospitalità. Con l'App RISO, sviluppata per facilitare il baratto, il dono e l'uso di monete alternative come i RIS, il progetto crea legami autentici basati sulla fiducia e sostenibilità. Partecipa agli scambi e costruisci una comunità più consapevole e autosufficiente.",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "APP_VERSION='1.2.71' PORT=8084 quasar dev",
|
||||
"dev": "APP_VERSION='1.2.72' PORT=8084 quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "quasar build -m spa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -55,6 +55,15 @@ export default defineConfig((ctx) => {
|
||||
// Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build
|
||||
|
||||
build: {
|
||||
viteConf: {
|
||||
server: {
|
||||
hmr: {
|
||||
protocol: 'wss', // o 'ws' se usi HTTP
|
||||
host: 'localhost',
|
||||
port: 8094,
|
||||
},
|
||||
},
|
||||
},
|
||||
target: {
|
||||
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
|
||||
node: 'node20',
|
||||
@@ -383,6 +392,7 @@ export default defineConfig((ctx) => {
|
||||
swSrc: 'src-pwa/custom-service-worker.js', // Assicurati che il file esista
|
||||
include: [/\.html$/, /\.js$/, /\.css$/, /\.png$/, /\.svg$/, /\.json$/], // File da precacheare
|
||||
},
|
||||
suppressWarnings: true,
|
||||
/*extendGenerateSWOptions(cfg) {
|
||||
cfg.skipWaiting = false
|
||||
cfg.clientsClaim = false
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cnm",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"description": "Comunita Nuovo Mondo",
|
||||
"productName": "ComunitaNuovoMondo",
|
||||
"author": "Surya",
|
||||
@@ -9,7 +9,7 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.71' quasar dev",
|
||||
"dev": "PORT=8083 APP_VERSION='1.2.72' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production quasar build -m pwa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "freeplanet",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"description": "freeplanet",
|
||||
"productName": "freeplanet",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8087 APP_VERSION='1.2.71' quasar dev",
|
||||
"dev": "PORT=8087 APP_VERSION='1.2.72' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "quasar build -m spa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8097 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8087 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
VITE_APP_ID="18"
|
||||
VITE_APP_URL="https://test.gruppomacro.app"
|
||||
VITE_MONGODB_HOST="https://testapi.gruppomacro.app"
|
||||
VITE_LOGO_REG="gruppomacro-logo-full.png"
|
||||
VITE_APP_URL="https://gruppomacro.app"
|
||||
VITE_MONGODB_HOST="https://api.gruppomacro.app"
|
||||
VITE_LOGO_REG='gruppomacro-logo-full.png'
|
||||
VITE_PUBLICKEY_PUSH="BJgo8XR_upbnbMLWgCAUELo6DK7dRXffYAnFOxbaMMz5favBgcQBKT-eISqouO-jRad4Sw8l5nd2wCF6KorGiTc"
|
||||
VITE_DEBUG="1"
|
||||
VITE_VUE_APP_ISTEST="1"
|
||||
VITE_DEBUG="0"
|
||||
VITE_VUE_APP_ISTEST="0"
|
||||
DIRECTORY_LOCAL="myprojplanet_vite"
|
||||
DIRECTORY_SERVER="/var/www/nodejs_test.piuchebuono_server"
|
||||
SERVERDIR_WEBSITE="/var/www/test.gruppomacro.app"
|
||||
DIRECTORY_SERVER="/var/www/nodejs_piuchebuono_server"
|
||||
SERVERDIR_WEBSITE="/var/www/gruppomacro.app"
|
||||
SERVERPW_WEBSITE="pwdadmin@1AOK"
|
||||
PORT_SPA="8089"
|
||||
PORT_PWA="8099"
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "gruppomacro",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"productName": "Gruppo Macro",
|
||||
"description": "Il Gruppo Editoriale Macro, attivo dal 1987, è leader europeo nella pubblicazione di libri per il benessere e la consapevolezza. Con oltre 1.500 titoli, promuove una visione armonica del mondo, offrendo opere di autori internazionali e italiani come Gregg Braden, Bruce Lipton, Joe Dispenza, Louise Hay, Eckhart Tolle e molti altri. Scopri un'editoria che abbraccia il corpo, la mente, lo spirito e l'ecologia.",
|
||||
"author": "Surya",
|
||||
@@ -9,20 +9,20 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.71' quasar dev",
|
||||
"dev": "PORT=8089 APP_VERSION='1.2.72' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "APP_VERSION='1.2.71' quasar build -m spa",
|
||||
"buildspa": "APP_VERSION='1.2.72' quasar build -m spa",
|
||||
"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"",
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8089 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nuovomondo",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"description": "Nuovo Mondo",
|
||||
"productName": "Nuovo Mondo",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "APP_VERSION='1.2.71' PORT=8083 quasar dev",
|
||||
"dev": "APP_VERSION='1.2.72' PORT=8083 quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "quasar build -m spa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8083 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -11,47 +11,47 @@
|
||||
"start_url": "/?homescreen=1",
|
||||
"icons": [
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-512x512.png",
|
||||
"src": "/images/pcb-android-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-384x384.png",
|
||||
"src": "/images/pcb-android-icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-192x192.png",
|
||||
"src": "/images/pcb-android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-144x144.png",
|
||||
"src": "/images/pcb-android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-96x96.png",
|
||||
"src": "/images/pcb-android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-120x120.png",
|
||||
"src": "/images/pcb-apple-icon-120x120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-144x144.png",
|
||||
"src": "/images/pcb-apple-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-152x152.png",
|
||||
"src": "/images/pcb-apple-icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-180x180.png",
|
||||
"src": "/images/pcb-apple-icon-180x180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "nutriben",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"description": "Nutriben",
|
||||
"productName": "Nutriben",
|
||||
"author": "Surya",
|
||||
@@ -9,20 +9,20 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8093 APP_VERSION='1.2.71' quasar dev",
|
||||
"dev": "PORT=8093 APP_VERSION='1.2.72' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "APP_VERSION='1.2.71' quasar build -m spa",
|
||||
"buildspa": "APP_VERSION='1.2.72' quasar build -m spa",
|
||||
"lint": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\"",
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8099 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8093 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "piuchebuono",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"description": "PiuCheBuono",
|
||||
"productName": "PiuCheBuono",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "PORT=8085 APP_VERSION='1.2.71' quasar dev",
|
||||
"dev": "PORT=8085 APP_VERSION='1.2.72' quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "quasar build -m spa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8085 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
|
||||
@@ -11,47 +11,47 @@
|
||||
"start_url": "/?homescreen=1",
|
||||
"icons": [
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-512x512.png",
|
||||
"src": "/images/pcb-android-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-384x384.png",
|
||||
"src": "/images/pcb-android-icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-192x192.png",
|
||||
"src": "/images/pcb-android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-144x144.png",
|
||||
"src": "/images/pcb-android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-android-icon-96x96.png",
|
||||
"src": "/images/pcb-android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-120x120.png",
|
||||
"src": "/images/pcb-apple-icon-120x120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-144x144.png",
|
||||
"src": "/images/pcb-apple-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-152x152.png",
|
||||
"src": "/images/pcb-apple-icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/pcb-apple-icon-180x180.png",
|
||||
"src": "/images/pcb-apple-icon-180x180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "riso",
|
||||
"version": "1.2.71",
|
||||
"version": "1.2.72",
|
||||
"productName": "Riso 💚 - Rete Italiana Scambi Orizzontali",
|
||||
"description": "Progetto RISO (Rete Italiana Scambi Orizzontali) promuove una rete di comunità locali che favoriscono scambi di beni, servizi e ospitalità. Con l'App RISO, sviluppata per facilitare il baratto, il dono e l'uso di monete alternative come i RIS, il progetto crea legami autentici basati sulla fiducia e sostenibilità. Partecipa agli scambi e costruisci una comunità più consapevole e autosufficiente.",
|
||||
"author": "Surya",
|
||||
@@ -9,11 +9,11 @@
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "APP_VERSION='1.2.71' PORT=8084 quasar dev",
|
||||
"dev": "APP_VERSION='1.2.72' PORT=8084 quasar dev",
|
||||
"dev_noCheck": "SKIP_TSC=true quasar dev",
|
||||
"build": "quasar build",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.71' quasar build -m pwa",
|
||||
"buildpwa": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"buildpwatest": "NODE_ENV=production APP_VERSION='1.2.72' quasar build -m pwa",
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"type-check:watch": "vue-tsc --noEmit --watch",
|
||||
"buildspa": "quasar build -m spa",
|
||||
@@ -21,8 +21,8 @@
|
||||
"lintfile": "eslint --ext .js,.ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"lintfileNoJS": "eslint --ext .ts,.vue --ignore-path .gitignore ./ > file.out.txt",
|
||||
"fix": "eslint -c ./eslint.config.js \"./src*/**/*.{ts,js,cjs,mjs,vue}\" --ignore-pattern .gitignore ./ --fix > file.out.txt",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.71' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.71' quasar dev",
|
||||
"pwa": "NODE_ENV=development PORT=8094 APP_VERSION='1.2.72' quasar dev -m pwa",
|
||||
"spa": "NODE_ENV=development PORT=8084 APP_VERSION='1.2.72' quasar dev",
|
||||
"debug": "quasar dev --mode debug",
|
||||
"test": "echo \"No test specified\" && exit 0",
|
||||
"generate-sw": "workbox generateSW workbox-config.js",
|
||||
@@ -93,7 +93,8 @@
|
||||
"workbox-precaching": "^7.3.0",
|
||||
"workbox-routing": "^7.3.0",
|
||||
"workbox-strategies": "^7.3.0",
|
||||
"workbox-window": "^7.3.0"
|
||||
"workbox-window": "^7.3.0",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.28.0",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 536 KiB |
@@ -11,47 +11,47 @@
|
||||
"start_url": "/?homescreen=1",
|
||||
"icons": [
|
||||
{
|
||||
"src:": "/images/riso-android-icon-512x512.png",
|
||||
"src": "/images/riso-android-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-384x384.png",
|
||||
"src": "/images/riso-android-icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-192x192.png",
|
||||
"src": "/images/riso-android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-144x144.png",
|
||||
"src": "/images/riso-android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-96x96.png",
|
||||
"src": "/images/riso-android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-120x120.png",
|
||||
"src": "/images/riso-apple-icon-120x120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-144x144.png",
|
||||
"src": "/images/riso-apple-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-152x152.png",
|
||||
"src": "/images/riso-apple-icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-180x180.png",
|
||||
"src": "/images/riso-apple-icon-180x180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/* global workbox */
|
||||
/* global cfgenv */
|
||||
|
||||
const VITE_APP_VERSION = '1.2.71';
|
||||
const VITE_APP_VERSION = '1.2.72';
|
||||
|
||||
// Costanti di configurazione
|
||||
const DYNAMIC_CACHE = 'dynamic-cache-v2';
|
||||
@@ -308,7 +308,7 @@ if (workbox) {
|
||||
}
|
||||
|
||||
// Listener per gestire tutte le richieste
|
||||
self.addEventListener('fetch', (event) => {
|
||||
/*self.addEventListener('fetch', (event) => {
|
||||
const { request } = event;
|
||||
const url = new URL(request.url);
|
||||
try {
|
||||
@@ -336,6 +336,7 @@ if (workbox) {
|
||||
console.error('[Service Worker] Fetch error ❌:', error);
|
||||
}
|
||||
});
|
||||
*/
|
||||
|
||||
// Gestione degli errori non catturati
|
||||
self.addEventListener('unhandledrejection', (event) => {
|
||||
|
||||
@@ -11,47 +11,47 @@
|
||||
"start_url": "/?homescreen=1",
|
||||
"icons": [
|
||||
{
|
||||
"src:": "/images/riso-android-icon-512x512.png",
|
||||
"src": "/images/riso-android-icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-384x384.png",
|
||||
"src": "/images/riso-android-icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-192x192.png",
|
||||
"src": "/images/riso-android-icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-144x144.png",
|
||||
"src": "/images/riso-android-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-android-icon-96x96.png",
|
||||
"src": "/images/riso-android-icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-120x120.png",
|
||||
"src": "/images/riso-apple-icon-120x120.png",
|
||||
"sizes": "120x120",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-144x144.png",
|
||||
"src": "/images/riso-apple-icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-152x152.png",
|
||||
"src": "/images/riso-apple-icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src:": "/images/riso-apple-icon-180x180.png",
|
||||
"src": "/images/riso-apple-icon-180x180.png",
|
||||
"sizes": "180x180",
|
||||
"type": "image/png"
|
||||
}
|
||||
|
||||
147
src/App.ts
147
src/App.ts
@@ -1,18 +1,18 @@
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { BannerCookies } from '@src/components/BannerCookies'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { MyHeader } from '@src/components/MyHeader'
|
||||
import { MyFooter } from '@src/components/MyFooter'
|
||||
import { CFirstPageApp } from '@src/components/CFirstPageApp'
|
||||
import { computed, onMounted, ref, watch } from 'vue'
|
||||
import { CProvaPao } from '@src/components/CProvaPao'
|
||||
import { tools } from '@tools'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useQuasar } from 'quasar';
|
||||
import { BannerCookies } from '@src/components/BannerCookies';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { useUserStore } from '@store/UserStore';
|
||||
import { MyHeader } from '@src/components/MyHeader';
|
||||
import { MyFooter } from '@src/components/MyFooter';
|
||||
import { CFirstPageApp } from '@src/components/CFirstPageApp';
|
||||
import { computed, onMounted, ref, watch } from 'vue';
|
||||
import { CProvaPao } from '@src/components/CProvaPao';
|
||||
import { tools } from '@tools';
|
||||
import { toolsext } from '@store/Modules/toolsext';
|
||||
|
||||
import { Vue } from 'vue-class-component'
|
||||
import { Vue } from 'vue-class-component';
|
||||
|
||||
import 'animate.css';
|
||||
|
||||
@@ -22,152 +22,145 @@ export default {
|
||||
MyFooter,
|
||||
CFirstPageApp,
|
||||
CProvaPao,
|
||||
BannerCookies, /* , CPreloadImages */
|
||||
BannerCookies /* , CPreloadImages */,
|
||||
},
|
||||
setup() {
|
||||
const route = useRoute()
|
||||
const route = useRoute();
|
||||
|
||||
const backgroundColor = 'whitesmoke'
|
||||
const $q = useQuasar()
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
const $route = useRoute()
|
||||
const globalStore = useGlobalStore()
|
||||
const backgroundColor = 'whitesmoke';
|
||||
const $q = useQuasar();
|
||||
const userStore = useUserStore();
|
||||
const $router = useRouter();
|
||||
const $route = useRoute();
|
||||
const globalStore = useGlobalStore();
|
||||
const { t } = useI18n();
|
||||
|
||||
const finishLoading = computed(() => globalStore.finishLoading)
|
||||
const finishLoading = computed(() => globalStore.finishLoading);
|
||||
|
||||
const site = computed(() => globalStore.site)
|
||||
const site = computed(() => globalStore.site);
|
||||
|
||||
const darkcookie = ref(false)
|
||||
|
||||
watch(() => finishLoading.value, (newval: boolean, oldval: boolean) => {
|
||||
// console.log('watch finished', newval)
|
||||
if (newval) {
|
||||
tools.updateFonts()
|
||||
const darkcookie = ref(false);
|
||||
|
||||
watch(
|
||||
() => finishLoading.value,
|
||||
(newval: boolean, oldval: boolean) => {
|
||||
// console.log('watch finished', newval)
|
||||
if (newval) {
|
||||
tools.updateFonts();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
})
|
||||
|
||||
|
||||
const listaRoutingNoLogin = ['/vreg?', '/offline']
|
||||
const listaRoutingNoLogin = ['/vreg?', '/offline'];
|
||||
|
||||
function meta() {
|
||||
return {
|
||||
title: t('msg.myAppName'),
|
||||
keywords: [{ name: 'keywords', content: 'associazione shen, centro olistico lugo' },
|
||||
{ name: 'description', content: t('msg.myAppDescription') }],
|
||||
keywords: [
|
||||
{ name: 'keywords', content: 'associazione shen, centro olistico lugo' },
|
||||
{ name: 'description', content: t('msg.myAppDescription') },
|
||||
],
|
||||
// equiv: { 'http-equiv': 'Content-Type', 'content': 'text/html; charset=UTF-8' }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
function isScrolledIntoView(el: any) {
|
||||
const rect = el.getBoundingClientRect()
|
||||
const elemTop = rect.top
|
||||
const elemBottom = rect.bottom
|
||||
const rect = el.getBoundingClientRect();
|
||||
const elemTop = rect.top;
|
||||
const elemBottom = rect.bottom;
|
||||
|
||||
const isVisible = elemTop < window.innerHeight && elemBottom >= 0
|
||||
return isVisible
|
||||
const isVisible = elemTop < window.innerHeight && elemBottom >= 0;
|
||||
return isVisible;
|
||||
}
|
||||
|
||||
function scroll() {
|
||||
try {
|
||||
window.onscroll = () => {
|
||||
const scrolledTo = document.querySelector('.replace-with-your-element')
|
||||
const scrolledTo = document.querySelector('.replace-with-your-element');
|
||||
|
||||
if (scrolledTo && isScrolledIntoView(scrolledTo)) {
|
||||
// console.log('scrolled')
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
};
|
||||
} catch (e) {}
|
||||
}
|
||||
|
||||
async function mounted() {
|
||||
await crea();
|
||||
|
||||
function mounted() {
|
||||
console.log('app mounted')
|
||||
darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1'
|
||||
darkcookie.value = tools.getCookie('darkmode', false, false, false) === '-1';
|
||||
|
||||
globalStore.homescreen = $route.query.homescreen ? $route.query.homescreen : ''
|
||||
globalStore.homescreen = $route.query.homescreen ? $route.query.homescreen : '';
|
||||
|
||||
scroll()
|
||||
scroll();
|
||||
}
|
||||
|
||||
|
||||
|
||||
async function crea() {
|
||||
// console.log('crea')
|
||||
tools.initprompt()
|
||||
tools.initprompt();
|
||||
|
||||
tools.checkApp()
|
||||
tools.checkApp();
|
||||
|
||||
try {
|
||||
if (import.meta.env.DEV) {
|
||||
console.info('SESSIONE IN SVILUPPO ! (DEV)')
|
||||
console.info('SESSIONE IN SVILUPPO ! (DEV)');
|
||||
// console.info(process.env)
|
||||
}
|
||||
if (tools.isLocale()) {
|
||||
console.info('SESSIONE IN LOCALE !')
|
||||
console.info('SESSIONE IN LOCALE !');
|
||||
}
|
||||
|
||||
if (tools.isTest() && !import.meta.env.DEV) {
|
||||
console.info('SESSIONE IN TEST ! (TEST)')
|
||||
console.info('SESSIONE IN TEST ! (TEST)');
|
||||
} else {
|
||||
if (import.meta.env.PROD) {
|
||||
console.info('SESSIONE IN PRODUZIONE!')
|
||||
console.info('SESSIONE IN PRODUZIONE!');
|
||||
// console.info(process.env)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Make autologin only if some routing
|
||||
|
||||
// console.log('window.location.href', window.location.href)
|
||||
|
||||
let chiamaautologin = true
|
||||
let chiamaautologin = true;
|
||||
listaRoutingNoLogin.forEach((mystr) => {
|
||||
if (window.location.href.includes(mystr)) {
|
||||
chiamaautologin = false
|
||||
chiamaautologin = false;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
if (chiamaautologin) {
|
||||
// console.log('CHIAMA autologin_FromLocalStorage')
|
||||
const ris = await userStore.autologin_FromLocalStorage($router, $q)
|
||||
const ris = await userStore.autologin_FromLocalStorage($router, $q);
|
||||
if (ris?.code === toolsext.ERR_RETRY_LOGIN) {
|
||||
setTimeout(() => {
|
||||
$router.replace('/signin');
|
||||
}, 100);
|
||||
}
|
||||
} else {
|
||||
globalStore.finishLoading = true
|
||||
globalStore.finishLoading = true;
|
||||
}
|
||||
|
||||
tools.updateFonts()
|
||||
|
||||
tools.updateFonts();
|
||||
} catch (e) {
|
||||
globalStore.finishLoading = true
|
||||
console.error('err APP', e)
|
||||
globalStore.finishLoading = true;
|
||||
console.error('err APP', e);
|
||||
}
|
||||
|
||||
if (globalStore.finishLoading) {
|
||||
console.log('Finish Loading')
|
||||
console.log('Finish Loading');
|
||||
}
|
||||
|
||||
// Calling the Server for updates ?
|
||||
// Check the verified_email
|
||||
}
|
||||
|
||||
crea()
|
||||
|
||||
onMounted(mounted)
|
||||
|
||||
onMounted(mounted);
|
||||
|
||||
return {
|
||||
finishLoading,
|
||||
darkcookie,
|
||||
}
|
||||
};
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
@@ -10,9 +10,6 @@
|
||||
<app-header></app-header>
|
||||
<q-ajax-bar></q-ajax-bar>
|
||||
|
||||
<!--<CPreloadImages :arrimg="static_data.preLoadImages">
|
||||
</CPreloadImages>-->
|
||||
|
||||
<q-page-container
|
||||
id="mypage"
|
||||
:class="darkcookie && !finishLoading ? `bg-black` : ``"
|
||||
|
||||
@@ -18,6 +18,41 @@ export default ({ router }) => {
|
||||
referrer: document?.referrer || '',
|
||||
};
|
||||
|
||||
const ignoredPaths = [
|
||||
'/users',
|
||||
'/subscribe',
|
||||
'/checkupdates',
|
||||
'/pickup',
|
||||
'gettable',
|
||||
'settable',
|
||||
'getobj',
|
||||
'setobj',
|
||||
'/chval',
|
||||
'/api',
|
||||
'/dashboard',
|
||||
'/delrec',
|
||||
'/delfile',
|
||||
'/duprec',
|
||||
'/site/',
|
||||
'/city/',
|
||||
'/admin/',
|
||||
'/apisql',
|
||||
'/sendnotif',
|
||||
'/cart',
|
||||
'/products',
|
||||
'/orders',
|
||||
'/update',
|
||||
'/request',
|
||||
'/reactions',
|
||||
'/loadsite',
|
||||
'/signin',
|
||||
'/signup',
|
||||
'/registrati',
|
||||
];
|
||||
if (ignoredPaths.includes(to.path)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Invia il tracciamento al backend
|
||||
Api.SendReq('/api/track-pageview', 'POST', mydata).catch((err) => {
|
||||
console.error('Errore nel tracking:', err);
|
||||
|
||||
@@ -2416,6 +2416,7 @@ export const shared_consts = {
|
||||
max_partecip: 1,
|
||||
contribstr: 1,
|
||||
link_maplocation: 1,
|
||||
link_conference: 1,
|
||||
groupname: 1,
|
||||
//**ADDFIELD_MYBACHECAS
|
||||
};
|
||||
|
||||
@@ -263,7 +263,6 @@ export default defineComponent({
|
||||
return {
|
||||
t,
|
||||
querySel,
|
||||
$q,
|
||||
globalStore,
|
||||
inputPrompt,
|
||||
result,
|
||||
|
||||
@@ -1,69 +1,67 @@
|
||||
import { defineComponent, ref, computed, PropType, toRef, onMounted } from 'vue'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { tools } from '@tools'
|
||||
import { costanti, IMainCard } from '@store/Modules/costanti'
|
||||
import { CBigBtn } from '@src/components/CBigBtn'
|
||||
|
||||
import { defineComponent, ref, computed, onMounted } from 'vue';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { tools } from '@tools';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CCheckAppRunning',
|
||||
components: { CBigBtn },
|
||||
props: {},
|
||||
setup(props, { emit }) {
|
||||
setup() {
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
const isAppRunning = computed(() => globalStore.isAppRunning === true);
|
||||
const finishLoading = computed(() => globalStore.finishLoading === true);
|
||||
const deferredPrompt = computed(() => globalStore.deferredPrompt);
|
||||
const homescreen = computed(() => globalStore.homescreen === true);
|
||||
|
||||
const isAppRunning = computed(() => globalStore.isAppRunning)
|
||||
const viewiOS = ref(false);
|
||||
const viewAndroid = ref(false);
|
||||
const showNotice = ref(false);
|
||||
const showOther = ref(false);
|
||||
|
||||
const finishLoading = computed(() => globalStore.finishLoading)
|
||||
// === Rilevamento WebView ===
|
||||
const currentUrl = window.location.href;
|
||||
|
||||
const deferredPrompt = computed(() => globalStore.deferredPrompt)
|
||||
const homescreen = computed(() => globalStore.homescreen)
|
||||
const webViewDetectors = [
|
||||
{ name: 'Telegram', test: /Telegram/ },
|
||||
{ name: 'WhatsApp', test: /WhatsApp/ },
|
||||
{ name: 'Facebook', test: /FBAV|FBAN/ },
|
||||
{ name: 'Instagram', test: /Instagram/ },
|
||||
{ name: 'Messenger', test: /Messenger/ },
|
||||
];
|
||||
|
||||
const matchedWebView = webViewDetectors.find(({ test }) => test.test(navigator.userAgent));
|
||||
const isInRestrictedWebView = !!matchedWebView;
|
||||
const webViewName = matchedWebView ? matchedWebView.name : 'un’app';
|
||||
|
||||
const viewiOS = ref(false)
|
||||
const viewAndroid = ref(false)
|
||||
|
||||
// === Installazione ===
|
||||
function installApp() {
|
||||
if (globalStore.deferredPrompt) {
|
||||
globalStore.deferredPrompt.prompt()
|
||||
|
||||
// Wait for the user to respond to the prompt
|
||||
globalStore.deferredPrompt.prompt();
|
||||
globalStore.deferredPrompt.userChoice.then((choiceResult: any) => {
|
||||
if (choiceResult.outcome === 'accepted') {
|
||||
globalStore.deferredPrompt = null;
|
||||
// console.log('User accepted the A2HS prompt');
|
||||
} else {
|
||||
// console.log('User dismissed the A2HS prompt');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function mounted() {
|
||||
tools.checkApp()
|
||||
}
|
||||
|
||||
onMounted(mounted)
|
||||
onMounted(() => {
|
||||
tools.checkApp();
|
||||
});
|
||||
|
||||
return {
|
||||
userStore,
|
||||
tools,
|
||||
costanti,
|
||||
finishLoading,
|
||||
installApp,
|
||||
isAppRunning,
|
||||
deferredPrompt,
|
||||
homescreen,
|
||||
viewiOS,
|
||||
viewAndroid,
|
||||
homescreen,
|
||||
}
|
||||
}
|
||||
})
|
||||
installApp,
|
||||
isInRestrictedWebView,
|
||||
webViewName,
|
||||
currentUrl,
|
||||
showNotice,
|
||||
showOther,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -1,71 +1,193 @@
|
||||
<template>
|
||||
<div v-if="false && tools.isDebugOn()" class="bg-red text-white">
|
||||
<span> isAppRunning: {{ isAppRunning }} - </span>
|
||||
<span> deferredPrompt: {{ deferredPrompt }} - </span>
|
||||
<span> homescreen: {{ homescreen }} </span>
|
||||
<div
|
||||
v-if="tools.isDebugOn()"
|
||||
class="bg-red text-white q-pa-xs"
|
||||
>
|
||||
isAppRunning: {{ isAppRunning }} • deferredPrompt: {{ !!deferredPrompt }} •
|
||||
homescreen: {{ homescreen }} isInRestrictedWebView:
|
||||
{{ isInRestrictedWebView }} isInTelegramWebView: {{ tools.isInTelegramWebView() }}
|
||||
</div>
|
||||
<div v-if="finishLoading" class="row justify-center">
|
||||
<div v-if="!isAppRunning">
|
||||
<!-- App not running -->
|
||||
|
||||
<q-btn v-if="deferredPrompt" glossy size="xl" label="Installa App" @click="installApp" icon="fas fa-mobile-alt"
|
||||
color="green" text-color="white"></q-btn>
|
||||
<div v-else>
|
||||
<div v-if="$q.platform.is.ios && $q.platform.is.safari && !tools.isDevelop()">
|
||||
<q-btn glossy size="xl" label="Installa App" @click="viewiOS = !viewiOS" icon="fab fa-apple" color="green"
|
||||
text-color="white"></q-btn>
|
||||
<div
|
||||
v-if="finishLoading"
|
||||
class="row justify-center q-gutter-md"
|
||||
>
|
||||
<!-- 🚫 Se sei in un WebView non compatibile (es. Telegram) -->
|
||||
|
||||
<q-slide-transition>
|
||||
<!-- Mostra spiegazione per iOS -->
|
||||
<div v-if="viewiOS">
|
||||
<q-img src="/images/install_app_on_ios_1.png" fit="contain" style="min-width: 350px"
|
||||
class="q-my-sm"></q-img><br />
|
||||
|
||||
<q-img src="/images/install_app_on_ios_1b.jpg" class="q-mb-md"></q-img><br />
|
||||
|
||||
<q-img src="/images/install_app_on_ios_2.jpg" fit="contain"></q-img>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
<div
|
||||
v-if="isInRestrictedWebView"
|
||||
class="text-center q-pa-md"
|
||||
>
|
||||
<q-btn
|
||||
v-if="!showNotice"
|
||||
v-model="showNotice"
|
||||
glossy
|
||||
size="xl"
|
||||
label="Installa App"
|
||||
@click="showNotice = true"
|
||||
icon="fas fa-mobile-alt"
|
||||
color="green"
|
||||
text-color="white"
|
||||
/>
|
||||
<div
|
||||
v-if="showNotice"
|
||||
style="border: 2px solid #dedede"
|
||||
class="shadow-1 q-ma-md"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-exclamation-triangle"
|
||||
color="warning"
|
||||
size="xl"
|
||||
/>
|
||||
<div v-if="tools.isInTelegramWebView()">
|
||||
<p class="text-body1 q-mt-md">
|
||||
Stai usando il browser interno di {{ webViewName }}.<br />
|
||||
Per installare l’app Clicca sui <strong>tre puntini "⋮"</strong> in alto e
|
||||
scegli <em>“Apri con...”</em>
|
||||
</p>
|
||||
</div>
|
||||
<div v-if="$q.platform.is.android">
|
||||
<q-btn v-if="!tools.isDevelop()" glossy size="lg" label="Installa App" @click="viewAndroid = !viewAndroid"
|
||||
icon="fab fa-android" color="green" text-color="white"></q-btn>
|
||||
|
||||
<q-slide-transition>
|
||||
<!-- Mostra spiegazione per Android -->
|
||||
<div v-if="viewAndroid">
|
||||
<div class="q-ma-sm text-h6"> 1) Cliccare sui 3 puntini verticali<br>
|
||||
2) Cliccare sulla voce 'Installa App' o 'Schermata Home'<br>
|
||||
3) Andare sulla schermata HOME e cliccare sull'icona di RISO.
|
||||
</div>
|
||||
<q-img src="/images/install_app_on_android_1.jpg" fit="contain" style="min-width: 350px"
|
||||
class="q-my-sm"></q-img><br />
|
||||
<q-img src="/images/install_app_on_android_2.jpg" fit="contain" style="min-width: 350px"
|
||||
class="q-my-sm"></q-img><br />
|
||||
><br />
|
||||
<q-img src="/images/install_app_on_android_3.jpg" fit="contain" style="min-width: 350px"
|
||||
class="q-my-sm"></q-img><br />
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
<div v-else>
|
||||
<p class="text-body1 q-mt-md">
|
||||
Stai usando il browser interno di {{ webViewName }}.<br />
|
||||
<strong>Per installare l’app, apri questo link nel browser esterno.</strong>
|
||||
</p>
|
||||
<q-btn
|
||||
:href="currentUrl"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
label="Apri nel browser"
|
||||
color="primary"
|
||||
glossy
|
||||
icon="fas fa-external-link-alt"
|
||||
class="q-mt-sm"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ✅ Se sei nel browser esterno, ma non in modalità app -->
|
||||
<div
|
||||
v-else-if="!isAppRunning"
|
||||
class="text-center"
|
||||
>
|
||||
<q-btn
|
||||
v-if="deferredPrompt"
|
||||
glossy
|
||||
size="xl"
|
||||
label="Installa App"
|
||||
@click="installApp"
|
||||
icon="fas fa-mobile-alt"
|
||||
color="green"
|
||||
text-color="white"
|
||||
/>
|
||||
<div v-else>
|
||||
<!-- iOS -->
|
||||
<div
|
||||
v-if="$q.platform.is.ios && $q.platform.is.safari"
|
||||
style="border: 2px solid #dedede"
|
||||
class="shadow-1 q-ma-md"
|
||||
>
|
||||
<q-btn
|
||||
glossy
|
||||
size="xl"
|
||||
label="Installa App"
|
||||
@click="viewiOS = !viewiOS"
|
||||
icon="fab fa-apple"
|
||||
color="green"
|
||||
text-color="white"
|
||||
/>
|
||||
<q-slide-transition>
|
||||
<div
|
||||
v-if="viewiOS"
|
||||
class="q-mt-md"
|
||||
>
|
||||
<q-img
|
||||
src="/images/install_app_on_ios_1.png"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
/>
|
||||
<q-img
|
||||
src="/images/install_app_on_ios_1b.jpg"
|
||||
class="q-mb-md"
|
||||
/>
|
||||
<q-img
|
||||
src="/images/install_app_on_ios_2.jpg"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
|
||||
<!-- Android -->
|
||||
<div v-else-if="$q.platform.is.android">
|
||||
<q-btn
|
||||
glossy
|
||||
size="lg"
|
||||
label="Installa App"
|
||||
@click="viewAndroid = !viewAndroid"
|
||||
icon="fab fa-android"
|
||||
color="green"
|
||||
text-color="white"
|
||||
/>
|
||||
<q-slide-transition>
|
||||
<div
|
||||
v-if="viewAndroid"
|
||||
class="q-mt-md"
|
||||
>
|
||||
<div class="q-ma-sm text-body1">
|
||||
1) Clicca sui <strong>tre puntini ⋮</strong><br />
|
||||
2) Scegli <strong>“Installa app”</strong> o
|
||||
<strong>“Aggiungi alla home”</strong><br />
|
||||
3) Apri l’app dalla schermata Home.
|
||||
</div>
|
||||
<q-img
|
||||
src="/images/install_app_on_android_1.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
/>
|
||||
<q-img
|
||||
src="/images/install_app_on_android_2.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
/>
|
||||
<q-img
|
||||
src="/images/install_app_on_android_3.jpg"
|
||||
fit="contain"
|
||||
style="min-width: 350px"
|
||||
class="q-my-sm"
|
||||
/>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
</div>
|
||||
|
||||
<!-- Altri browser (fallback) -->
|
||||
<div v-else>
|
||||
<q-btn
|
||||
glossy
|
||||
size="lg"
|
||||
label="Installa App"
|
||||
@click="showOther = true"
|
||||
icon="fas fa-mobile-alt"
|
||||
color="green"
|
||||
text-color="white"
|
||||
/>
|
||||
|
||||
<div v-if="showOther">
|
||||
<p class="text-body1">
|
||||
Apri questa pagina in <strong>Brave</strong> o <strong>Chrome</strong> per
|
||||
installare l’app.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row justify-center">
|
||||
<CBigBtn
|
||||
label="Info" to="" @click="showInfo = true" icon="fas fa-info" color="primary"
|
||||
:numcol="3"
|
||||
>
|
||||
</CBigBtn>
|
||||
</div>
|
||||
<div v-if="showInfo">
|
||||
|
||||
</div>-->
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CCheckAppRunning.ts">
|
||||
</script>
|
||||
<script lang="ts" src="./CCheckAppRunning.ts"></script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CCheckAppRunning.scss';
|
||||
|
||||
@@ -25,6 +25,8 @@ export default defineComponent({
|
||||
const globalStore = useGlobalStore()
|
||||
const { t } = useI18n()
|
||||
|
||||
const isLogged = computed(() => userStore.isLogged)
|
||||
|
||||
const site = ref(globalStore.site)
|
||||
|
||||
return {
|
||||
@@ -33,6 +35,7 @@ export default defineComponent({
|
||||
costanti,
|
||||
static_data,
|
||||
site,
|
||||
isLogged,
|
||||
t,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div v-if="showalways || (!showalways && !tools.isLogged())">
|
||||
<div v-if="showalways || (!showalways && !isLogged)">
|
||||
<div class="q-pa-md q-gutter-sm">
|
||||
<div class=" text-center">
|
||||
<transition-group
|
||||
<transition
|
||||
name="fade"
|
||||
mode="out-in"
|
||||
appear
|
||||
@@ -36,7 +36,7 @@
|
||||
<!--<CRegistration />-->
|
||||
</template>
|
||||
</q-banner>
|
||||
</transition-group>
|
||||
</transition>
|
||||
<q-separator inset />
|
||||
<br>
|
||||
<q-banner
|
||||
|
||||
@@ -22,8 +22,8 @@ export default defineComponent({
|
||||
'clear-end',
|
||||
],
|
||||
props: {
|
||||
startValue: { type: [String, null] as unknown as () => string | null, default: null },
|
||||
endValue: { type: [String, null] as unknown as () => string | null, default: null },
|
||||
startValue: { type: [String, Date, null] as unknown as () => string | null, default: null },
|
||||
endValue: { type: [String, Date, null] as unknown as () => string | null, default: null },
|
||||
|
||||
startLabel: { type: String, default: 'Inizio' },
|
||||
endLabel: { type: String, default: 'Fine' },
|
||||
|
||||
@@ -2479,22 +2479,53 @@ export default defineComponent({
|
||||
let msg = '';
|
||||
|
||||
for (col of mycolumns.value) {
|
||||
if (!msg) {
|
||||
if (col.showonlyif_dipersona) {
|
||||
const valori = myrec['idStatusSkill'];
|
||||
let check =
|
||||
col.showifIsStatusDiPersona !== undefined ||
|
||||
col.showifIsStatusOnLine !== undefined;
|
||||
if (check) {
|
||||
let show = false;
|
||||
const valori = myrec['idStatusSkill'];
|
||||
|
||||
if (
|
||||
valori &&
|
||||
valori.length === 1 &&
|
||||
valori.includes(shared_consts.STATUSSKILL_ONLINE)
|
||||
) {
|
||||
col.required = false;
|
||||
} else {
|
||||
col.required = true;
|
||||
}
|
||||
show =
|
||||
(valori &&
|
||||
valori.includes(shared_consts.STATUSSKILL_ONLINE) &&
|
||||
col.showifIsStatusOnLine) ||
|
||||
(valori.includes(shared_consts.STATUSSKILL_DI_PERSONA) &&
|
||||
col.showifIsStatusDiPersona);
|
||||
|
||||
col.visible = col.required;
|
||||
col.visible = show;
|
||||
}
|
||||
let checkrequired =
|
||||
col.requiredifIsStatusDiPersona || col.requiredifIsStatusOnLine;
|
||||
if (checkrequired) {
|
||||
let required = false;
|
||||
const valori = myrec['idStatusSkill'];
|
||||
|
||||
required =
|
||||
(valori &&
|
||||
valori.includes(shared_consts.STATUSSKILL_ONLINE) &&
|
||||
col.requiredifIsStatusOnLine) ||
|
||||
(valori.includes(shared_consts.STATUSSKILL_DI_PERSONA) &&
|
||||
col.requiredifIsStatusDiPersona);
|
||||
|
||||
col.required = required;
|
||||
}
|
||||
if (col.showonlyif_dipersona) {
|
||||
const valori = myrec['idStatusSkill'];
|
||||
|
||||
if (
|
||||
valori &&
|
||||
valori.length === 1 &&
|
||||
valori.includes(shared_consts.STATUSSKILL_ONLINE)
|
||||
) {
|
||||
col.required = false;
|
||||
} else {
|
||||
col.required = true;
|
||||
}
|
||||
|
||||
col.visible = col.required;
|
||||
}
|
||||
if (!msg) {
|
||||
if (col.required) {
|
||||
// console.log('newRecord.value', newRecord.value, newRecord.value[col.name])
|
||||
if (tools.isArray(myrec[col.name])) {
|
||||
|
||||
@@ -1556,7 +1556,7 @@
|
||||
col.foredit
|
||||
"
|
||||
>
|
||||
<div class="">
|
||||
<div class="q-mb-sm">
|
||||
<CMyPopupEdit
|
||||
:table="mytable"
|
||||
:canEdit="true"
|
||||
|
||||
@@ -212,7 +212,6 @@ export default defineComponent({
|
||||
return {
|
||||
tools,
|
||||
getoffset,
|
||||
q,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -197,6 +197,10 @@ export default defineComponent({
|
||||
|
||||
const isAppRunning = computed(() => globalStore.isAppRunning);
|
||||
|
||||
const cardGroupMaxWidth = computed(() => {
|
||||
return tools.getwidth($q) + ' px';
|
||||
});
|
||||
|
||||
const currentCardsPerSlide = computed(() => {
|
||||
return myel.value.num2 ? myel.value.num2 : 2; // cardsPerSlide
|
||||
});
|
||||
@@ -229,6 +233,7 @@ export default defineComponent({
|
||||
const speedSafe = computed(() => (myel.value as any).speed ?? 0);
|
||||
|
||||
const carouselRef = ref(<any>null);
|
||||
const cardScroller = ref(<any>null);
|
||||
const isAtStart = ref(true);
|
||||
const isAtEnd = ref(false);
|
||||
const activeIndex = ref(0);
|
||||
@@ -379,6 +384,16 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
|
||||
function scrollCards(delta: number) {
|
||||
const scroller = cardScroller.value?.[0] || cardScroller.value;
|
||||
if (scroller) {
|
||||
scroller.scrollBy({
|
||||
left: delta,
|
||||
behavior: 'smooth',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(mounted);
|
||||
|
||||
return {
|
||||
@@ -426,6 +441,9 @@ export default defineComponent({
|
||||
naviga,
|
||||
speedSafe,
|
||||
t,
|
||||
cardGroupMaxWidth,
|
||||
cardScroller,
|
||||
scrollCards,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
:color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="keyboard_arrow_left"
|
||||
@click="$refs.carousel.previous()"
|
||||
@click="scrollCards(-300)"
|
||||
></q-btn>
|
||||
</q-carousel-control>
|
||||
<q-carousel-control
|
||||
@@ -96,7 +96,7 @@
|
||||
:color="$q.dark.isActive ? `black` : `white`"
|
||||
:text-color="$q.dark.isActive ? `white` : `black`"
|
||||
icon="keyboard_arrow_right"
|
||||
@click="$refs.carousel.next()"
|
||||
@click="scrollCards(300)"
|
||||
></q-btn>
|
||||
</q-carousel-control>
|
||||
</template>
|
||||
@@ -106,59 +106,68 @@
|
||||
:key="groupIndex"
|
||||
:name="groupIndex"
|
||||
>
|
||||
<div class="row no-wrap justify-start items-center q-px-sm">
|
||||
<template
|
||||
v-for="(rec, cardIndex) in group"
|
||||
:key="cardIndex"
|
||||
>
|
||||
<div :class="cardColumnClass">
|
||||
<q-card
|
||||
:class="
|
||||
`flex-card bordered ` +
|
||||
myel.class3 +
|
||||
(rec.link ? ' titolo_card' : '')
|
||||
"
|
||||
:style="
|
||||
rec.style +
|
||||
`; height: ${myel.heightimg || `300px`} !important; width: ${
|
||||
myel.widthimg || `300px`
|
||||
} !important;`
|
||||
"
|
||||
@click="rec.link ? tools.openUrl(rec.link) : undefined"
|
||||
<!-- Contenitore scrollabile orizzontalmente -->
|
||||
<div
|
||||
ref="cardScroller"
|
||||
class="card-group-scrollable"
|
||||
:style="{ 'max-height': myel.heightcarousel, 'max-width': ($q.screen.width - 45) + 'px' }"
|
||||
>
|
||||
<div class="row no-wrap items-center">
|
||||
<template
|
||||
v-for="(rec, cardIndex) in group"
|
||||
:key="cardIndex"
|
||||
>
|
||||
<div
|
||||
:class="cardColumnClass"
|
||||
class="flex flex-center"
|
||||
>
|
||||
<div
|
||||
class="img-container"
|
||||
:style="`height: ${
|
||||
parseInt(myel?.heightimg?.replace('px', '')) * 0.7
|
||||
}px; overflow: hidden;`"
|
||||
<q-card
|
||||
:class="
|
||||
`flex-card bordered ` +
|
||||
myel.class3 +
|
||||
(rec.link ? ' titolo_card' : '')
|
||||
"
|
||||
:style="`
|
||||
${rec.style};
|
||||
height: ${myel.heightimg || '300px'};
|
||||
width: ${myel.widthimg || '300px'};
|
||||
flex: 0 0 auto;
|
||||
`"
|
||||
@click="rec.link ? tools.openUrl(rec.link) : undefined"
|
||||
>
|
||||
<q-img
|
||||
:class="tools.getClassAnim(myel.anim2) + ` ` + myel.class4"
|
||||
:src="tools.getImgFileByElem(myel, rec, path)"
|
||||
/>
|
||||
</div>
|
||||
<q-card-section class="q-card-section-small">
|
||||
<div
|
||||
:class="rec.size"
|
||||
:style="`color: ` + rec.color"
|
||||
class="img-container"
|
||||
:style="`height: ${parseInt(myel?.heightimg?.replace('px', '')) * 0.7}px; overflow: hidden;`"
|
||||
>
|
||||
{{ tools.getText(rec.alt) }}
|
||||
<q-img
|
||||
:class="tools.getClassAnim(myel.anim2) + ' ' + myel.class4"
|
||||
:src="tools.getImgFileByElem(myel, rec, path)"
|
||||
fit="contain"
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
:class="`q-mt-xs q-mb-xs ` + tools.getClassAnim(myel.anim)"
|
||||
v-html="rec.content"
|
||||
></div>
|
||||
<div
|
||||
v-if="rec.description"
|
||||
class="text-caption"
|
||||
:style="`color: ` + rec.colorsub"
|
||||
>
|
||||
{{ rec.description }}
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
<q-card-section class="q-card-section-small">
|
||||
<div
|
||||
:class="rec.size"
|
||||
:style="`color: ${rec.color}`"
|
||||
>
|
||||
{{ tools.getText(rec.alt) }}
|
||||
</div>
|
||||
<div
|
||||
:class="`q-mt-xs q-mb-xs ` + tools.getClassAnim(myel.anim)"
|
||||
v-html="rec.content"
|
||||
></div>
|
||||
<div
|
||||
v-if="rec.description"
|
||||
class="text-caption"
|
||||
:style="`color: ${rec.colorsub}`"
|
||||
>
|
||||
{{ rec.description }}
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</q-carousel-slide>
|
||||
</q-carousel>
|
||||
@@ -1160,10 +1169,7 @@
|
||||
:features="myel.features"
|
||||
:isDark="myel.parambool2"
|
||||
>
|
||||
|
||||
|
||||
</FeaturesSection>
|
||||
|
||||
</div>
|
||||
|
||||
<div v-if="editOn">
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<!-- Contenuto pagina -->
|
||||
<div
|
||||
:class="[{ 'q-gutter-xs': !hideHeader }, 'q-mx-auto', 'q-px-sm', 'q-pb-lg']"
|
||||
:class="[{ 'q-gutter-xs': !hideHeader }, 'q-mx-auto', 'q-pb-lg']"
|
||||
:style="containerStyle"
|
||||
>
|
||||
<!-- Media/Content blocks (1..3) -->
|
||||
|
||||
@@ -50,6 +50,7 @@
|
||||
<q-input
|
||||
v-bind="$attrs"
|
||||
v-model="myvalue"
|
||||
filled
|
||||
:maxlength="col.maxlength ? col.maxlength : undefined"
|
||||
:style="$q.screen.lt.sm ? 'min-width: 300px' : ''"
|
||||
:disable="disable"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
}}</span></q-chip
|
||||
>
|
||||
|
||||
<span v-if="circuit.link_group" :class="` `">
|
||||
<!--<span v-if="circuit.link_group" :class="` `">
|
||||
<q-btn
|
||||
icon="fab fa-telegram"
|
||||
size="xs"
|
||||
@@ -45,7 +45,7 @@
|
||||
rounded
|
||||
@click.stop.prevent="tools.openUrl(circuit.link_group)"
|
||||
></q-btn>
|
||||
</span>
|
||||
</span>-->
|
||||
</q-item-section>
|
||||
|
||||
<q-item-section @click="cmdExt(costanti.CMD_OPEN_PAGE, null, circuit)">
|
||||
|
||||
@@ -153,7 +153,6 @@ export default defineComponent({
|
||||
showsendCoinTo,
|
||||
showsendCoin,
|
||||
clickToUser,
|
||||
$q,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -66,7 +66,6 @@ export default defineComponent({
|
||||
onMounted(mounted)
|
||||
|
||||
return {
|
||||
q,
|
||||
t,
|
||||
getImgByNotif,
|
||||
getNotifText,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
:color_border="saldo > 0 ? `green` : `red`"
|
||||
:color="color"
|
||||
v-model="saldo"
|
||||
:label="t('account.saldo')"
|
||||
:label="$q.screen.lt.sm ? '' : t('account.saldo')"
|
||||
:paramTypeAccount="paramTypeAccount"
|
||||
:myrecparam="account"
|
||||
:valueextra="
|
||||
@@ -30,7 +30,7 @@
|
||||
: (valueextra ? valueextra : '')
|
||||
"
|
||||
:label="
|
||||
`(` + t('account.dispon') + `: ` + qtarem + ` ` + symbol + `)`
|
||||
`(${ $q.screen.lt.sm ? t('account.dispon_small') : t('account.dispon') }: ${ qtarem } ${ symbol })`
|
||||
"
|
||||
:paramTypeAccount="paramTypeAccount"
|
||||
:myrecparam="account"
|
||||
|
||||
@@ -29,7 +29,6 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
tools,
|
||||
q,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -157,7 +157,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
async function load() {
|
||||
// console.log('load')
|
||||
console.log('load CStatusReg')
|
||||
myloadingload.value = true
|
||||
datastat.value = await globalStore.getStatSite()
|
||||
|
||||
@@ -210,7 +210,7 @@ export default defineComponent({
|
||||
$router.push(link)
|
||||
}
|
||||
|
||||
created()
|
||||
onMounted(created)
|
||||
|
||||
onBeforeUnmount(beforeDestroy)
|
||||
|
||||
|
||||
@@ -11,19 +11,19 @@
|
||||
<CElemStat v-if="true" myclass="fixed-size" :title="$t('statusreg.online_today')" icon="fas fa-wifi"
|
||||
:mytextval="tools.numtostr(datastat.online_today)" classColor="text-orange" colBack="yellow">
|
||||
</CElemStat>
|
||||
<CElemStat myclass="fixed-size" v-f="datastat.num_annunci > 0" :title="$t('statusreg.num_annunci')"
|
||||
<CElemStat myclass="fixed-size" v-if="datastat.num_annunci > 0" :title="$t('statusreg.num_annunci')"
|
||||
icon="fas fa-tshirt" :value_today="0" :mytextval="tools.numtostr(datastat.num_annunci)"
|
||||
classColor="text-green" colBack="orange">
|
||||
</CElemStat>
|
||||
<CElemStat myclass="fixed-size" v-f="datastat.num_circuiti_attivi > 0"
|
||||
<CElemStat myclass="fixed-size" v-if="datastat.num_circuiti_attivi > 0"
|
||||
:title="$t('statusreg.num_circuiti_attivi')" icon="fas fa-map-marker-alt" :value_today="0" :mytextval="datastat.num_circuiti_attivi + ' su ' + datastat.num_circuiti
|
||||
" classColor="text-blue" colBack="red">
|
||||
</CElemStat>
|
||||
<CElemStat myclass="fixed-size" v-f="datastat.num_transaz_tot > 0" :title="$t('statusreg.numtransazioni')"
|
||||
<CElemStat myclass="fixed-size" v-if="datastat.num_transaz_tot > 0" :title="$t('statusreg.numtransazioni')"
|
||||
icon="fas fa-sync-alt" :value_today="0" :mytextval="tools.numtostr(datastat.num_transaz_tot)"
|
||||
classColor="text-indigo" colBack="green">
|
||||
</CElemStat>
|
||||
<CElemStat myclass="fixed-size" v-f="datastat.tot_RIS_transati > 0" :title="$t('statusreg.totristransati')"
|
||||
<CElemStat myclass="fixed-size" v-if="datastat.tot_RIS_transati > 0" :title="$t('statusreg.totristransati')"
|
||||
icon="img: /images/1ris_rosso_100.png" :value_today="0"
|
||||
:mytextval="tools.numtostr(datastat.tot_RIS_transati) + ' RIS'" classColor="text-blueviolet"
|
||||
colBack="green">
|
||||
@@ -54,7 +54,7 @@
|
||||
<q-card>
|
||||
<q-card-section>
|
||||
<div class="q-pa-md" style="max-width: 350px; margin: auto">
|
||||
<transition-group name="fade" mode="out-in" appear enter-active-class="animazione fadeIn"
|
||||
<TransitionGroup name="fade" appear enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(user, index) in lastsreg" :key="index" class="animated chip_shadow q-ma-sm"
|
||||
v-ripple clickable @click="gotoPage(`/my/${user.username}`)">
|
||||
@@ -91,7 +91,7 @@
|
||||
}}</q-item-label>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</TransitionGroup>
|
||||
</div>
|
||||
</q-card-section>
|
||||
</q-card>
|
||||
@@ -148,7 +148,7 @@
|
||||
<q-card-section>
|
||||
<div class="q-pa-md" style="max-width: 350px; margin: auto">
|
||||
<q-list bordered>
|
||||
<transition-group name="fade" mode="out-in" appear enter-active-class="animazione fadeIn"
|
||||
<TransitionGroup name="fade" appear enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(user, index) in lastsonline" :key="index" class="animated chip_shadow q-ma-sm"
|
||||
clickable v-ripple @click="gotoPage(`/my/${user.username}`)">
|
||||
@@ -183,7 +183,7 @@
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</TransitionGroup>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-card-section>
|
||||
@@ -205,7 +205,7 @@
|
||||
alla RETE Solidale di RISO.
|
||||
</div>
|
||||
<q-list bordered>
|
||||
<transition-group name="fade" mode="out-in" appear enter-active-class="animazione fadeIn"
|
||||
<TransitionGroup name="fade" appear enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(user, index) in diffusorilist" :key="index" class="animated chip_shadow q-ma-sm"
|
||||
clickable v-ripple @click="gotoPage(`/my/${user.username}`)">
|
||||
@@ -244,7 +244,7 @@
|
||||
</div>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</TransitionGroup>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-card-section>
|
||||
@@ -266,7 +266,7 @@
|
||||
Rete di fiducia.
|
||||
</div>
|
||||
<q-list bordered>
|
||||
<transition-group name="fade" mode="out-in" appear enter-active-class="animazione fadeIn"
|
||||
<TransitionGroup name="fade" appear enter-active-class="animazione fadeIn"
|
||||
leave-active-class="animazione fadeOut">
|
||||
<q-item v-for="(user, index) in strettelist" :key="index" class="animated chip_shadow q-ma-sm"
|
||||
clickable v-ripple>
|
||||
@@ -311,7 +311,7 @@
|
||||
</q-avatar>
|
||||
</q-item-section>
|
||||
</q-item>
|
||||
</transition-group>
|
||||
</TransitionGroup>
|
||||
</q-list>
|
||||
</div>
|
||||
</q-card-section>
|
||||
|
||||
@@ -29,6 +29,10 @@ export default defineComponent({
|
||||
const site = ref(globalStore.site)
|
||||
const username_telegram_aportador = ref('')
|
||||
|
||||
const isLogged = computed(() => userStore.isLogged)
|
||||
const isEmailVerified = computed(() => userStore.my.verified_email)
|
||||
const telegVerificato = computed(() => userStore.my.profile.teleg_id > 0 && userStore.my.profile.teleg_id_old > 0)
|
||||
|
||||
function load() {
|
||||
///
|
||||
}
|
||||
@@ -41,6 +45,9 @@ export default defineComponent({
|
||||
tools,
|
||||
site,
|
||||
username_telegram_aportador,
|
||||
isLogged,
|
||||
isEmailVerified,
|
||||
telegVerificato,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
>
|
||||
<div
|
||||
v-if="
|
||||
tools.isLogged() &&
|
||||
isLogged &&
|
||||
(site.confpages?.enableRegMultiChoice || !site.confpages?.enabledRegNeedTelegram)
|
||||
"
|
||||
>
|
||||
<CVerifyEmail v-if="tools.isLogged() && !tools.isEmailVerified() && !tools.TelegVerificato()">
|
||||
<CVerifyEmail v-if="isLogged && !isEmailVerified && !telegVerificato">
|
||||
</CVerifyEmail>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -531,8 +531,8 @@ export default defineComponent({
|
||||
}, 100);
|
||||
}
|
||||
|
||||
function logoutHandler() {
|
||||
userStore.logout().then(() => {
|
||||
async function logoutHandler() {
|
||||
await userStore.logout().then(() => {
|
||||
// $router.replace('/logout')
|
||||
//
|
||||
// setTimeout(() => {
|
||||
|
||||
@@ -2,6 +2,24 @@
|
||||
|
||||
@import 'variables.scss';
|
||||
|
||||
/* blocco scroll orizzontale a ogni livello “pagina” */
|
||||
html,
|
||||
body,
|
||||
#q-app {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.q-layout,
|
||||
.q-page-container,
|
||||
.q-page {
|
||||
max-width: 100%;
|
||||
overflow-x: hidden;
|
||||
/* evita barre X su page container */
|
||||
}
|
||||
|
||||
|
||||
body {
|
||||
font-family: Söhne, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", sans-serif, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@@ -345,9 +363,14 @@ h3 {
|
||||
|
||||
.my-card {
|
||||
width: 100%;
|
||||
min-width: 350px;
|
||||
min-width: 280px;
|
||||
padding: 1rem 1rem;
|
||||
|
||||
/* più sicuro su mobile */
|
||||
@media (max-width: 360px) {
|
||||
min-width: 240px;
|
||||
}
|
||||
|
||||
@media (max-width: 1024px) {
|
||||
/* Versione Mobile */
|
||||
max-width: 1024px !important;
|
||||
@@ -974,7 +997,8 @@ h3 {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
min-width: 800px;
|
||||
min-width: 0;
|
||||
/* lascia che si adatti */
|
||||
|
||||
padding-bottom: 20px;
|
||||
margin-top: 1rem;
|
||||
@@ -1109,7 +1133,7 @@ h3 {
|
||||
}
|
||||
|
||||
.dialog_card {
|
||||
min-width: 100%;
|
||||
min-width: auto;
|
||||
width: 100% !important;
|
||||
margin-left: 2px !important;
|
||||
margin-right: 2px !important;
|
||||
@@ -2234,7 +2258,7 @@ $coloreprincipale: lightblue;
|
||||
}
|
||||
|
||||
.card-carousel-container {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
@@ -2249,6 +2273,11 @@ $coloreprincipale: lightblue;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.card-carousel .row.no-wrap {
|
||||
flex-wrap: nowrap !important;
|
||||
/* solo dentro il carousel */
|
||||
}
|
||||
|
||||
.card-carousel::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
@@ -2304,7 +2333,9 @@ $coloreprincipale: lightblue;
|
||||
}
|
||||
|
||||
.row.no-wrap {
|
||||
flex-wrap: nowrap !important;
|
||||
flex-wrap: nowrap;
|
||||
min-width: 0;
|
||||
/* consenti ai figli di restringersi */
|
||||
// gap: 1rem;
|
||||
}
|
||||
|
||||
@@ -2813,3 +2844,31 @@ body.body--dark {
|
||||
opacity: 0.6;
|
||||
}
|
||||
}
|
||||
#q-app, .q-page, .q-page-container {
|
||||
word-break: break-word;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.card-group-scrollable {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
-webkit-overflow-scrolling: touch; // smooth scroll su iOS
|
||||
scrollbar-width: none; // nasconde scrollbar su Firefox
|
||||
-ms-overflow-style: none; // nasconde scrollbar su IE/Edge
|
||||
}
|
||||
|
||||
.card-group-scrollable::-webkit-scrollbar {
|
||||
display: none; // nasconde scrollbar su WebKit
|
||||
}
|
||||
|
||||
.flex-card {
|
||||
flex: 0 0 auto !important; // evita che si restringano
|
||||
margin: 0 0.5rem;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.row.no-wrap {
|
||||
min-width: fit-content; // permette alla riga di espandersi oltre il container
|
||||
flex-wrap: nowrap !important;
|
||||
}
|
||||
@@ -70,7 +70,7 @@ export default defineComponent({
|
||||
return props.modelValue
|
||||
},
|
||||
|
||||
set(value) {
|
||||
set(value) {s
|
||||
return emit('update:modelValue', value)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
:class="!notif.read ? 'unread' : 'read'"
|
||||
@click="clickNotif(notif)"
|
||||
>
|
||||
<div v-html="getNotifText($t, notif, false)"></div>
|
||||
<div v-html="getNotifText(t, notif)"></div>
|
||||
</q-item-label>
|
||||
<q-item-label
|
||||
caption
|
||||
@@ -155,7 +155,7 @@
|
||||
size="sm"
|
||||
icon="fas fa-user-plus"
|
||||
color="positive"
|
||||
:label="$t('friends.accept')"
|
||||
:label="t('friends.accept')"
|
||||
@click="
|
||||
tools.addToMyFriends(
|
||||
q,
|
||||
@@ -170,7 +170,7 @@
|
||||
size="sm"
|
||||
icon="fas fa-user-minus"
|
||||
color="negative"
|
||||
:label="$t('friends.refuse')"
|
||||
:label="t('friends.refuse')"
|
||||
@click="
|
||||
tools.refuseReqFriends(
|
||||
q,
|
||||
@@ -188,7 +188,7 @@
|
||||
rounded
|
||||
size="sm"
|
||||
icon="fas fa-user-plus"
|
||||
color="positive" :label="$t('handshake.accept')"
|
||||
color="positive" :label="t('handshake.accept')"
|
||||
@click="tools.addToMyHandShake(q, userStore.my.username, notif.sender)"
|
||||
/>
|
||||
</div>
|
||||
@@ -214,7 +214,7 @@
|
||||
size="sm"
|
||||
icon="fas fa-user-plus"
|
||||
color="positive"
|
||||
:label="$t('friends.accept')"
|
||||
:label="t('friends.accept')"
|
||||
@click="
|
||||
tools.addToMyGroups(q, notif.sender, notif.extrafield)
|
||||
"
|
||||
@@ -225,7 +225,7 @@
|
||||
size="sm"
|
||||
icon="fas fa-user-minus"
|
||||
color="negative"
|
||||
:label="$t('friends.refuse')"
|
||||
:label="t('friends.refuse')"
|
||||
@click="
|
||||
tools.refuseReqGroup(q, notif.sender, notif.extrafield)
|
||||
"
|
||||
|
||||
@@ -156,7 +156,7 @@ export default function () {
|
||||
return ris
|
||||
}
|
||||
|
||||
function getNotifText($t: any, notif: INotif) {
|
||||
function getNotifText(t: any, notif: INotif) {
|
||||
|
||||
let descr = notif.descr
|
||||
let status = notif.status
|
||||
|
||||
@@ -1091,6 +1091,10 @@ export interface IColGridTable {
|
||||
tipoconto?: number
|
||||
path?: string
|
||||
onlyforAdmin?: boolean
|
||||
showifIsStatusDiPersona?: boolean
|
||||
showifIsStatusOnLine?: boolean
|
||||
requiredifIsStatusDiPersona?: boolean
|
||||
requiredifIsStatusOnLine?: boolean
|
||||
}
|
||||
|
||||
export interface ITableRec {
|
||||
@@ -1368,7 +1372,7 @@ export interface IMyBacheca extends IMyMain {
|
||||
idStatusSkill: number[]
|
||||
idContribType: string[]
|
||||
dateTimeStart: Date
|
||||
dateTimeEnd: Date
|
||||
dateTimeEnd: Date | null
|
||||
idCity: number[]
|
||||
photos: IGallery[]
|
||||
NumLevel: number
|
||||
@@ -1384,6 +1388,7 @@ export interface IMyBacheca extends IMyMain {
|
||||
|
||||
// **ADDFIELD_MYBACHECAS
|
||||
website: string
|
||||
link_conference?: string,
|
||||
descr: string
|
||||
date_created?: Date,
|
||||
date_updated?: Date,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export interface IToken {
|
||||
access: string
|
||||
// browser: string
|
||||
browser?: string
|
||||
token: string
|
||||
refreshToken: string
|
||||
data_login: Date
|
||||
|
||||
@@ -628,6 +628,7 @@ const msg_it = {
|
||||
email_reg_collettivo: 'Email dell\'Amministratore',
|
||||
website: 'Sito Web',
|
||||
link_maplocation: 'Link posizione su mappa',
|
||||
link_conference: 'Link alla video-conferenza',
|
||||
intcode_cell: 'Prefisso Int.',
|
||||
cell: 'Cellulare',
|
||||
cell2: 'Altro telefono',
|
||||
@@ -1659,6 +1660,7 @@ const msg_it = {
|
||||
importo_iniziale: 'Importo Iniziale',
|
||||
saldo: 'Saldo',
|
||||
dispon: 'Disponibilità',
|
||||
dispon_small: 'Dispon.',
|
||||
saldo_tips: 'Rappresenta quanto credito ho accumulato. Ma posso andare anche sotto fino a {fido} {symbol}',
|
||||
fido_casa: 'I residenti della provincia del circuito hanno la Fiducia Concesso abilitato. (Fiducia: {fido} {symbol})',
|
||||
user: 'Utente',
|
||||
|
||||
@@ -1,61 +1,66 @@
|
||||
import type { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
|
||||
import axios from 'axios'
|
||||
import axios from 'axios';
|
||||
|
||||
// import LoginModule from '../Modules/Auth/LoginStore'
|
||||
import { toolsext } from '@src/store/Modules/toolsext'
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { tools } from '@src/store/Modules/tools'
|
||||
import * as Types from './ApiTypes'
|
||||
import { toolsext } from '@src/store/Modules/toolsext';
|
||||
import { serv_constants } from '@src/store/Modules/serv_constants';
|
||||
import { useGlobalStore } from '@store/globalStore';
|
||||
import { useUserStore } from '@store/UserStore';
|
||||
import { tools } from '@src/store/Modules/tools';
|
||||
import * as Types from './ApiTypes';
|
||||
|
||||
import type { Observable } from 'rxjs';
|
||||
import { from } from 'rxjs';
|
||||
import { mergeMap, toArray } from 'rxjs/operators';
|
||||
|
||||
export let API_URL = ''
|
||||
export let API_URL = '';
|
||||
export const axiosInstance: AxiosInstance = axios.create({
|
||||
baseURL: API_URL,
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
axiosInstance.interceptors.response.use(
|
||||
});
|
||||
|
||||
/*axiosInstance.interceptors.response.use(
|
||||
(response) => {
|
||||
if (import.meta.env.VITE_DEBUG === '1') console.log(response)
|
||||
return response
|
||||
if (import.meta.env.VITE_DEBUG === '1') console.log(response);
|
||||
return response;
|
||||
},
|
||||
(error) => {
|
||||
const globalStore = useGlobalStore()
|
||||
const globalStore = useGlobalStore();
|
||||
// console.log('error', error)
|
||||
if (error.response) {
|
||||
if (import.meta.env.VITE_DEBUG === '1') console.log('Status = ', error.response.status)
|
||||
console.log('Request Error: ', error.response)
|
||||
if (import.meta.env.VITE_DEBUG === '1')
|
||||
console.log('Status = ', error.response.status);
|
||||
console.log('Request Error: ', error.response);
|
||||
if (error.response.status !== 0) {
|
||||
globalStore.setStateConnection('online')
|
||||
globalStore.setStateConnection('online');
|
||||
} else {
|
||||
globalStore.setStateConnection('offline')
|
||||
globalStore.setStateConnection('offline');
|
||||
}
|
||||
} else {
|
||||
globalStore.setStateConnection('offline')
|
||||
globalStore.setStateConnection('offline');
|
||||
}
|
||||
return Promise.reject(error)
|
||||
},
|
||||
)
|
||||
return Promise.reject(error);
|
||||
}
|
||||
);
|
||||
*/
|
||||
|
||||
export const addAuthHeaders = () => {
|
||||
// axiosInstance.defaults.headers.Authorization = `Bearer ${LoginModule.userInfos.userToken}`
|
||||
}
|
||||
};
|
||||
|
||||
//export const removeAuthHeaders = () => {
|
||||
// delete axiosInstance.defaults.headers.Authorization
|
||||
//}
|
||||
|
||||
async function generateStream(path: string, payload: any, config?: RequestInit, options?: any): Promise<AsyncIterable<any>> {
|
||||
const userStore = useUserStore()
|
||||
async function generateStream(
|
||||
path: string,
|
||||
payload: any,
|
||||
config?: RequestInit,
|
||||
options?: any
|
||||
): Promise<AsyncIterable<any>> {
|
||||
const userStore = useUserStore();
|
||||
|
||||
const mieiparam: any = {
|
||||
method: 'POST',
|
||||
@@ -66,16 +71,13 @@ async function generateStream(path: string, payload: any, config?: RequestInit,
|
||||
},
|
||||
body: JSON.stringify(payload),
|
||||
signal: options?.signal,
|
||||
...config
|
||||
}
|
||||
...config,
|
||||
};
|
||||
|
||||
console.log('marams: ', mieiparam)
|
||||
console.log('marams: ', mieiparam);
|
||||
|
||||
const response = await fetch(
|
||||
path,
|
||||
mieiparam,
|
||||
);
|
||||
console.log('USCITA DA FETCH... !!!!!')
|
||||
const response = await fetch(path, mieiparam);
|
||||
console.log('USCITA DA FETCH... !!!!!');
|
||||
if (response.status !== 200) throw new Error(response.status.toString());
|
||||
return getIterableStream(response);
|
||||
}
|
||||
@@ -112,17 +114,25 @@ function getIterableStream(stream: NodeJS.ReadableStream): AsyncIterable<any> {
|
||||
}
|
||||
|
||||
// Funzione helper per inviare la richiesta HTTP
|
||||
async function Request(type: string, path: string, payload: any, responsedata = {}, options: any = {}) {
|
||||
async function Request(
|
||||
type: string,
|
||||
path: string,
|
||||
payload: any,
|
||||
responsedata = {},
|
||||
options: any = {}
|
||||
) {
|
||||
const userStore = useUserStore();
|
||||
const globalStore = useGlobalStore();
|
||||
const baseURL = globalStore.getServerHost();
|
||||
|
||||
try {
|
||||
if (tools.isDebug()) console.log('Axios Request', path, type, tools.notshowPwd(payload));
|
||||
if (tools.isDebug())
|
||||
console.log('Axios Request', path, type, tools.notshowPwd(payload));
|
||||
|
||||
const isFormData = type === 'postFormData';
|
||||
const config = {
|
||||
let config: AxiosRequestConfig = {
|
||||
baseURL,
|
||||
timeout: 60000,
|
||||
headers: {
|
||||
'Content-Type': isFormData ? 'multipart/form-data' : 'application/json',
|
||||
'x-auth': userStore.x_auth_token,
|
||||
@@ -138,7 +148,7 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
|
||||
if (options?.stream) config.responseType = 'stream';
|
||||
|
||||
let response;
|
||||
let response: any;
|
||||
const method = type.toLowerCase();
|
||||
|
||||
// Gestione dinamica del metodo HTTP
|
||||
@@ -149,7 +159,7 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
return new Promise((resolve, reject) => {
|
||||
from(stream)
|
||||
.pipe(
|
||||
mergeMap(event => from([event])),
|
||||
mergeMap((event) => from([event])),
|
||||
toArray()
|
||||
)
|
||||
.subscribe(
|
||||
@@ -174,7 +184,21 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
response = await axiosInstance[method](path, payload, config);
|
||||
}
|
||||
} else if (['get', 'delete'].includes(method)) {
|
||||
response = await axiosInstance[method](path, {
|
||||
config.params = payload;
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
'Content-Type': 'application/json',
|
||||
};
|
||||
|
||||
//console.log('FACCIO LA CHIAMATA axiosInstance' + method)
|
||||
//console.log('. path', path);
|
||||
//console.log('. config', config);
|
||||
|
||||
response = await axiosInstance[method](path, config ? config : {}); // ✅ CORRETTO
|
||||
|
||||
//console.log('. USCITO DALLA CHIAMATA !', response);
|
||||
|
||||
/* response = await axiosInstance[method](path, {
|
||||
baseURL,
|
||||
params: payload,
|
||||
headers: {
|
||||
@@ -183,7 +207,8 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
'x-refrtok': userStore.refreshToken,
|
||||
},
|
||||
...responsedata,
|
||||
});
|
||||
});*/
|
||||
|
||||
} else if (type === 'postFormData') {
|
||||
response = await axiosInstance.post(path, payload, config);
|
||||
} else {
|
||||
@@ -191,15 +216,19 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
}
|
||||
|
||||
// Gestione aggiornamento token se necessario
|
||||
const setAuthToken = (path === '/updatepwd' || path === '/users/login');
|
||||
if (response && response.status === 200 && (setAuthToken || path === '/users/login')) {
|
||||
const setAuthToken = path === '/updatepwd' || path === '/users/login';
|
||||
if (
|
||||
response &&
|
||||
response.status === 200 &&
|
||||
(setAuthToken || path === '/users/login')
|
||||
) {
|
||||
const x_auth_token = String(response.headers['x-auth'] || '');
|
||||
const refreshToken = String(response.headers['x-refrtok'] || '');
|
||||
if (!x_auth_token) {
|
||||
userStore.setServerCode(toolsext.ERR_AUTHENTICATION);
|
||||
}
|
||||
if (setAuthToken) {
|
||||
userStore.UpdatePwd(x_auth_token, refreshToken);
|
||||
userStore.updatePwd(x_auth_token, refreshToken);
|
||||
localStorage.setItem(toolsext.localStorage.token, x_auth_token);
|
||||
localStorage.setItem(toolsext.localStorage.refreshToken, refreshToken);
|
||||
}
|
||||
@@ -213,28 +242,42 @@ async function Request(type: string, path: string, payload: any, responsedata =
|
||||
return new Types.AxiosSuccess(response.data, response.status);
|
||||
} catch (error) {
|
||||
// Aggiornamento asincrono dello stato di connessione (setTimeout per dare tempo a eventuali animazioni)
|
||||
console.error('Errore funzione Request', error)
|
||||
setTimeout(() => {
|
||||
if (['get'].includes(type.toLowerCase())) {
|
||||
globalStore.connData.downloading_server = (globalStore.connData.downloading_server === 1) ? -1 : globalStore.connData.downloading_server;
|
||||
globalStore.connData.downloading_server =
|
||||
globalStore.connData.downloading_server === 1
|
||||
? -1
|
||||
: globalStore.connData.downloading_server;
|
||||
} else {
|
||||
globalStore.connData.uploading_server = (globalStore.connData.uploading_server === 1) ? -1 : globalStore.connData.uploading_server;
|
||||
globalStore.connData.downloading_server = (globalStore.connData.downloading_server === 1) ? -1 : globalStore.connData.downloading_server;
|
||||
globalStore.connData.uploading_server =
|
||||
globalStore.connData.uploading_server === 1
|
||||
? -1
|
||||
: globalStore.connData.uploading_server;
|
||||
globalStore.connData.downloading_server =
|
||||
globalStore.connData.downloading_server === 1
|
||||
? -1
|
||||
: globalStore.connData.downloading_server;
|
||||
}
|
||||
}, 1000);
|
||||
|
||||
if (import.meta.env.DEV) {
|
||||
console.log('ERROR using', path);
|
||||
console.log('error.response=', error.response);
|
||||
if (error && error.response) {
|
||||
console.log('error.response=', JSON.stringify(error.response, null, 2));
|
||||
}
|
||||
}
|
||||
let mycode = 0;
|
||||
if (error.response) {
|
||||
const code = error.response.data?.code || 0;
|
||||
mycode = code;
|
||||
userStore.setServerCode(mycode);
|
||||
return Promise.reject(new Types.AxiosError(error.response.status, error.response.data, code));
|
||||
return Promise.reject(
|
||||
new Types.AxiosError(error.response.status, error.response.data, code)
|
||||
);
|
||||
}
|
||||
return Promise.reject(new Types.AxiosError(0, null, mycode, error));
|
||||
}
|
||||
}
|
||||
|
||||
export default Request
|
||||
export default Request;
|
||||
|
||||
@@ -122,10 +122,10 @@ export const Api = {
|
||||
}
|
||||
},
|
||||
|
||||
async checkTokenScaduto(status: number, evitaloop: boolean, url: string, method: string, mydata: any, setAuthToken: boolean = false) {
|
||||
async checkTokenScaduto(status: number, evitaloop: boolean, url: string, method: string, mydata: any, setAuthToken: boolean = false, statuscode2: number = 0) {
|
||||
const userStore = useUserStore();
|
||||
|
||||
if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
|
||||
if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED || statuscode2 === serv_constants.RIS_CODE__HTTP_FORBIDDEN_TOKEN_EXPIRED) {
|
||||
try {
|
||||
console.log('Token scaduto. Tentativo di refresh...');
|
||||
const newAccessToken = await this.refreshToken();
|
||||
@@ -157,7 +157,7 @@ export const Api = {
|
||||
// Gestione di altri errori critici
|
||||
throw err2 || {status: serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN} ;
|
||||
}
|
||||
} else if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
||||
} else if (status === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN || statuscode2 === serv_constants.RIS_CODE__HTTP_FORBIDDEN_INVALID_TOKEN) {
|
||||
userStore.setAuth('', '');
|
||||
const $router = useRouter()
|
||||
throw { status: toolsext.ERR_RETRY_LOGIN };
|
||||
@@ -199,7 +199,7 @@ export const Api = {
|
||||
}
|
||||
|
||||
// Verifica sul token (funzione custom)
|
||||
const ret: any = await this.checkTokenScaduto(res.status, evitaloop, url, method, mydata, setAuthToken);
|
||||
const ret: any = await this.checkTokenScaduto(res.status, evitaloop, url, method, mydata, setAuthToken, res.data!.statuscode2!);
|
||||
if (ret) return ret;
|
||||
|
||||
if (tools.isDebug()) console.log(' ----> ', res);
|
||||
@@ -255,12 +255,12 @@ export const Api = {
|
||||
},
|
||||
|
||||
// Funzione che gestisce la chiamata con retry
|
||||
async SendReq(url: string, method: string, mydata: any, setAuthToken = false, evitaloop = false, retryCount = 1, retryDelay = 5000, myformdata = null, responsedata = null, options = null) {
|
||||
async SendReq(url: string, method: string, mydata: any, setAuthToken = false, evitaloop = false, retryCount = 1, retryDelay = 5000, myformdata: any = null, responsedata: any = null, options: any = null) {
|
||||
try {
|
||||
return await this.SendReqBase(url, method, mydata, setAuthToken, evitaloop, myformdata, responsedata, options);
|
||||
} catch (error) {
|
||||
// Se lo status non è 403 e sono rimasti tentativi, eseguo il retry
|
||||
const riprova = error.status !== 403 && error.status !== toolsext.ERR_RETRY_LOGIN;
|
||||
const riprova = error && error.status !== 403 && error.status !== toolsext.ERR_RETRY_LOGIN;
|
||||
if (retryCount > 0 && riprova) {
|
||||
console.log(`❌❌❌ Retrying request. Attempts remaining: ${retryCount}`);
|
||||
await this.delay(retryDelay);
|
||||
|
||||
@@ -134,6 +134,10 @@ function AddCol(params: IColGridTable) {
|
||||
path: params.path === undefined ? '' : params.path,
|
||||
onlyforAdmin: params.onlyforAdmin === undefined ? false : params.onlyforAdmin,
|
||||
dont_clone: params.dont_clone === undefined ? false : params.dont_clone,
|
||||
showifIsStatusDiPersona: params.showifIsStatusDiPersona,
|
||||
showifIsStatusOnLine: params.showifIsStatusOnLine,
|
||||
requiredifIsStatusDiPersona: params.requiredifIsStatusDiPersona,
|
||||
requiredifIsStatusOnLine: params.requiredifIsStatusOnLine,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3259,6 +3263,7 @@ export const colmyBachecas = [
|
||||
icon: 'mood',
|
||||
sortable: false,
|
||||
typeobj: 'checkbox',
|
||||
required: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'descr',
|
||||
@@ -3316,25 +3321,10 @@ export const colmyBachecas = [
|
||||
name: 'dateTimeStart',
|
||||
name2: 'dateTimeEnd',
|
||||
label_trans: 'event.dateTimeStart',
|
||||
// jointable: toolsext.TABCALALLDATE,
|
||||
fieldtype: costanti.FieldType.date2startend,
|
||||
// fieldtype: costanti.FieldType.select,
|
||||
// fieldtype_real: costanti.FieldType.onlydate,
|
||||
// fieldtype: costanti.FieldType.onlydate,
|
||||
icon: 'fas fa-calendar-day',
|
||||
required: true,
|
||||
}),
|
||||
/*AddCol({
|
||||
name: 'dateTimeEnd',
|
||||
label_trans: 'event.dateTimeEnd',
|
||||
fieldtype: costanti.FieldType.date,
|
||||
// jointable: toolsext.TABCALALLDATE,
|
||||
// fieldtype: costanti.FieldType.select,
|
||||
// fieldtype_real: costanti.FieldType.onlydate,
|
||||
icon: 'fas fa-calendar-day',
|
||||
sortable: false,
|
||||
required: true,
|
||||
}),*/
|
||||
AddCol({
|
||||
name: 'idCity',
|
||||
label_trans: 'skill.cityorprovince',
|
||||
@@ -3352,7 +3342,9 @@ export const colmyBachecas = [
|
||||
remote_key: '_id',
|
||||
remote_field: 'comune',
|
||||
sortable: false,
|
||||
required: true,
|
||||
requiredifIsStatusDiPersona: true,
|
||||
showifIsStatusDiPersona: true,
|
||||
showifIsStatusOnLine: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idSector',
|
||||
@@ -3401,10 +3393,22 @@ export const colmyBachecas = [
|
||||
required: false,
|
||||
sortable: false,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'link_conference',
|
||||
label_trans: 'reg.link_conference',
|
||||
fieldtype: costanti.FieldType.link,
|
||||
showWhen:
|
||||
costanti.showWhen.NewRec +
|
||||
costanti.showWhen.InEdit +
|
||||
costanti.showWhen.InView_OnlyifExist,
|
||||
sortable: false,
|
||||
showifIsStatusOnLine: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'address',
|
||||
label_trans: 'event.address',
|
||||
fieldtype: costanti.FieldType.string,
|
||||
showifIsStatusDiPersona: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'organisedBy',
|
||||
@@ -3431,6 +3435,7 @@ export const colmyBachecas = [
|
||||
costanti.showWhen.InView_OnlyifExist,
|
||||
sortable: false,
|
||||
isadvanced_field: true,
|
||||
showifIsStatusDiPersona: true,
|
||||
}),
|
||||
AddCol({
|
||||
name: 'website',
|
||||
@@ -3495,14 +3500,14 @@ export const colmyBachecas = [
|
||||
fieldtype: costanti.FieldType.string,
|
||||
isadvanced_field: true,
|
||||
}),
|
||||
AddCol({
|
||||
/*AddCol({
|
||||
name: 'pub_to_share',
|
||||
label_trans: 'skill.pub_to_share',
|
||||
fieldtype: costanti.FieldType.select,
|
||||
icon: 'fas fa-users',
|
||||
jointable: 'pub_to_share',
|
||||
isadvanced_field: true,
|
||||
}),
|
||||
}),*/
|
||||
AddCol({
|
||||
name: 'date_created',
|
||||
label_trans: 'event.dateCreated',
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -191,8 +191,8 @@ export const useProducts = defineStore('Products', {
|
||||
(product: IProduct): boolean => {
|
||||
return (
|
||||
product?.arrvariazioni?.[0]?.quantita <= 0 &&
|
||||
!state.isProssimaUscitaById(product.productInfo.idStatoProdotto) &&
|
||||
!state.isPrevenditaById(product.productInfo.idStatoProdotto)
|
||||
!state.isProssimaUscitaById(product.productInfo?.idStatoProdotto) &&
|
||||
!state.isPrevenditaById(product.productInfo?.idStatoProdotto)
|
||||
);
|
||||
},
|
||||
|
||||
@@ -1388,7 +1388,7 @@ export const useProducts = defineStore('Products', {
|
||||
const userStore = useUserStore();
|
||||
const globalStore = useGlobalStore();
|
||||
|
||||
if (!globalStore.site.confpages.enableEcommerce) return null;
|
||||
if (!globalStore.site.confpages.enableEcommerce || !tools.isLogged()) return null;
|
||||
|
||||
if (!this.userActive._id) return null;
|
||||
|
||||
@@ -2118,7 +2118,7 @@ export const useProducts = defineStore('Products', {
|
||||
break;
|
||||
case '{stato}':
|
||||
replacements[key] = this.getDescrStatiProdottoByIdStatoProdotto(
|
||||
myproduct.productInfo?.idStatoProdotto || ''
|
||||
myproduct.productInfo?.idStatoProdotto || 0
|
||||
);
|
||||
break;
|
||||
case '{scalex}':
|
||||
|
||||
@@ -991,6 +991,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
this.isLogged = false;
|
||||
this.x_auth_token = '';
|
||||
this.refreshToken = '';
|
||||
console.log('SBIANCA VUOTO ------------ x_auth_token');
|
||||
|
||||
return true;
|
||||
},
|
||||
@@ -1503,18 +1504,27 @@ export const useUserStore = defineStore('UserStore', {
|
||||
});
|
||||
},
|
||||
|
||||
UpdatePwd(x_auth_token: string, refreshToken: string) {
|
||||
updatePwd(x_auth_token: string, refreshToken: string) {
|
||||
this.x_auth_token = x_auth_token;
|
||||
console.log('SET ------------ x_auth_token', x_auth_token);
|
||||
this.refreshToken = refreshToken;
|
||||
if (!this.my.tokens) {
|
||||
this.my.tokens = [];
|
||||
}
|
||||
this.my.tokens.push({
|
||||
|
||||
const newToken = {
|
||||
access: 'auth',
|
||||
token: x_auth_token,
|
||||
refreshToken,
|
||||
data_login: tools.getDateNow(),
|
||||
});
|
||||
};
|
||||
|
||||
const index = this.my.tokens.findIndex((token) => token.access === 'auth' && token.token === x_auth_token);
|
||||
if (index === -1) {
|
||||
this.my.tokens.push(newToken);
|
||||
} else {
|
||||
this.my.tokens[index] = newToken;
|
||||
}
|
||||
},
|
||||
|
||||
setServerCode(num: number) {
|
||||
@@ -1695,7 +1705,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
|
||||
tools.checkApp();
|
||||
|
||||
return Api.SendReq('/users/me/token', 'DELETE', null)
|
||||
return await Api.SendReq('/users/me/token', 'DELETE', null)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
})
|
||||
|
||||
@@ -2223,18 +2223,18 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
if (isLogged) {
|
||||
// Fai Logout
|
||||
// console.log('Fai Logout', 'isLogged', isLogged)
|
||||
userStore.logout();
|
||||
await userStore.logout();
|
||||
this.rightDrawerOpen = true;
|
||||
return false;
|
||||
return { ris: false, status };
|
||||
} else {
|
||||
console.log('NON SONO LOGGATO... MYUSER NON TORNATO dal SRV');
|
||||
const token = localStorage.getItem(toolsext.localStorage.token);
|
||||
if (token) {
|
||||
console.log('Sbianca cmq i dati');
|
||||
// Sbianca cmq i dati
|
||||
userStore.logout();
|
||||
await userStore.logout();
|
||||
this.rightDrawerOpen = true;
|
||||
return false;
|
||||
return { ris: false, status };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2444,6 +2444,8 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
username: userStore.my.username,
|
||||
};
|
||||
|
||||
console.log('getStatSite')
|
||||
|
||||
return Api.SendReq('/site/load', 'POST', paramquery)
|
||||
.then((res) => {
|
||||
// console.log('datastat', res)
|
||||
|
||||
@@ -134,6 +134,20 @@
|
||||
})
|
||||
"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Esporta INFOPRODUCT campi extra (sinossi, ecc)"
|
||||
color="primary"
|
||||
@click="
|
||||
EseguiFunz('EsportaInfoProductExtra')
|
||||
"
|
||||
></q-btn>
|
||||
<q-btn
|
||||
label="Importa INFOPRODUCT campi extra (sinossi, ecc)"
|
||||
color="primary"
|
||||
@click="
|
||||
EseguiFunz('ImportaInfoProductExtra')
|
||||
"
|
||||
></q-btn>
|
||||
|
||||
<!--
|
||||
<q-btn
|
||||
|
||||
@@ -64,14 +64,14 @@ export default defineComponent({
|
||||
})
|
||||
.onOk(() => {
|
||||
globalStore.DeleteRec({ table: toolsext.TABUSER, id: userStore.my._id })
|
||||
.then((ris: any) => {
|
||||
.then(async (ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif($q, t('reg.account_cancellato'))
|
||||
userStore.logout()
|
||||
$router.replace('/')
|
||||
} else
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
|
||||
await tools.showPositiveNotif($q, t('reg.account_cancellato'))
|
||||
await userStore.logout()
|
||||
await $router.replace('/')
|
||||
} else {
|
||||
await tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
@@ -69,10 +69,10 @@ export default defineComponent({
|
||||
})
|
||||
.onOk(() => {
|
||||
globalStore.DeleteRec({ table: toolsext.TABUSER, id: userStore.my._id })
|
||||
.then((ris: any) => {
|
||||
.then(async (ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif($q, t('reg.account_cancellato'))
|
||||
userStore.logout()
|
||||
await userStore.logout()
|
||||
$router.replace('/')
|
||||
} else
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
|
||||
@@ -57,10 +57,10 @@ export default defineComponent({
|
||||
})
|
||||
.onOk(() => {
|
||||
globalStore.DeleteRec({ table: toolsext.TABUSER, id: userStore.my._id })
|
||||
.then((ris: any) => {
|
||||
.then(async (ris: any) => {
|
||||
if (ris) {
|
||||
tools.showPositiveNotif($q, t('reg.account_cancellato'))
|
||||
userStore.logout()
|
||||
await userStore.logout()
|
||||
$router.replace('/')
|
||||
} else
|
||||
tools.showNegativeNotif($q, t('db.recfailed'))
|
||||
|
||||
Reference in New Issue
Block a user