- 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_ID="13"
|
||||||
VITE_APP_URL="https://test.riso.app"
|
VITE_APP_URL="https://riso.app"
|
||||||
VITE_MONGODB_HOST="https://testapi.riso.app"
|
VITE_MONGODB_HOST="https://api.riso.app"
|
||||||
VITE_LOGO_REG="riso-logo-full.png"
|
VITE_LOGO_REG='riso-logo-full.png'
|
||||||
VITE_PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs"
|
VITE_PUBLICKEY_PUSH="BGXRf1TgcqocqD6J7qnRgCG7AvM2lxAoW7peb7UEzB4SxBb6DxGRdJ0UvD9ewnrB9KrSrh0-aDCODXBm7sZ1DDs"
|
||||||
VITE_DEBUG="1"
|
VITE_DEBUG="0"
|
||||||
VITE_VUE_APP_ISTEST="1"
|
VITE_VUE_APP_ISTEST="0"
|
||||||
DIRECTORY_LOCAL="myprojplanet_vite"
|
DIRECTORY_LOCAL=myprojplanet_vite
|
||||||
DIRECTORY_SERVER="/var/www/nodejs_test.riso_server"
|
DIRECTORY_SERVER=/var/www/nodejs_riso_server
|
||||||
SERVERDIR_WEBSITE="/var/www/test.riso.app"
|
SERVERDIR_WEBSITE="/var/www/riso.app"
|
||||||
SERVERPW_WEBSITE="pwdadmin@1AOK"
|
SERVERPW_WEBSITE="pwdadmin@1AOK"
|
||||||
@@ -23,10 +23,10 @@ export default ({ router }) => {
|
|||||||
'/subscribe',
|
'/subscribe',
|
||||||
'/checkupdates',
|
'/checkupdates',
|
||||||
'/pickup',
|
'/pickup',
|
||||||
'gettable',
|
'/gettable',
|
||||||
'settable',
|
'/settable',
|
||||||
'getobj',
|
'/getobj',
|
||||||
'setobj',
|
'/setobj',
|
||||||
'/chval',
|
'/chval',
|
||||||
'/api',
|
'/api',
|
||||||
'/dashboard',
|
'/dashboard',
|
||||||
@@ -50,7 +50,7 @@ export default ({ router }) => {
|
|||||||
'/registrati',
|
'/registrati',
|
||||||
'/savepage',
|
'/savepage',
|
||||||
];
|
];
|
||||||
if (ignoredPaths.includes(to.path)) {
|
if (ignoredPaths.some((path) => to.path.startsWith(path))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
// Container principale
|
// Container principale
|
||||||
.install-app-container {
|
.install-app-container {
|
||||||
padding: 1.5rem;
|
padding: 0rem;
|
||||||
max-width: 700px;
|
max-width: 700px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
background: rgba(255, 255, 255, 0.95);
|
background: rgba(255, 255, 255, 0.95);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
padding: 2.5rem;
|
padding: 1.5rem;
|
||||||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
|
||||||
border: 1px solid rgba(255, 255, 255, 0.18);
|
border: 1px solid rgba(255, 255, 255, 0.18);
|
||||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||||
@@ -101,7 +101,7 @@
|
|||||||
|
|
||||||
// Bottone installazione
|
// Bottone installazione
|
||||||
.install-btn {
|
.install-btn {
|
||||||
padding: 0.875rem 2.5rem;
|
padding: 0.875rem 1.5rem;
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
// Box istruzioni (WebView ristretta)
|
// Box istruzioni (WebView ristretta)
|
||||||
.instructions-box {
|
.instructions-box {
|
||||||
margin-top: 2rem;
|
margin-top: 2rem;
|
||||||
padding: 1.5rem;
|
padding: 1rem;
|
||||||
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
border-left: 4px solid #f59e0b;
|
border-left: 4px solid #f59e0b;
|
||||||
@@ -503,3 +503,46 @@ body.body--dark {
|
|||||||
border-top-color: #374151;
|
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 { tools } from '@tools';
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
|
const HIDE_INSTALL_KEY = 'riso-hide-install-prompt';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'CCheckAppRunning',
|
name: 'CCheckAppRunning',
|
||||||
props: {
|
props: {
|
||||||
@@ -10,12 +12,14 @@ export default defineComponent({
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: false,
|
default: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const globalStore = useGlobalStore();
|
const globalStore = useGlobalStore();
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
|
|
||||||
|
const hideInstallPrompt = ref(false);
|
||||||
|
|
||||||
const isAppRunning = computed(() => globalStore.isAppRunning === true);
|
const isAppRunning = computed(() => globalStore.isAppRunning === true);
|
||||||
const finishLoading = computed(() => globalStore.finishLoading === true);
|
const finishLoading = computed(() => globalStore.finishLoading === true);
|
||||||
const deferredPrompt = computed(() => globalStore.deferredPrompt);
|
const deferredPrompt = computed(() => globalStore.deferredPrompt);
|
||||||
@@ -38,9 +42,11 @@ export default defineComponent({
|
|||||||
{ name: 'Messenger', test: /Messenger/ },
|
{ 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 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
|
// NUOVO: Rileva se è un browser desktop che supporta PWA
|
||||||
const isDesktopBrowser = computed(() => {
|
const isDesktopBrowser = computed(() => {
|
||||||
@@ -51,10 +57,12 @@ export default defineComponent({
|
|||||||
const browserInfo = computed(() => {
|
const browserInfo = computed(() => {
|
||||||
const ua = navigator.userAgent;
|
const ua = navigator.userAgent;
|
||||||
if (ua.includes('Edg/')) return { name: 'Edge', supported: true };
|
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('Brave')) return { name: 'Brave', supported: true };
|
||||||
if (ua.includes('Firefox')) return { name: 'Firefox', 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 };
|
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(() => {
|
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();
|
tools.checkApp();
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -91,6 +116,8 @@ export default defineComponent({
|
|||||||
showOther,
|
showOther,
|
||||||
isDesktopBrowser, // NUOVO
|
isDesktopBrowser, // NUOVO
|
||||||
browserInfo, // NUOVO
|
browserInfo, // NUOVO
|
||||||
|
hideInstallPrompt,
|
||||||
|
nascondiInstallazione,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -120,7 +120,7 @@
|
|||||||
|
|
||||||
<!-- ✅ Browser Esterno - NON in modalità app -->
|
<!-- ✅ Browser Esterno - NON in modalità app -->
|
||||||
<div
|
<div
|
||||||
v-else-if="!isAppRunning"
|
v-else-if="!isAppRunning && !hideInstallPrompt"
|
||||||
class="install-card browser-install"
|
class="install-card browser-install"
|
||||||
>
|
>
|
||||||
<!-- Installazione con Prompt (Android Chrome, Desktop) -->
|
<!-- Installazione con Prompt (Android Chrome, Desktop) -->
|
||||||
@@ -153,6 +153,17 @@
|
|||||||
/>
|
/>
|
||||||
Installa ora
|
Installa ora
|
||||||
</q-btn>
|
</q-btn>
|
||||||
|
|
||||||
|
<q-btn
|
||||||
|
flat
|
||||||
|
dense
|
||||||
|
color="grey-7"
|
||||||
|
size="sm"
|
||||||
|
class="skip-btn"
|
||||||
|
@click="nascondiInstallazione"
|
||||||
|
>
|
||||||
|
Salta
|
||||||
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Istruzioni manuali -->
|
<!-- Istruzioni manuali -->
|
||||||
@@ -234,6 +245,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-slide-transition>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- Android -->
|
<!-- Android -->
|
||||||
@@ -310,6 +339,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-slide-transition>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- Browser Desktop (Chrome, Brave, Edge, Firefox, Safari) -->
|
<!-- Browser Desktop (Chrome, Brave, Edge, Firefox, Safari) -->
|
||||||
@@ -370,6 +416,23 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</q-slide-transition>
|
</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>
|
</div>
|
||||||
|
|
||||||
<!-- Altri Browser (Fallback) - solo per browser veramente non supportati -->
|
<!-- Altri Browser (Fallback) - solo per browser veramente non supportati -->
|
||||||
|
|||||||
@@ -579,6 +579,7 @@
|
|||||||
requestToEnterCircuit = false;
|
requestToEnterCircuit = false;
|
||||||
tools.setRequestCircuit(
|
tools.setRequestCircuit(
|
||||||
$q,
|
$q,
|
||||||
|
t,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
circuit.name,
|
circuit.name,
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ export default defineComponent({
|
|||||||
return (
|
return (
|
||||||
userStore.IsMyCircuitByName(circuititalia.value.name) ||
|
userStore.IsMyCircuitByName(circuititalia.value.name) ||
|
||||||
userStore.IsAskedCircuitByName(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;
|
return false;
|
||||||
@@ -266,8 +266,8 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
caption: isTelegramVerified.value ? 'Completato!' : telegramStatus.value.message,
|
caption: isTelegramVerified.value ? 'Completato!' : telegramStatus.value.message,
|
||||||
badge: {
|
badge: {
|
||||||
color: isTelegramVerified.value ? 'positive' : 'orange',
|
color: isTelegramVerified.value ? 'positive' : (isTelegramSkipped ? 'red' : 'orange'),
|
||||||
label: isTelegramVerified.value ? 'Fatto' : 'Da fare',
|
label: isTelegramVerified.value ? 'Fatto' : (isTelegramSkipped ? 'Saltato' : 'Da fare'),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -467,18 +467,18 @@ export default defineComponent({
|
|||||||
html: true,
|
html: true,
|
||||||
options: {
|
options: {
|
||||||
type: 'radio',
|
type: 'radio',
|
||||||
model: 'install',
|
model: 'skip',
|
||||||
items: [
|
items: [
|
||||||
{
|
|
||||||
label: 'Non ho Telegram, voglio installarlo ora',
|
|
||||||
value: 'install',
|
|
||||||
color: 'primary',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: 'Salto per ora (potrò farlo in seguito)',
|
label: 'Salto per ora (potrò farlo in seguito)',
|
||||||
value: 'skip',
|
value: 'skip',
|
||||||
color: 'grey-7',
|
color: 'grey-7',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: 'Non ho Telegram, voglio installarlo ora',
|
||||||
|
value: 'install',
|
||||||
|
color: 'primary',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
cancel: {
|
cancel: {
|
||||||
|
|||||||
@@ -264,6 +264,16 @@
|
|||||||
@click="skipCurrentStep"
|
@click="skipCurrentStep"
|
||||||
class="nav-btn skip-btn-nav"
|
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 -->
|
<!-- Bottone Avanti -->
|
||||||
<q-btn
|
<q-btn
|
||||||
|
|||||||
@@ -828,7 +828,7 @@ $text-light: #666; // Grigio medio
|
|||||||
// CTA SECTION
|
// CTA SECTION
|
||||||
// ==========================================
|
// ==========================================
|
||||||
.cta-section {
|
.cta-section {
|
||||||
padding: 120px 20px;
|
padding: 40px 20px;
|
||||||
background: linear-gradient(135deg, $primary-dark 0%, $secondary-color 100%);
|
background: linear-gradient(135deg, $primary-dark 0%, $secondary-color 100%);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
|
|||||||
@@ -158,8 +158,18 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fallback: apri WhatsApp diretto
|
// Fallback: apri WhatsApp diretto
|
||||||
const messaggioCodificato = encodeURIComponent(messaggioBase);
|
// Usa encodeURIComponent ma preserva le emoji
|
||||||
window.open(`https://wa.me/?text=${messaggioCodificato}`, '_blank');
|
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({
|
$q.notify({
|
||||||
type: 'positive',
|
type: 'positive',
|
||||||
|
|||||||
@@ -277,13 +277,16 @@ h2 {
|
|||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
font-size: 1.35rem;
|
font-size: 1.35rem;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 1.75rem;
|
|
||||||
text-shadow: .25 .25rem .5rem $grayshadow;
|
text-shadow: .25 .25rem .5rem $grayshadow;
|
||||||
letter-spacing: .00937em;
|
letter-spacing: .00937em;
|
||||||
|
|
||||||
&.big {
|
&.big {
|
||||||
font-size: 1.5rem;
|
font-size: 1.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
line-height: 2rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-price {
|
.text-price {
|
||||||
|
|||||||
@@ -270,6 +270,23 @@
|
|||||||
:param2="myuser._id"
|
:param2="myuser._id"
|
||||||
button-tooltip="Reset No Circuito"
|
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
|
<CKeyAndValue
|
||||||
mykey="Saltato Circuito Ita"
|
mykey="Saltato Circuito Ita"
|
||||||
:myvalue="myuser.profile.noCircIta"
|
:myvalue="myuser.profile.noCircIta"
|
||||||
@@ -279,6 +296,15 @@
|
|||||||
:param2="myuser._id"
|
:param2="myuser._id"
|
||||||
button-tooltip="Reset No Circuito ITA"
|
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
|
<CKeyAndValue
|
||||||
mykey="Note"
|
mykey="Note"
|
||||||
:myvalue="myuser.profile.note"
|
:myvalue="myuser.profile.note"
|
||||||
|
|||||||
@@ -7345,6 +7345,7 @@ export const tools = {
|
|||||||
},
|
},
|
||||||
setRequestCircuit(
|
setRequestCircuit(
|
||||||
$q: any,
|
$q: any,
|
||||||
|
t: any,
|
||||||
username: string,
|
username: string,
|
||||||
circuitname: string,
|
circuitname: string,
|
||||||
value: boolean,
|
value: boolean,
|
||||||
@@ -7368,6 +7369,14 @@ export const tools = {
|
|||||||
msg = t('circuit.askedto', { circuitname });
|
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
|
// ADD to req
|
||||||
userStore.my.profile.asked_circuits.push(res.circuit);
|
userStore.my.profile.asked_circuits.push(res.circuit);
|
||||||
tools.showPositiveNotif($q, msg);
|
tools.showPositiveNotif($q, msg);
|
||||||
@@ -8020,7 +8029,7 @@ export const tools = {
|
|||||||
} else if (cmd === shared_consts.CIRCUITCMD.SET) {
|
} else if (cmd === shared_consts.CIRCUITCMD.SET) {
|
||||||
tools.addToMyCircuits($q, username, dest);
|
tools.addToMyCircuits($q, username, dest);
|
||||||
} else if (cmd === shared_consts.CIRCUITCMD.REQ) {
|
} 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) {
|
} else if (cmd === shared_consts.CIRCUITCMD.CANCEL_REQ) {
|
||||||
tools.cancelReqCircuit($q, username, dest);
|
tools.cancelReqCircuit($q, username, dest);
|
||||||
} else if (cmd === shared_consts.CIRCUITCMD.REFUSE_REQ) {
|
} else if (cmd === shared_consts.CIRCUITCMD.REFUSE_REQ) {
|
||||||
|
|||||||
@@ -1237,6 +1237,25 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
}
|
}
|
||||||
return await this.execDbOpUser({ mydata });
|
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) {
|
async savenoCircIta(val: boolean, userId?: string) {
|
||||||
const mydata = {
|
const mydata = {
|
||||||
_id: userId ? userId : this.my._id,
|
_id: userId ? userId : this.my._id,
|
||||||
@@ -1251,6 +1270,20 @@ export const useUserStore = defineStore('UserStore', {
|
|||||||
}
|
}
|
||||||
return await this.execDbOpUser({ mydata });
|
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) {
|
async savenoFoto(val: boolean) {
|
||||||
const mydata = {
|
const mydata = {
|
||||||
_id: this.my._id,
|
_id: this.my._id,
|
||||||
|
|||||||
@@ -94,6 +94,7 @@
|
|||||||
requestToEnterCircuit = false;
|
requestToEnterCircuit = false;
|
||||||
tools.setRequestCircuit(
|
tools.setRequestCircuit(
|
||||||
$q,
|
$q,
|
||||||
|
t,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
circuit.name,
|
circuit.name,
|
||||||
true,
|
true,
|
||||||
|
|||||||
@@ -929,6 +929,7 @@
|
|||||||
@click="
|
@click="
|
||||||
tools.setRequestCircuit(
|
tools.setRequestCircuit(
|
||||||
$q,
|
$q,
|
||||||
|
t,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
circuitSel,
|
circuitSel,
|
||||||
true,
|
true,
|
||||||
|
|||||||
Reference in New Issue
Block a user