- risolto problema sull'attivazione del Circuito ITA. non arrivava il messaggio
- sistemazioni sul profilo
This commit is contained in:
@@ -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);
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
<!-- ✅ Browser Esterno - NON in modalità app -->
|
||||
<div
|
||||
v-else-if="!isAppRunning"
|
||||
v-else-if="!isAppRunning && !hideInstallPrompt"
|
||||
class="install-card browser-install"
|
||||
>
|
||||
<!-- Installazione con Prompt (Android Chrome, Desktop) -->
|
||||
@@ -153,6 +153,17 @@
|
||||
/>
|
||||
Installa ora
|
||||
</q-btn>
|
||||
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
color="grey-7"
|
||||
size="sm"
|
||||
class="skip-btn"
|
||||
@click="nascondiInstallazione"
|
||||
>
|
||||
Salta
|
||||
</q-btn>
|
||||
</div>
|
||||
|
||||
<!-- Istruzioni manuali -->
|
||||
@@ -234,6 +245,24 @@
|
||||
</div>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
|
||||
<!-- Bottone per nascondere -->
|
||||
<div class="skip-section">
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
color="grey-7"
|
||||
size="md"
|
||||
class="skip-btn"
|
||||
@click="nascondiInstallazione"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-times"
|
||||
class="q-mr-xs"
|
||||
/>
|
||||
Salta
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Android -->
|
||||
@@ -310,6 +339,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
<!-- Bottone per nascondere -->
|
||||
<div class="skip-section">
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
color="grey-7"
|
||||
size="md"
|
||||
class="skip-btn"
|
||||
@click="nascondiInstallazione"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-times"
|
||||
class="q-mr-xs"
|
||||
/>
|
||||
Salta
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Browser Desktop (Chrome, Brave, Edge, Firefox, Safari) -->
|
||||
@@ -370,6 +416,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</q-slide-transition>
|
||||
<!-- Bottone per nascondere -->
|
||||
<div class="skip-section">
|
||||
<q-btn
|
||||
flat
|
||||
dense
|
||||
color="grey-7"
|
||||
size="md"
|
||||
class="skip-btn"
|
||||
@click="nascondiInstallazione"
|
||||
>
|
||||
<q-icon
|
||||
name="fas fa-times"
|
||||
class="q-mr-xs"
|
||||
/>
|
||||
Salta
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Altri Browser (Fallback) - solo per browser veramente non supportati -->
|
||||
|
||||
@@ -579,6 +579,7 @@
|
||||
requestToEnterCircuit = false;
|
||||
tools.setRequestCircuit(
|
||||
$q,
|
||||
t,
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
true,
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -264,6 +264,16 @@
|
||||
@click="skipCurrentStep"
|
||||
class="nav-btn skip-btn-nav"
|
||||
/>
|
||||
<!-- Bottone Salta (Solo per Telegram) -->
|
||||
<q-btn
|
||||
v-if="currentStepIndex === 0"
|
||||
rounded
|
||||
color="negative"
|
||||
icon="skip_next"
|
||||
label="Salta"
|
||||
@click="skipTelegramVerification"
|
||||
class="nav-btn skip-btn-nav"
|
||||
/>
|
||||
|
||||
<!-- Bottone Avanti -->
|
||||
<q-btn
|
||||
|
||||
@@ -828,7 +828,7 @@ $text-light: #666; // Grigio medio
|
||||
// CTA SECTION
|
||||
// ==========================================
|
||||
.cta-section {
|
||||
padding: 120px 20px;
|
||||
padding: 40px 20px;
|
||||
background: linear-gradient(135deg, $primary-dark 0%, $secondary-color 100%);
|
||||
text-align: center;
|
||||
|
||||
|
||||
@@ -158,8 +158,18 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
// Fallback: apri WhatsApp diretto
|
||||
const messaggioCodificato = encodeURIComponent(messaggioBase);
|
||||
window.open(`https://wa.me/?text=${messaggioCodificato}`, '_blank');
|
||||
// Usa encodeURIComponent ma preserva le emoji
|
||||
const messaggioCodificato = encodeURIComponent(messaggioBase)
|
||||
.replace(/%E2%80%8B/g, '') // Rimuove zero-width space se presenti
|
||||
.replace(/%0A/g, '%0A'); // Mantieni i line break
|
||||
|
||||
const whatsappUrl = `https://wa.me/?text=${messaggioCodificato}`;
|
||||
|
||||
// Debug: stampa per vedere se le emoji sono OK
|
||||
console.log('Messaggio originale:', messaggioBase);
|
||||
console.log('URL WhatsApp:', whatsappUrl);
|
||||
|
||||
window.open(whatsappUrl, '_blank');
|
||||
|
||||
$q.notify({
|
||||
type: 'positive',
|
||||
|
||||
Reference in New Issue
Block a user