- controllo della @ sull'username telegram (sugli Eventi)

- controllo email di test, se funzionante o no
This commit is contained in:
Surya Paolo
2025-07-29 12:54:40 +02:00
parent 85db3b4a61
commit 6013a624f6
11 changed files with 137 additions and 65 deletions

View File

@@ -3,7 +3,7 @@
v-if="
((tools.getLinkUserTelegramByUser(myuser) ||
(myuser.email && tools.isEmailVerifiedByUser(myuser))) &&
tools.isUserOk()) ||
tools.isUserOk(true)) ||
showBtnActivities
"
class=""
@@ -40,18 +40,18 @@
</div>
<div class="q-pa-xs">
<q-btn
v-if="tools.getLinkUserTelegramByUser(myuser) && tools.isUserOk()"
v-if="tools.getLinkUserTelegramByUser(myuser) && tools.isUserOk(true)"
icon="fab fa-telegram"
color="blue"
:type="tools.isUserOk() ? 'a' : 'btn'"
:type="tools.isUserOk(true) ? 'a' : 'btn'"
size="md"
rounded
:label="$t('dialog.contact')"
:href="
tools.isUserOk() ? tools.getLinkUserTelegramByUser(myuser) : null
tools.isUserOk(true) ? tools.getLinkUserTelegramByUser(myuser) : null
"
@click="
!tools.isUserOk() ? (showingtooltip = !showingtooltip) : false
!tools.isUserOk(true) ? (showingtooltip = !showingtooltip) : false
"
target="__blank"
>

View File

@@ -449,6 +449,10 @@ export default defineComponent({
if (col.value && col.value.allowchar === costanti.ALLOWCHAR_CODE) {
newval = tools.removespaces_slash(newval)
}
if (col.value.fieldtype === costanti.FieldType.username_telegram) {
newval = tools.removeatIniziale(newval)
}
// console.log('popuppedit: changevalRec', newval, 'COLName', col.value.name)
// console.log('row', props.row, 'col', props.mycol, 'newval', newval)
@@ -953,10 +957,17 @@ export default defineComponent({
}
function nameKeydown(e: any, col: any) {
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
if (col.fieldtype === costanti.FieldType.username_telegram) {
if (!/^[a-z0-9_]*$/i.test(e.key)) {
e.preventDefault();
}
if (/^\W$/.test(e.key)) {
e.preventDefault();
} else {
if (col.allowchar === costanti.ALLOWCHAR_CODE) {
if (/^\W$/.test(e.key)) {
e.preventDefault();
}
}
}
}

View File

@@ -316,8 +316,6 @@
>
<span style="font-size: 14px">{{ myvalue }}</span>
</div>
</div>
<!-- Componente di selezione del colore -->
@@ -333,7 +331,8 @@
<div
v-else-if="
col.fieldtype === costanti.FieldType.string ||
col.fieldtype === costanti.FieldType.crypted
col.fieldtype === costanti.FieldType.crypted ||
col.fieldtype === costanti.FieldType.username_telegram
"
>
<div
@@ -359,6 +358,19 @@
:rules="[(val) => !!val || !col.required || 'Campo richiesto']"
:label="col.visulabel ? addstrrequired + t(col.label_trans) : col.label"
>
<template
v-if="col.fieldtype === costanti.FieldType.username_telegram"
v-slot:prepend
>
<span class="text-h7 text-blue">@</span>
</template>
<template
v-if="col.fieldtype === costanti.FieldType.username_telegram"
v-slot:prepend
>
<span class="text-h7 text-blue">@</span>
</template>
</q-input>
<q-field v-if="col.showLinkResult && myvalue">
Diventerà: {{ tools.generateURL(col.showLinkResult, myvalue) }}
@@ -560,7 +572,7 @@
{{ t(col.label_trans ? col.label_trans : '') }}
</span>
<CGallery
:filetype="shared_consts.FILETYPE.IMG"
:filetype="shared_consts.FILETYPE.IMG"
:imagebak="
col.showpicprofile_ifnotset
? userStore.getImgByProfile(row['profile'], true)
@@ -1492,7 +1504,8 @@
<div
v-else-if="
col.fieldtype === costanti.FieldType.string ||
col.fieldtype === costanti.FieldType.crypted
col.fieldtype === costanti.FieldType.crypted ||
col.fieldtype === costanti.FieldType.username_telegram
"
>
<q-input

View File

@@ -50,7 +50,7 @@ export default defineComponent({
const $router = useRouter()
const datastat = ref(<any>{
const datastat = ref(<INotData>{
num_reg: 0,
num_reg_today: 0,
online_today: 0,
@@ -160,6 +160,7 @@ export default defineComponent({
// console.log('load')
myloadingload.value = true
datastat.value = await globalStore.getStatSite()
datastat.value = {}
eseguipolling.value = true

View File

@@ -1,62 +1,86 @@
<template>
<div v-if="!globalStore.serverError" class="q-ma-sm">
<div v-if="tools.isLogged() && (site.confpages?.enableRegMultiChoice || (!site.confpages?.enabledRegNeedTelegram))">
<div
v-if="!globalStore.serverError"
class="q-ma-sm"
>
<div
v-if="
tools.isLogged() &&
(site.confpages?.enableRegMultiChoice || !site.confpages?.enabledRegNeedTelegram)
"
>
<CVerifyEmail v-if="!tools.isEmailVerified() && !tools.TelegVerificato()">
</CVerifyEmail>
</div>
<div v-if="userStore.isUserWaitingVerifAportador()" class="centeritems">
<q-banner inline-actions rounded class="bg-light-grey text-black">
<div class="text-h7"
>Sei in attesa di essere Ammesso da
{{ tools.getAportadorSolidario() }}.<br>
Ti arriverà una notifica sulla Chat Telegram <strong>'BOT RISO'</strong>.<br /><br />
<div
v-if="userStore.isUserWaitingVerifAportador()"
class="centeritems"
>
<div class="text-h5 text-center text-bold q-mb-md">Attendi Ammissione</div>
Se non dovesse arrivarti entro qualche ora, contattalo per ricordarglielo.<br />
</div>
<q-card class="q-ma-md q-pa-sm bg-light-blue text-dark shadow-6">
<div class="text-h7 justify-center">
Sei in attesa di essere Ammesso da {{ tools.getAportadorSolidario() }}.<br />
Ti arriverà una notifica sulla Chat Telegram
<a :href="tools.getLinkBotTelegram('', '')"
><strong>{{ tools.getBotName() }}</strong></a
>.<br /><br />
Se non dovesse arrivarti entro qualche ora, contattala per avvisarla:<br />
</div>
<q-btn
rounded
class="q-ma-sm justify-center row"
color="primary"
:to="tools.getLinkProfileAportador()"
:label="`Apri Profilo di ` + tools.getAportadorSolidario()"
>
</q-btn>
<br /><br />
<div class="text-h7 row justify-center text-bold">Per supporto con Telegram:</div>
<q-btn
rounded
type="a"
class="q-ma-sm justify-center row"
color="primary"
icon="fab fa-telegram"
href="https://t.me/surya1977"
:label="`Contatta Surya`"
>
</q-btn>
<div class="text-h7 row justify-center">Oppure tramite email:</div>
<q-btn
rounded
type="a"
class="q-ma-sm justify-center row"
color="grey"
icon="fas fa-envelope"
href="mailto:surya@riso.app?Subject=Richiesta%20di%20aiuto%20su%20Riso"
:label="`Invia Email a Surya`"
>
</q-btn>
</q-card>
<div class="row justify-center">
<q-btn
rounded
class="q-ma-sm"
color="positive"
@click="tools.refreshPage()"
icon="refresh"
label="Aggiorna la Pagina"
label="Verifica ora se sei stato Ammesso"
>
</q-btn>
<br>
<q-btn
rounded
class="q-ma-sm"
color="primary"
:to="tools.getLinkProfileAportador()"
:label="`Profilo di ` + tools.getAportadorSolidario()"
>
</q-btn>
<br><br>
<div class="text-h7"> Per supporto ed Aiuto:</div>
<q-btn
rounded
type="a"
class="q-ma-sm"
color="primary"
icon="fab fa-telegram"
href="https://t.me/surya1977"
:label="`Contatta l'Assistenza (Surya)`"
>
</q-btn>
</q-banner>
</div>
</div>
</div>
</template>
<script lang="ts" src="./CUserNonVerif.ts">
</script>
<script lang="ts" src="./CUserNonVerif.ts"></script>
<style lang="scss" scoped>
@import './CUserNonVerif.scss';