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 @@