- risolto problema sull'attivazione del Circuito ITA. non arrivava il messaggio
- sistemazioni sul profilo
This commit is contained in:
@@ -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"
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -277,13 +277,16 @@ h2 {
|
||||
margin-bottom: 6px;
|
||||
font-size: 1.35rem;
|
||||
font-weight: 400;
|
||||
line-height: 1.75rem;
|
||||
text-shadow: .25 .25rem .5rem $grayshadow;
|
||||
letter-spacing: .00937em;
|
||||
|
||||
&.big {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
line-height: 2rem;
|
||||
}
|
||||
}
|
||||
|
||||
.text-price {
|
||||
|
||||
@@ -270,6 +270,23 @@
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Reset No Circuito"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Pwd"
|
||||
:myvalue="myuser.password"
|
||||
:show-set-button="true"
|
||||
:on-set-value="userStore.setPwdComeQuellaDellAdmin"
|
||||
:valuetoSet="false"
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Set Pwd come la mia"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Pwd"
|
||||
:myvalue="myuser.password"
|
||||
:show-set-button="true"
|
||||
:on-set-value="userStore.ripristinaPwdPrec"
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Ripristina Pwd Precedente"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Saltato Circuito Ita"
|
||||
:myvalue="myuser.profile.noCircIta"
|
||||
@@ -279,6 +296,15 @@
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Reset No Circuito ITA"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Inserisci in Circuito ITA (dopo essere entrato sul Circuito Provinciale)"
|
||||
:myvalue="myuser.profile.insert_circuito_ita"
|
||||
:show-set-button="true"
|
||||
:on-set-value="userStore.savenoInserCircIta"
|
||||
:valuetoSet="false"
|
||||
:param2="myuser._id"
|
||||
button-tooltip="Reset Insersci Circuito ITA"
|
||||
/>
|
||||
<CKeyAndValue
|
||||
mykey="Note"
|
||||
:myvalue="myuser.profile.note"
|
||||
|
||||
@@ -7345,6 +7345,7 @@ export const tools = {
|
||||
},
|
||||
setRequestCircuit(
|
||||
$q: any,
|
||||
t: any,
|
||||
username: string,
|
||||
circuitname: string,
|
||||
value: boolean,
|
||||
@@ -7368,6 +7369,14 @@ export const tools = {
|
||||
msg = t('circuit.askedto', { circuitname });
|
||||
}
|
||||
|
||||
if (!!res.update?.profile) {
|
||||
if (res.update?.profile) {
|
||||
Object.keys(res.update.profile).forEach((key: string) => {
|
||||
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) {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -94,6 +94,7 @@
|
||||
requestToEnterCircuit = false;
|
||||
tools.setRequestCircuit(
|
||||
$q,
|
||||
t,
|
||||
userStore.my.username,
|
||||
circuit.name,
|
||||
true,
|
||||
|
||||
@@ -929,6 +929,7 @@
|
||||
@click="
|
||||
tools.setRequestCircuit(
|
||||
$q,
|
||||
t,
|
||||
userStore.my.username,
|
||||
circuitSel,
|
||||
true,
|
||||
|
||||
Reference in New Issue
Block a user