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

@@ -1,5 +1,5 @@
import { tools } from '@store/Modules/tools'
import { computed, defineComponent, reactive, ref, watch } from 'vue'
import { computed, defineComponent, onMounted, reactive, ref, watch } from 'vue'
import { useQuasar } from 'quasar'
import { useI18n } from '@/boot/i18n'
import { DefaultProfile, useUserStore } from '@store/UserStore'
@@ -10,7 +10,21 @@ import { useGlobalStore } from '@store/globalStore'
export default defineComponent({
name: 'CRegistration',
emits: ['regEventEmail'],
components: { },
props: {
invited: {
type: String,
required: false,
default: '',
},
regexpire: {
type: String,
required: false,
default: '',
},
},
setup(props, { emit }) {
const $q = useQuasar()
const { t } = useI18n()
@@ -36,6 +50,20 @@ export default defineComponent({
}
function mounted() {
if (props.invited) {
start.value = true
chooseReg.value = true
slide.value = 'second'
}
}
function regEventEmail() {
emit('regEventEmail', props.invited)
}
onMounted(mounted)
return {
tools,
site,
@@ -44,6 +72,7 @@ export default defineComponent({
start,
noInvited,
slide,
regEventEmail,
}
},
})

View File

@@ -101,27 +101,41 @@
style=""
class="row q-ma-sm centermydiv2 q-pa-sm justify-center"
>
<span :class="($q.dark.isActive ? `text-white`: `text-black`) + `text-h7`"
<span
v-if="!invited"
:class="
($q.dark.isActive ? `text-white` : `text-black`) +
` text-h7`
"
>Chiedi alla persona che ti ha invitato su RISO il suo
Username e poi :</span>
Username e poi :</span
>
<div class="row items-center">
<div class="col-12">
<q-btn
rounded
:type="invited ? 'a' : 'button'"
class="flex-item-btn"
icon="fab fa-telegram"
size="md"
color="primary"
:href="invited ? tools.getLinkBotTelegram(invited, regexpire) : ``"
to="/bot"
:label="$t('reg.bytelegram')"
>
<q-badge color="red" align="bottom" floating>Consigliato</q-badge>
<q-badge color="red" align="bottom" floating
>Consigliato</q-badge
>
</q-btn>
</div>
</div>
<div :class="$q.dark.isActive ? `text-white`: `text-black` + ` col-12`"
>oppure se non riesci ad installare Telegram:
</div>
<div
:class="
$q.dark.isActive ? `text-white` : `text-black` + ` col-12`
"
>
oppure se non riesci ad installare Telegram:
</div>
<q-btn
rounded
class="flex-item-btn"
@@ -130,7 +144,7 @@
size="md"
:color="$q.dark.isActive ? `black` : `white`"
:text-color="$q.dark.isActive ? `white` : `black`"
to="/signup"
@click="regEventEmail"
:label="$t('reg.byemail')"
>
</q-btn>