Togliere "in attesa di abilitazione"

Registrazione rapida (senza dover confermare, un link che scade dopo 48 ore.
This commit is contained in:
paoloar77
2022-11-02 22:32:32 +01:00
parent 83e6f92978
commit 5a3205ebda
15 changed files with 121 additions and 22 deletions

30
.env.development Executable file
View File

@@ -0,0 +1,30 @@
APP_VERSION="0.5.25"
SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet"
DIRECTORY_SERVER="freeplanet_serverside"
SERVERDIR_WEBSITE=""
SERVERPW_WEBSITE=""
APP_URL="https://localhost"
URL_FACEBOOK="https://www.facebook.com/freeplanetapp"
PROVA_PAOLO="PROVA ENV FUNZIONA!"
LANG_DEFAULT="it"
PAO_APP_ID="KKPPAA5KJK435J3KSS9F9D8S9F8SD98F9SDF"
MASTER_KEY="KKPPSS5KJK435J3KSS9F9D8S9F8SD3CR3T"
MONGODB_HOST="https://localhost:3000"
LOGO_REG='riso-logo-full.png'
TEST_NAME="Paolo"
TEST_SURNAME="Arena"
TEST_EMAIL=""
TEST_USERNAME=""
TEST_PASSWORD=""
TEST_APORTADOR=""
PUBLICKEY_PUSH='BDncvMiUZmjaCG2Kr1V9N0_33hOG-AuNSbHSvL24y2dzBiUjAxKm02emx5SeJvz2IGmtRf6YqCgopeQwCwUmZw8'
IN_CONSTRUCTION="0"
DEBUG="1"
TELEGRAM_SUPPORT=""
PROJECT_ID_MAIN="5cc0a13fe5c9d156728f400a"
TEST_CELL=""
ISTEST=1
INLOCALE=1
BAK_MONGODB_HOST="http://192.168.0.200:3000"

26
inizia_arcadei.it.sh Executable file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
site=arcadei.it
if [ -d "__freeplanet.app" ]; then
rmdir __freeplanet.app
fi
if [ -d "__riso.app" ]; then
rmdir __riso.app
fi
if [ -d "__arcadei.it" ]; then
rmdir __arcadei.it
fi
if [ -d "__popolodelnuovomondo.app" ]; then
rmdir __popolodelnuovomondo.app
fi
if [ -d "__terradellavisione.app" ]; then
rmdir __terradellavisione.app
fi
source __inizia.sh

22
inizia_riso.app.sh Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
site=riso.app
if [ -d "__freeplanet.app" ]; then
rmdir __freeplanet.app
fi
if [ -d "__riso.app" ]; then
rmdir __riso.app
fi
if [ -d "__popolodelnuovomondo.app" ]; then
rmdir __popolodelnuovomondo.app
fi
if [ -d "__terradellavisione.app" ]; then
rmdir __terradellavisione.app
fi
source __inizia.sh

View File

@@ -58,6 +58,11 @@ export default defineComponent({
required: false, required: false,
default: true, default: true,
}, },
regexpire: {
type: String,
required: false,
default: '',
},
need_Telegram: { need_Telegram: {
type: Boolean, type: Boolean,
required: false, required: false,
@@ -245,11 +250,11 @@ export default defineComponent({
console.log('$route.params', $route.params) console.log('$route.params', $route.params)
signup.aportador_solidario = !!$route.params.invited ? $route.params.invited.toString() : '' signup.aportador_solidario = !!$route.params.invited ? $route.params.invited.toString() : ''
signup.username = !!$route.params.usernameteleg ? $route.params.usernameteleg.toString() : '' signup.username = !!$route.params.usernameteleg ? $route.params.usernameteleg.toString() : ''
signup.regexpire = !!$route.params.regexpire ? $route.params.regexpire.toString() : props.regexpire
if (signup.username) if (signup.username)
isalreadyReg.value = await tools.registeredusername(signup.username); isalreadyReg.value = await tools.registeredusername(signup.username)
signup.profile.username_telegram = signup.username signup.profile.username_telegram = signup.username
if (!!$route.params.idteleg) { if (!!$route.params.idteleg) {
signup.profile.teleg_id = $route.params.idteleg ? parseInt($route.params.idteleg.toString(), 10) : 0 signup.profile.teleg_id = $route.params.idteleg ? parseInt($route.params.idteleg.toString(), 10) : 0

View File

@@ -45,17 +45,10 @@
class="bg-green-5 text-white" class="bg-green-5 text-white"
style="text-align: center;" style="text-align: center;"
> >
<span class="mybanner" v-html="t('pages.Registrazione_Con_Bot')"></span>
<CCopyBtn :title="$t('reg.invitante')" :texttocopy="signup.aportador_solidario">
</CCopyBtn>
<span class="myuserinvitante">{{}}</span>
<div class="q-ma-md"> <div class="q-ma-md">
<q-btn rounded color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.regbot', {botname: tools.getBotName() })" <q-btn rounded color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.regbot', {botname: tools.getBotName() })"
type="a" type="a"
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn> :href="tools.getLinkBotTelegram(signup.aportador_solidario, regexpire)" target="_blank"></q-btn>
<br> <br>
</div> </div>
</q-banner> </q-banner>
@@ -69,7 +62,7 @@
Vai su <b>BOT RISO</b> Telegram ed imposta l'Username di Telegram.<br><br> Vai su <b>BOT RISO</b> Telegram ed imposta l'Username di Telegram.<br><br>
<q-btn rounded color="primary" icon="fab fa-telegram" label="Apri BOT" <q-btn rounded color="primary" icon="fab fa-telegram" label="Apri BOT"
type="a" type="a"
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn> :href="tools.getLinkBotTelegram(signup.aportador_solidario, regexpire)" target="_blank"></q-btn>
<br><br> <br><br>
</div> </div>

View File

@@ -14,8 +14,9 @@
<CCardState :mytext="$t('pages.statusreg.online_today')" :myval="datastat.online_today" <CCardState :mytext="$t('pages.statusreg.online_today')" :myval="datastat.online_today"
mycolor="green" :myperc="(datastat.online_today / datastat.num_reg) * 100"></CCardState> mycolor="green" :myperc="(datastat.online_today / datastat.num_reg) * 100"></CCardState>
<CCardState :mytext="$t('pages.statusreg.autorizzare')" :myval="datastat.num_autorizzare" <!--<CCardState :mytext="$t('pages.statusreg.autorizzare')" :myval="datastat.num_autorizzare"
mycolor="yellow" :myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState> mycolor="yellow" :myperc="(datastat.num_autorizzare / datastat.num_teleg_attivo) * 100"></CCardState>
-->
<div class="q-pa-xs" v-if="datastat.num_part_accepted > 1"> <div class="q-pa-xs" v-if="datastat.num_part_accepted > 1">
<CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat> <CCardStat :mytext="$t('stat.accepted')" :myval="datastat.num_part_accepted"></CCardStat>

View File

@@ -27,7 +27,7 @@
🏁 Infine vai sul <b>BOT RISO</b> Telegram e scrivi OK nel messaggio. Ti comparirà un <strong>messaggio di Benvenuto</strong>. 🏁 Infine vai sul <b>BOT RISO</b> Telegram e scrivi OK nel messaggio. Ti comparirà un <strong>messaggio di Benvenuto</strong>.
<q-btn rounded color="primary" icon="fab fa-telegram" label="Apri il BOT" <q-btn rounded color="primary" icon="fab fa-telegram" label="Apri il BOT"
type="a" type="a"
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn> :href="tools.getLinkBotTelegram('')" target="_blank"></q-btn>
<br><br> <br><br>
Se non ci riesci vedi la <a href="https://www.nigiara.it/telegram/come-impostare-uno-username-su-telegram.htm" target="_blank">GUIDA PER IMPOSTARE Se non ci riesci vedi la <a href="https://www.nigiara.it/telegram/come-impostare-uno-username-su-telegram.htm" target="_blank">GUIDA PER IMPOSTARE

View File

@@ -18,7 +18,7 @@
<div class="q-ma-md"> <div class="q-ma-md">
<q-btn rounded color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot', {botname: tools.getBotName() })" <q-btn rounded color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot', {botname: tools.getBotName() })"
type="a" type="a"
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn> :href="tools.getLinkBotTelegram('', '')" target="_blank"></q-btn>
<br> <br>
</div> </div>
<strong v-if="!tools.TelegCode()">{{ $t('components.authentication.telegram.ifclose', {botname: tools.getBotName() })}}</strong> <strong v-if="!tools.TelegCode()">{{ $t('components.authentication.telegram.ifclose', {botname: tools.getBotName() })}}</strong>

View File

@@ -56,6 +56,7 @@ const msg_website_it = {
SignUpIscrizione: 'Diventa Socio CNM', SignUpIscrizione: 'Diventa Socio CNM',
SignUp_alreadylista: 'Registrazione per quelli che erano già nella lista di Notevole (del 2019) !', SignUp_alreadylista: 'Registrazione per quelli che erano già nella lista di Notevole (del 2019) !',
SignUp2: 'Registrazione', SignUp2: 'Registrazione',
SignUp3: 'Reg',
SignUpBot: 'Registrati', SignUpBot: 'Registrati',
SignIn: 'Login', SignIn: 'Login',
status: 'Statistiche', status: 'Statistiche',

View File

@@ -773,7 +773,7 @@ const baseroutes: IListRoutes[] = [
{ {
active: functionality.ENABLE_REGISTRATION && functionality.ENABLE_REG_NEED_TELEGRAM, active: functionality.ENABLE_REGISTRATION && functionality.ENABLE_REG_NEED_TELEGRAM,
order: 1000, order: 1000,
path: '/signup/:invited/:usernameteleg/:idteleg', path: '/signup/:invited/:usernameteleg/:idteleg/:regexpire',
materialIcon: 'how_to_reg', materialIcon: 'how_to_reg',
name: 'pages.SignUp', name: 'pages.SignUp',
component: () => import('@/views/login/signup/signup.vue'), component: () => import('@/views/login/signup/signup.vue'),
@@ -813,6 +813,17 @@ const baseroutes: IListRoutes[] = [
infooter: false, infooter: false,
separator: false separator: false
}, },
{
active: true,
order: 1002,
path: '/signup/:invited/:regexpire',
materialIcon: 'how_to_reg',
name: 'pages.SignUp3',
component: () => import('@/views/login/signup/signup.vue'),
inmenu: false,
infooter: false,
separator: false
},
{ {
active: functionality.ENABLE_REGISTRATION, active: functionality.ENABLE_REGISTRATION,
order: 2000, order: 2000,

View File

@@ -13,6 +13,7 @@ export interface ISignupOptions {
terms?: boolean terms?: boolean
aportador_solidario?: string aportador_solidario?: string
profile: IUserProfile profile: IUserProfile
regexpire?: string
// already_registered: boolean // already_registered: boolean
} }

View File

@@ -256,7 +256,7 @@ const msg_it = {
open: 'Clicca sul bottone qui sotto, si aprirà una chat Telegram speciale (chiamata BOT)', open: 'Clicca sul bottone qui sotto, si aprirà una chat Telegram speciale (chiamata BOT)',
ifclose: 'poi premi "AVVIA" o "START" e segui le istruzioni indicate.', ifclose: 'poi premi "AVVIA" o "START" e segui le istruzioni indicate.',
openbot: 'Entra qui', openbot: 'Entra qui',
regbot: '2) Clicca qui per Registrarti', regbot: 'Clicca qui per Registrarti',
}, },
login: { login: {
facebook: 'Facebook', facebook: 'Facebook',

View File

@@ -4311,12 +4311,19 @@ export const tools = {
return false return false
}, },
getLinkBotTelegram(): string { getLinkBotTelegram(aportador_solidario: string, regexpire: string): string {
let mylink = ''
if (this.isTest() && !process.env.DEV) { if (this.isTest() && !process.env.DEV) {
return this.getValDb('TELEG_BOT_LINK_TEST', false) mylink = this.getValDb('TELEG_BOT_LINK_TEST', false)
} else { } else {
return this.getValDb('TELEG_BOT_LINK', false) mylink = this.getValDb('TELEG_BOT_LINK', false)
} }
let add = ''
if (aportador_solidario) {
add = '?start=inv_' + aportador_solidario + '_ex_' + regexpire
}
return mylink + add
}, },
getBotName(): string { getBotName(): string {

View File

@@ -15,6 +15,7 @@ export default defineComponent({
const adult = ref(false) const adult = ref(false)
const invited = computed(() => $route.params.invited) const invited = computed(() => $route.params.invited)
const regexpire = computed(() => $route.params.regexpire)
// @ts-ignore // @ts-ignore
watch(() => invited, (newval, oldval) => { watch(() => invited, (newval, oldval) => {
@@ -31,6 +32,8 @@ export default defineComponent({
created() created()
return {} return {
regexpire
}
}, },
}) })

View File

@@ -1,10 +1,9 @@
<template> <template>
<q-page padding class="signup"> <q-page padding class="signup">
<CSignUp :showcell="false" :showaportador="true" :show_namesurname="false" :need_Telegram="true"> <CSignUp :showcell="false" :showaportador="true" :show_namesurname="false" :need_Telegram="true" :regexpire="regexpire">
</CSignUp> </CSignUp>
</q-page> </q-page>
</template> </template>
<script lang="ts" src="./signup.ts"> <script lang="ts" src="./signup.ts">