Registrazione con scelta se Telegram o Email.

(anche da link personale)
This commit is contained in:
Surya Paolo
2022-12-16 00:47:05 +01:00
parent b1ec0b6a67
commit 2b44dfbcb6
14 changed files with 111 additions and 33 deletions

View File

@@ -8,6 +8,7 @@ import { Logo } from '@/components/logo'
import { CTitleBanner } from '../CTitleBanner'
import { CCopyBtn } from '../CCopyBtn'
import { CRegistration } from '../CRegistration'
import { PagePolicy } from '../PagePolicy'
import { computed, defineComponent, reactive, ref, watch } from 'vue'
import { CSignIn } from '@/components/CSignIn'
@@ -31,7 +32,7 @@ import { useGlobalStore } from '@store/globalStore'
export default defineComponent({
name: 'CSignUp',
components: { Logo, CTitleBanner, PagePolicy, CCopyBtn },
components: { Logo, CTitleBanner, PagePolicy, CCopyBtn, CRegistration },
props: {
showadultcheck: {
type: Boolean,
@@ -84,6 +85,7 @@ export default defineComponent({
const showpolicy = ref(false)
const visubuttBOT = ref(false)
const isalreadyReg = ref(false)
const needTelegram = ref(false)
const typePassword = ref('password')
@@ -257,6 +259,8 @@ export default defineComponent({
async function created() {
needTelegram.value = props.need_Telegram
console.log('$route.params', $route.params)
ap_iniziale.value = !!$route.params.invited ? $route.params.invited.toString() : ''
@@ -326,6 +330,13 @@ export default defineComponent({
typePassword.value = typePassword.value === 'password' ? 'text' : 'password'
}
function regEventEmail() {
// reg
visubuttBOT.value = false
needTelegram.value = false
}
created()
return {
@@ -351,6 +362,8 @@ export default defineComponent({
showPassword,
typePassword,
ap_iniziale,
regEventEmail,
needTelegram,
}
},
})

View File

@@ -1,7 +1,7 @@
<template>
<div>
<div
v-if="need_Telegram && tools.isLogged() && tools.getUsername()"
v-if="needTelegram && tools.isLogged() && tools.getUsername()"
class="text-center"
>
<q-banner rounded class="bg-green text-white" style="text-align: center">
@@ -33,28 +33,30 @@
<div v-if="!tools.isLogged() || visureg" class="text-center">
<div>
<div>
<logo mystyle="width: 60px !important; height: 60px !important; "></logo>
<logo
mystyle="width: 60px !important; height: 60px !important; "
></logo>
<div
v-if="need_Telegram"
class="mybanner"
v-html="t('pages.need_Telegram')"
></div>
<div v-if="!isalreadyReg && !(visubuttBOT && need_Telegram)">
<div v-if="!isalreadyReg && !(visubuttBOT && needTelegram)">
<CTitleBanner :title="$t('pages.SignUp')"></CTitleBanner>
</div>
</div>
</div>
<div v-if="visubuttBOT && need_Telegram" class="q-gutter-md">
<div v-if="visubuttBOT && needTelegram" class="q-gutter-md">
<q-banner
rounded
class="bg-green-5 text-white"
style="text-align: center"
>
<div class="q-ma-md">
<q-btn
<CRegistration
:invited="signup.aportador_solidario"
:regexpire="regexpire"
@regEventEmail="regEventEmail"
/>
<!--<q-btn
rounded
color="primary"
icon="fab fa-telegram"
@@ -68,7 +70,7 @@
tools.getLinkBotTelegram(signup.aportador_solidario, regexpire)
"
target="_blank"
></q-btn>
></q-btn>-->
<br />
</div>
</q-banner>
@@ -151,7 +153,9 @@
<q-input
v-model="signup.username"
:readonly="tools.getAskToVerifyReg() && !site.confpages.enableRegMultiChoice"
:readonly="
tools.getAskToVerifyReg() && !site.confpages.enableRegMultiChoice
"
rounded
outlined
@blur="v$.username.$touch"
@@ -220,7 +224,11 @@
<template v-slot:append>
<q-btn
tabindex="-1"
:icon="typePassword === `password` ? `fas fa-eye-slash` : `fas fa-eye`"
:icon="
typePassword === `password`
? `fas fa-eye-slash`
: `fas fa-eye`
"
@click="showPassword"
>
</q-btn>
@@ -247,7 +255,11 @@
<template v-slot:append>
<q-btn
tabindex="-1"
:icon="typePassword === `password` ? `fas fa-eye-slash` : `fas fa-eye`"
:icon="
typePassword === `password`
? `fas fa-eye-slash`
: `fas fa-eye`
"
@click="showPassword"
>
</q-btn>
@@ -354,7 +366,7 @@
>
</q-btn>
</div>
<br>
<br />
Già registrato?
<q-btn
class="q-ma-sm"