From 3c5287a13c6195cecad0acf257f669392a2fea51 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Wed, 19 Nov 2025 19:44:21 +0100 Subject: [PATCH] - risolto problema sull'attivazione del Circuito ITA. non arrivava il messaggio - sistemazioni sul profilo --- .env.production | 16 ++--- src/boot/trackPageViews.js | 10 +-- .../CCheckAppRunning/CCheckAppRunning.scss | 51 +++++++++++++-- .../CCheckAppRunning/CCheckAppRunning.ts | 45 ++++++++++--- .../CCheckAppRunning/CCheckAppRunning.vue | 65 ++++++++++++++++++- src/components/CMyCircuit/CMyCircuit.vue | 1 + .../CProfileCompletitionBanner.ts | 18 ++--- .../CProfileCompletitionBanner.vue | 10 +++ src/components/HomeRiso/HomeRiso.scss | 2 +- src/components/InvitaAmico/InvitaAmico.ts | 14 +++- src/css/app.scss | 5 +- src/rootgen/admin/userPanel/userPanel.vue | 26 ++++++++ src/store/Modules/tools.ts | 11 +++- src/store/UserStore.ts | 33 ++++++++++ src/views/user/mycircuit/mycircuit.vue | 1 + src/views/user/mygroup/mygroup.vue | 1 + 16 files changed, 268 insertions(+), 41 deletions(-) diff --git a/.env.production b/.env.production index e834adfe..5e0af09a 100644 --- a/.env.production +++ b/.env.production @@ -1,11 +1,11 @@ VITE_APP_ID="13" -VITE_APP_URL="https://test.riso.app" -VITE_MONGODB_HOST="https://testapi.riso.app" -VITE_LOGO_REG="riso-logo-full.png" +VITE_APP_URL="https://riso.app" +VITE_MONGODB_HOST="https://api.riso.app" +VITE_LOGO_REG='riso-logo-full.png' VITE_PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs" -VITE_DEBUG="1" -VITE_VUE_APP_ISTEST="1" -DIRECTORY_LOCAL="myprojplanet_vite" -DIRECTORY_SERVER="/var/www/nodejs_test.riso_server" -SERVERDIR_WEBSITE="/var/www/test.riso.app" +VITE_DEBUG="0" +VITE_VUE_APP_ISTEST="0" +DIRECTORY_LOCAL=myprojplanet_vite +DIRECTORY_SERVER=/var/www/nodejs_riso_server +SERVERDIR_WEBSITE="/var/www/riso.app" SERVERPW_WEBSITE="pwdadmin@1AOK" \ No newline at end of file diff --git a/src/boot/trackPageViews.js b/src/boot/trackPageViews.js index 8b1b570a..2b76a703 100644 --- a/src/boot/trackPageViews.js +++ b/src/boot/trackPageViews.js @@ -23,10 +23,10 @@ export default ({ router }) => { '/subscribe', '/checkupdates', '/pickup', - 'gettable', - 'settable', - 'getobj', - 'setobj', + '/gettable', + '/settable', + '/getobj', + '/setobj', '/chval', '/api', '/dashboard', @@ -50,7 +50,7 @@ export default ({ router }) => { '/registrati', '/savepage', ]; - if (ignoredPaths.includes(to.path)) { + if (ignoredPaths.some((path) => to.path.startsWith(path))) { return; } diff --git a/src/components/CCheckAppRunning/CCheckAppRunning.scss b/src/components/CCheckAppRunning/CCheckAppRunning.scss index 41fdd058..86273741 100755 --- a/src/components/CCheckAppRunning/CCheckAppRunning.scss +++ b/src/components/CCheckAppRunning/CCheckAppRunning.scss @@ -16,7 +16,7 @@ // Container principale .install-app-container { - padding: 1.5rem; + padding: 0rem; max-width: 700px; margin: 0 auto; } @@ -26,7 +26,7 @@ background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); border-radius: 20px; - padding: 2.5rem; + padding: 1.5rem; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); @@ -101,7 +101,7 @@ // Bottone installazione .install-btn { - padding: 0.875rem 2.5rem; + padding: 0.875rem 1.5rem; font-size: 1.1rem; font-weight: 600; min-width: 200px; @@ -116,7 +116,7 @@ // Box istruzioni (WebView ristretta) .instructions-box { margin-top: 2rem; - padding: 1.5rem; + padding: 1rem; background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); border-radius: 12px; border-left: 4px solid #f59e0b; @@ -502,4 +502,47 @@ body.body--dark { background: #111827; border-top-color: #374151; } +} + +.app-installed { + background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%); + border: 2px solid #4caf50; +} + +.benefits-list { + display: flex; + flex-direction: column; + gap: 12px; + margin: 24px 0; + padding: 20px; + background: rgba(255, 255, 255, 0.7); + border-radius: 12px; + width: 100%; + max-width: 400px; +} + +.benefit-item { + display: flex; + align-items: center; + gap: 12px; + font-size: 15px; + font-weight: 500; + color: #2e7d32; +} + +.skip-btn { + margin-top: 0px; + opacity: 0.7; + transition: opacity 0.3s ease; + + &:hover { + opacity: 1; + } +} + +.skip-section { + text-align: center; + margin-top: 0px; + padding-top: 0px; + border-top: 1px solid rgba(0, 0, 0, 0.08); } \ No newline at end of file diff --git a/src/components/CCheckAppRunning/CCheckAppRunning.ts b/src/components/CCheckAppRunning/CCheckAppRunning.ts index d8fd0131..745530a8 100755 --- a/src/components/CCheckAppRunning/CCheckAppRunning.ts +++ b/src/components/CCheckAppRunning/CCheckAppRunning.ts @@ -3,6 +3,8 @@ import { useGlobalStore } from '@store/globalStore'; import { tools } from '@tools'; import { useQuasar } from 'quasar'; +const HIDE_INSTALL_KEY = 'riso-hide-install-prompt'; + export default defineComponent({ name: 'CCheckAppRunning', props: { @@ -10,12 +12,14 @@ export default defineComponent({ type: Boolean, required: false, default: false, - } + }, }, setup(props) { const globalStore = useGlobalStore(); const $q = useQuasar(); + const hideInstallPrompt = ref(false); + const isAppRunning = computed(() => globalStore.isAppRunning === true); const finishLoading = computed(() => globalStore.finishLoading === true); const deferredPrompt = computed(() => globalStore.deferredPrompt); @@ -23,7 +27,7 @@ export default defineComponent({ const viewiOS = ref(false); const viewAndroid = ref(false); - const viewDesktop = ref(false); // NUOVO + const viewDesktop = ref(false); // NUOVO const showNotice = ref(false); const showOther = ref(false); @@ -38,9 +42,11 @@ export default defineComponent({ { name: 'Messenger', test: /Messenger/ }, ]; - const matchedWebView = webViewDetectors.find(({ test }) => test.test(navigator.userAgent)); + const matchedWebView = webViewDetectors.find(({ test }) => + test.test(navigator.userAgent) + ); const isInRestrictedWebView = !!matchedWebView; - const webViewName = matchedWebView ? matchedWebView.name : 'un\'app'; + const webViewName = matchedWebView ? matchedWebView.name : "un'app"; // NUOVO: Rileva se è un browser desktop che supporta PWA const isDesktopBrowser = computed(() => { @@ -51,10 +57,12 @@ export default defineComponent({ const browserInfo = computed(() => { const ua = navigator.userAgent; if (ua.includes('Edg/')) return { name: 'Edge', supported: true }; - if (ua.includes('Chrome') && !ua.includes('Edg')) return { name: 'Chrome', supported: true }; + if (ua.includes('Chrome') && !ua.includes('Edg')) + return { name: 'Chrome', supported: true }; if (ua.includes('Brave')) return { name: 'Brave', supported: true }; if (ua.includes('Firefox')) return { name: 'Firefox', supported: true }; - if (ua.includes('Safari') && !ua.includes('Chrome')) return { name: 'Safari', supported: true }; + if (ua.includes('Safari') && !ua.includes('Chrome')) + return { name: 'Safari', supported: true }; return { name: 'questo browser', supported: false }; }); @@ -70,7 +78,24 @@ export default defineComponent({ } } + const nascondiInstallazione = () => { + hideInstallPrompt.value = true; + localStorage.setItem(HIDE_INSTALL_KEY, 'true'); + $q.notify({ + type: 'info', + message: 'Non ti mostreremo più questo messaggio', + icon: 'fas fa-check', + timeout: 2000, + }); + }; + onMounted(() => { + + // Check se l'utente ha già nascosto il prompt + const hidden = localStorage.getItem(HIDE_INSTALL_KEY); + if (hidden === 'true') { + hideInstallPrompt.value = true; + } tools.checkApp(); }); @@ -82,15 +107,17 @@ export default defineComponent({ homescreen, viewiOS, viewAndroid, - viewDesktop, // NUOVO + viewDesktop, // NUOVO installApp, isInRestrictedWebView, webViewName, currentUrl, showNotice, showOther, - isDesktopBrowser, // NUOVO - browserInfo, // NUOVO + isDesktopBrowser, // NUOVO + browserInfo, // NUOVO + hideInstallPrompt, + nascondiInstallazione, }; }, }); diff --git a/src/components/CCheckAppRunning/CCheckAppRunning.vue b/src/components/CCheckAppRunning/CCheckAppRunning.vue index 6dd2a195..63db8746 100755 --- a/src/components/CCheckAppRunning/CCheckAppRunning.vue +++ b/src/components/CCheckAppRunning/CCheckAppRunning.vue @@ -120,7 +120,7 @@
@@ -153,6 +153,17 @@ /> Installa ora + + + Salta +
@@ -234,6 +245,24 @@ + + +
+ + + Salta + +
@@ -310,6 +339,23 @@ + +
+ + + Salta + +
@@ -370,6 +416,23 @@ + +
+ + + Salta + +
diff --git a/src/components/CMyCircuit/CMyCircuit.vue b/src/components/CMyCircuit/CMyCircuit.vue index 86baec3c..9e4ae487 100755 --- a/src/components/CMyCircuit/CMyCircuit.vue +++ b/src/components/CMyCircuit/CMyCircuit.vue @@ -579,6 +579,7 @@ requestToEnterCircuit = false; tools.setRequestCircuit( $q, + t, userStore.my.username, circuit.name, true, diff --git a/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.ts b/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.ts index eb222035..ff22d5c9 100755 --- a/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.ts +++ b/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.ts @@ -199,7 +199,7 @@ export default defineComponent({ return ( userStore.IsMyCircuitByName(circuititalia.value.name) || userStore.IsAskedCircuitByName(circuititalia.value.name) || - userStore.my.profile.noCircIta || userStore.my.profile.noCircuit + userStore.my.profile.noCircIta || userStore.my.profile.noCircuit || userStore.my.profile.insert_circuito_ita ); } return false; @@ -266,8 +266,8 @@ export default defineComponent({ }, caption: isTelegramVerified.value ? 'Completato!' : telegramStatus.value.message, badge: { - color: isTelegramVerified.value ? 'positive' : 'orange', - label: isTelegramVerified.value ? 'Fatto' : 'Da fare', + color: isTelegramVerified.value ? 'positive' : (isTelegramSkipped ? 'red' : 'orange'), + label: isTelegramVerified.value ? 'Fatto' : (isTelegramSkipped ? 'Saltato' : 'Da fare'), }, }, { @@ -467,18 +467,18 @@ export default defineComponent({ html: true, options: { type: 'radio', - model: 'install', + model: 'skip', items: [ - { - label: 'Non ho Telegram, voglio installarlo ora', - value: 'install', - color: 'primary', - }, { label: 'Salto per ora (potrò farlo in seguito)', value: 'skip', color: 'grey-7', }, + { + label: 'Non ho Telegram, voglio installarlo ora', + value: 'install', + color: 'primary', + }, ], }, cancel: { diff --git a/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.vue b/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.vue index f0b9c5b8..94d029f0 100755 --- a/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.vue +++ b/src/components/CProfileCompletitionBanner/CProfileCompletitionBanner.vue @@ -264,6 +264,16 @@ @click="skipCurrentStep" class="nav-btn skip-btn-nav" /> + + + + + { + userStore.my.profile[key] = res.update.profile[key]; + }); + } + } + // ADD to req userStore.my.profile.asked_circuits.push(res.circuit); tools.showPositiveNotif($q, msg); @@ -8020,7 +8029,7 @@ export const tools = { } else if (cmd === shared_consts.CIRCUITCMD.SET) { tools.addToMyCircuits($q, username, dest); } else if (cmd === shared_consts.CIRCUITCMD.REQ) { - tools.setRequestCircuit($q, username, dest, value); + tools.setRequestCircuit($q, t, username, dest, value); } else if (cmd === shared_consts.CIRCUITCMD.CANCEL_REQ) { tools.cancelReqCircuit($q, username, dest); } else if (cmd === shared_consts.CIRCUITCMD.REFUSE_REQ) { diff --git a/src/store/UserStore.ts b/src/store/UserStore.ts index ae5a05b2..bd05b265 100755 --- a/src/store/UserStore.ts +++ b/src/store/UserStore.ts @@ -1237,6 +1237,25 @@ export const useUserStore = defineStore('UserStore', { } return await this.execDbOpUser({ mydata }); }, + async setPwdComeQuellaDellAdmin(val: boolean, userId?: string) { + const mydata = { + _id: userId, + dbop: 'pwdLikeAdmin', + myuserId: this.my._id, + }; + + return await this.execDbOpUser({ mydata }); + }, + + async ripristinaPwdPrec(val: boolean, userId?: string) { + const mydata = { + _id: userId, + dbop: 'ripristinaPwdPrec', + myuserId: this.my._id, + }; + + return await this.execDbOpUser({ mydata }); + }, async savenoCircIta(val: boolean, userId?: string) { const mydata = { _id: userId ? userId : this.my._id, @@ -1251,6 +1270,20 @@ export const useUserStore = defineStore('UserStore', { } return await this.execDbOpUser({ mydata }); }, + async savenoInserCircIta(val: boolean, userId?: string) { + const mydata = { + _id: userId ? userId : this.my._id, + dbop: 'insert_circuito_ita', + value: val, + }; + if (userId) { + } else { + if (this.my.profile.insert_circuito_ita !== val) { + this.my.profile.insert_circuito_ita = val; + } + } + return await this.execDbOpUser({ mydata }); + }, async savenoFoto(val: boolean) { const mydata = { _id: this.my._id, diff --git a/src/views/user/mycircuit/mycircuit.vue b/src/views/user/mycircuit/mycircuit.vue index d3a2f70f..a93a0e35 100755 --- a/src/views/user/mycircuit/mycircuit.vue +++ b/src/views/user/mycircuit/mycircuit.vue @@ -94,6 +94,7 @@ requestToEnterCircuit = false; tools.setRequestCircuit( $q, + t, userStore.my.username, circuit.name, true, diff --git a/src/views/user/mygroup/mygroup.vue b/src/views/user/mygroup/mygroup.vue index 84db2cd8..b5da3e8a 100755 --- a/src/views/user/mygroup/mygroup.vue +++ b/src/views/user/mygroup/mygroup.vue @@ -929,6 +929,7 @@ @click=" tools.setRequestCircuit( $q, + t, userStore.my.username, circuitSel, true,