Verifica telegram + email
- convertito la Configurazione newsletter - Protetto le password (al load) che vengono settate in settings
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
{{myimgint}}
|
||||
<q-avatar v-if="!myimgint" class="q-mb-sx center_img" :icon="myicon" :font-size="size">
|
||||
|
||||
</q-avatar>
|
||||
|
||||
@@ -152,8 +152,18 @@ export default defineComponent({
|
||||
|
||||
if (fieldsTable.tableRemotePickup.includes(props.tablesel)) {
|
||||
// if (myvalue.value.length > 1) {
|
||||
if (mystr !== '')
|
||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr })
|
||||
try {
|
||||
if (mystr !== '')
|
||||
myarr = await globalStore.loadPickup({ table: props.tablesel, search: mystr })
|
||||
|
||||
if (myarr === null){
|
||||
abort()
|
||||
return
|
||||
}
|
||||
}catch (e) {
|
||||
abort()
|
||||
return
|
||||
}
|
||||
// const needle = val.toLocaleLowerCase()
|
||||
// optFiltered.value = optFiltered.value.filter((v: any) => v.toLocaleLowerCase().indexOf(needle) > -1)
|
||||
// }
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
<div v-if="!tools.isMobile()"><br></div>
|
||||
|
||||
showcell: {{ showcell}}
|
||||
|
||||
<!--<vue-tel-input
|
||||
v-if="showcell"
|
||||
@country-changed="intcode_change()"
|
||||
|
||||
0
src/components/CVerifyEmail/CVerifyEmail.scss
Executable file
0
src/components/CVerifyEmail/CVerifyEmail.scss
Executable file
23
src/components/CVerifyEmail/CVerifyEmail.ts
Executable file
23
src/components/CVerifyEmail/CVerifyEmail.ts
Executable file
@@ -0,0 +1,23 @@
|
||||
import { defineComponent } from 'vue'
|
||||
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CVerifyEmail',
|
||||
components: { CCopyBtn },
|
||||
props: {},
|
||||
setup() {
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
function isEmailVerified(): boolean {
|
||||
return userStore.my.verified_email!
|
||||
}
|
||||
|
||||
return {
|
||||
isEmailVerified,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
23
src/components/CVerifyEmail/CVerifyEmail.vue
Executable file
23
src/components/CVerifyEmail/CVerifyEmail.vue
Executable file
@@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="text-center q-gutter-sm q-ma-sm clBorderWarning">
|
||||
<q-chip v-if="isEmailVerified()" color="positive" text-color="white" icon="email">
|
||||
{{ `Email ` + $t('pages.statusreg.verified') }}
|
||||
</q-chip>
|
||||
<q-chip v-else color="negative" text-color="white" icon="email">
|
||||
{{ `Email ` + $t('pages.statusreg.nonverified') }}
|
||||
</q-chip>
|
||||
<div v-if="!isEmailVerified()" v-html="$t('components.authentication.email_verification.link_sent', {botname: $t('ws.botname') })">
|
||||
|
||||
</div>
|
||||
<div v-if="!isEmailVerified()" v-html="$t('components.authentication.email_verification.se_non_ricevo')">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CVerifyEmail.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CVerifyEmail.scss';
|
||||
</style>
|
||||
1
src/components/CVerifyEmail/index.ts
Executable file
1
src/components/CVerifyEmail/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CVerifyEmail} from './CVerifyEmail.vue'
|
||||
0
src/components/CVerifyTelegram/CVerifyTelegram.scss
Executable file
0
src/components/CVerifyTelegram/CVerifyTelegram.scss
Executable file
53
src/components/CVerifyTelegram/CVerifyTelegram.ts
Executable file
53
src/components/CVerifyTelegram/CVerifyTelegram.ts
Executable file
@@ -0,0 +1,53 @@
|
||||
import { defineComponent, ref, computed } from 'vue'
|
||||
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CVerifyTelegram',
|
||||
components: { CCopyBtn },
|
||||
props: {},
|
||||
setup(props, { emit }) {
|
||||
const $q = useQuasar()
|
||||
const { t } = useI18n()
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
const { setValDb, getValDb } = MixinBase()
|
||||
|
||||
function TelegCode() {
|
||||
if (userStore.my.profile) {
|
||||
return userStore.my.profile.teleg_checkcode
|
||||
}else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
function TelegVerificato(): boolean {
|
||||
return userStore.my.profile ? userStore.my.profile.teleg_id! > 0 : false
|
||||
}
|
||||
|
||||
function getLinkBotTelegram(): string {
|
||||
return getValDb('TELEG_BOT_LINK', false)
|
||||
}
|
||||
function getBotNameTelegram() {
|
||||
return t('ws.botname');
|
||||
}
|
||||
|
||||
function isEmailVerified(): boolean {
|
||||
return userStore.my.verified_email!
|
||||
}
|
||||
|
||||
return {
|
||||
TelegCode,
|
||||
TelegVerificato,
|
||||
getLinkBotTelegram,
|
||||
isEmailVerified,
|
||||
getBotNameTelegram,
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
39
src/components/CVerifyTelegram/CVerifyTelegram.vue
Executable file
39
src/components/CVerifyTelegram/CVerifyTelegram.vue
Executable file
@@ -0,0 +1,39 @@
|
||||
<template>
|
||||
<div class="text-center q-gutter-sm q-ma-sm clBorderWarning">
|
||||
<div v-if="TelegCode() > 0">
|
||||
<div class="text-h5 text-center text-red">
|
||||
{{ $t('reg.teleg_auth') }} Telegram:
|
||||
</div>
|
||||
|
||||
<CCopyBtn :title="$t('reg.click_per_copiare')" :texttocopy="TelegCode()">
|
||||
|
||||
</CCopyBtn>
|
||||
|
||||
<div class="text-h6 text-center" v-html="$t('reg.teleg_torna_sul_bot', {botname: getBotNameTelegram()})">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="!TelegVerificato()" class="q-pa-sm q-gutter-sm">
|
||||
<div v-if="!TelegCode()"><strong>{{ $t('components.authentication.telegram.open')}}</strong></div>
|
||||
<div class="q-ma-md">
|
||||
<q-btn rounded color="primary" icon="fab fa-telegram" :label="$t('components.authentication.telegram.openbot', {botname: $t('ws.botname') })"
|
||||
type="a"
|
||||
:href="getLinkBotTelegram()" target="_blank"></q-btn>
|
||||
<br>
|
||||
</div>
|
||||
<strong>{{ $t('components.authentication.telegram.ifclose', {botname: getBotNameTelegram() })}}</strong>
|
||||
<div class="q-my-sm">
|
||||
<q-img src="statics/images/ayni_bot.jpg" class="" :alt="$t('ws.sitename')" style="height: 100px; width: 250px;">
|
||||
</q-img>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./CVerifyTelegram.ts">
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import './CVerifyTelegram.scss';
|
||||
</style>
|
||||
1
src/components/CVerifyTelegram/index.ts
Executable file
1
src/components/CVerifyTelegram/index.ts
Executable file
@@ -0,0 +1 @@
|
||||
export {default as CVerifyTelegram} from './CVerifyTelegram.vue'
|
||||
@@ -196,8 +196,10 @@
|
||||
}}
|
||||
</div>
|
||||
|
||||
<!--<span class="text-white" v-if="Verificato"> {{t('reg.verificato')}} </span>-->
|
||||
<!--<span class="text-white background-red" v-else> {{t('reg.non_verificato')}} </span>-->
|
||||
<div class="text-center">
|
||||
<span class="text-white" v-if="Verificato()"> {{t('reg.verificato')}} </span>
|
||||
<span class="text-white background-red" v-else> {{t('reg.non_verificato')}} </span>
|
||||
</div>
|
||||
|
||||
<div v-if="isLogged()" id="user-actions" class="column justify-center q-gutter-sm q-ma-sm center-150">
|
||||
<q-btn rounded color="primary" icon="person" to="/profile">{{ t('pages.profile') }}</q-btn>
|
||||
|
||||
@@ -33,4 +33,6 @@ export * from './CEventsCalendar'
|
||||
export * from './CMySingleEvent'
|
||||
// export * from './PagePolicy'
|
||||
export * from './CFacebookFrame'
|
||||
export * from './CVerifyEmail'
|
||||
export * from './CVerifyTelegram'
|
||||
// export * from './CPreloadImages'
|
||||
|
||||
Reference in New Issue
Block a user