Se la window viene attivata, e se sono in fase di registrazione, allora controllo se ci sono aggiornamenti ogni 10 secondi, loadSite
Corretto che il link di registrazione se era in minuscolo l'username e venivi registrato in maiuscolo, non lo prendeva. L'immagine di telegram occorre salvare anche la versione SMALL Corretto filtro, se cambiavo Regione, non mi resettava la Provincia e la Città
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.7"
|
||||
APP_VERSION="0.3.8"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.7"
|
||||
APP_VERSION="0.3.8"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.7"
|
||||
APP_VERSION="0.3.8"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="12"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.7"
|
||||
APP_VERSION="0.3.8"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL="newfreeplanet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
APP_VERSION="0.3.7"
|
||||
APP_VERSION="0.3.8"
|
||||
SERVICE_WORKER_FILE="service-worker.js"
|
||||
APP_ID="13"
|
||||
DIRECTORY_LOCAL=newfreeplanet
|
||||
|
||||
@@ -240,6 +240,7 @@ module.exports = configure((ctx) => ({
|
||||
'Notify',
|
||||
'Cookies',
|
||||
'Loading',
|
||||
'AppVisibility',
|
||||
],
|
||||
iconSet: 'fontawesome-v5',
|
||||
lang: 'it', // Quasar language
|
||||
|
||||
25
src/App.ts
25
src/App.ts
@@ -71,30 +71,7 @@ export default {
|
||||
|
||||
if (chiamaautologin) {
|
||||
// console.log('CHIAMA autologin_FromLocalStorage')
|
||||
await userStore.autologin_FromLocalStorage($router)
|
||||
.then((loadstorage: any) => {
|
||||
if (loadstorage) {
|
||||
|
||||
if ($q.screen.gt.sm) {
|
||||
globalStore.setleftDrawerOpen(true)
|
||||
}
|
||||
|
||||
/*if (toolsext.getLocale() !== '') {
|
||||
// console.log('SETLOCALE :', this.$i18n.locale)
|
||||
$i18n.locale = toolsext.getLocale() // Set Lang
|
||||
} else {
|
||||
userStore.setlang($router, this.$i18n.locale)
|
||||
}*/
|
||||
|
||||
|
||||
// console.log('lang CARICATO:', this.$i18n.locale)
|
||||
|
||||
//++Todo PWA: globalroutines('loadapp', '')
|
||||
|
||||
// Create Subscription to Push Notification
|
||||
globalStore.createPushSubscription()
|
||||
}
|
||||
})
|
||||
await userStore.autologin_FromLocalStorage($router, $q)
|
||||
} else {
|
||||
globalStore.finishLoading = true
|
||||
}
|
||||
|
||||
@@ -10,14 +10,23 @@
|
||||
<div class="text-h6 text-center">
|
||||
Accedi al menu inserendo le tue credenziali per entrare 🔑<br>
|
||||
<div class="text-center">
|
||||
<q-btn color="white" text-color="blue" label="Clicca qui per Accedere" @click="tools.openrighttoolbar()"/>
|
||||
<q-btn push color="white" text-color="blue" label="Clicca qui per Accedere" @click="tools.openrighttoolbar()"/>
|
||||
</div>
|
||||
<br>
|
||||
📝 Non sei <strong>Registrato</strong>?<br>
|
||||
👉🏻 Chiedi in chat il link a chi ti ha <strong>invitato</strong>.<br>
|
||||
👉🏻 Chiedi in chat il link a chi ti ha <strong>invitato</strong><br>
|
||||
oppure chiedi sul <a href="https://riso.app/gruppi_territoriali">Gruppo Territoriale di RISO</a> scegliendo la tua provincia !
|
||||
</div>
|
||||
<br>
|
||||
</q-banner>
|
||||
<q-banner rounded class="bg-green-8 text-white">
|
||||
<div class="text-h6 text-center">
|
||||
Visualizza le FAQ (Risposte alle domande più frequenti)<br>
|
||||
<div class="text-center">
|
||||
<q-btn color="white" push glossy text-color="black" label="Apri le FAQ" to="/faq"/>
|
||||
</div>
|
||||
</div>
|
||||
</q-banner>
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
@@ -335,6 +335,52 @@ export default defineComponent({
|
||||
|
||||
}
|
||||
|
||||
function setProvinceByRegion(tableprov: string, tabregion: string, newval: any) {
|
||||
|
||||
const recRegion = searchList.value.find((rec) => rec.table === tabregion)
|
||||
if (recRegion)
|
||||
tools.setCookie(tools.COOK_SEARCH + tabregion, newval)
|
||||
|
||||
for (const item of searchList.value) {
|
||||
if (item.table === tableprov) {
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + tableprov + '_' + newval, costanti.FILTER_TUTTI)
|
||||
const rec = searchList.value.find((rec) => rec.table === tableprov) // check if exist
|
||||
let trovato = false
|
||||
let arrvalues = []
|
||||
if (rec) {
|
||||
arrvalues = valoriopt.value(rec.value, false, false)
|
||||
if (arrvalues)
|
||||
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
||||
}
|
||||
if (valsaved && trovato)
|
||||
item.value = valsaved
|
||||
else {
|
||||
if (arrvalues) {
|
||||
item.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
}
|
||||
} else if (item.table === toolsext.TABCITIES) {
|
||||
const valsaved = tools.getCookie(tools.COOK_SEARCH + toolsext.TABCITIES + '_' + newval, costanti.FILTER_TUTTI)
|
||||
const rec = searchList.value.find((rec) => rec.table === toolsext.TABCITIES) // check if exist
|
||||
let trovato = false
|
||||
let arrvalues = []
|
||||
if (rec) {
|
||||
arrvalues = valoriopt.value(rec.value, false, false)
|
||||
if (arrvalues)
|
||||
trovato = arrvalues.find((rec: any) => rec[rec.key] === valsaved)
|
||||
}
|
||||
if (valsaved && trovato)
|
||||
item.value = valsaved
|
||||
else {
|
||||
if (arrvalues) {
|
||||
item.value = costanti.FILTER_TUTTI
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function searchval(newval: any, table: any) {
|
||||
console.log('searchval', newval, table)
|
||||
tools.setCookie(tools.COOK_SEARCH + table, newval)
|
||||
@@ -346,6 +392,8 @@ export default defineComponent({
|
||||
}
|
||||
} else if (table === toolsext.TABSECTORS) {
|
||||
setCategBySector(toolsext.TABSKILLS, table, newval)
|
||||
} else if (table === toolsext.TABREGIONS) {
|
||||
setProvinceByRegion(toolsext.TABPROVINCE, table, newval)
|
||||
}else if (table === 'goods') {
|
||||
setCategBySector('sectorgoods', table, newval)
|
||||
}
|
||||
|
||||
@@ -9,14 +9,14 @@ import { useQuasar } from 'quasar'
|
||||
|
||||
import { Chart, ChartData, ChartOptions, registerables } from 'chart.js'
|
||||
|
||||
import { LineChart, useLineChart } from 'vue-chart-3'
|
||||
import { BarChart, useBarChart } from 'vue-chart-3'
|
||||
|
||||
|
||||
Chart.register(...registerables)
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CLineChart',
|
||||
components: { LineChart },
|
||||
name: 'CBarChart',
|
||||
components: { BarChart },
|
||||
props: {
|
||||
mydata: { required: false, default: [] },
|
||||
title: { required: false, default: false },
|
||||
@@ -38,14 +38,14 @@ export default defineComponent({
|
||||
const myarrsum = ref(<any>[])
|
||||
|
||||
// @ts-ignore
|
||||
const chartData = computed<ChartData<'line'>>(() => ({
|
||||
const chartData = computed<ChartData<'bar'>>(() => ({
|
||||
labels: myarrlabel.value,
|
||||
datasets: [
|
||||
{
|
||||
/*{
|
||||
label: 'Totali',
|
||||
data: myarrsum.value,
|
||||
backgroundColor: tools.colourNameToHex('green'),
|
||||
},
|
||||
},*/
|
||||
{
|
||||
label: props.title,
|
||||
data: myarrdata.value,
|
||||
@@ -56,18 +56,20 @@ export default defineComponent({
|
||||
],
|
||||
}))
|
||||
|
||||
const options = computed<ChartOptions<'line'>>(() => ({
|
||||
elements: {
|
||||
line: {
|
||||
tension: 0.4
|
||||
}
|
||||
const options = computed<ChartOptions<'bar'>>(() => ({
|
||||
bar: {
|
||||
},
|
||||
interaction: {
|
||||
intersect: false
|
||||
},
|
||||
scales: {
|
||||
y: {
|
||||
beginAtZero: true
|
||||
}
|
||||
}
|
||||
}))
|
||||
|
||||
const { lineChartProps, lineChartRef } = useLineChart({
|
||||
const { barChartProps, barChartRef } = useBarChart({
|
||||
chartData,
|
||||
options,
|
||||
|
||||
@@ -84,7 +86,7 @@ export default defineComponent({
|
||||
|
||||
let rec: any
|
||||
|
||||
let ind = 1
|
||||
let ind = ''
|
||||
|
||||
for (rec of props.mydata) {
|
||||
if (props.sum) {
|
||||
@@ -92,11 +94,14 @@ export default defineComponent({
|
||||
} else {
|
||||
somma = rec.count
|
||||
}
|
||||
|
||||
let day = rec._id.split('-')
|
||||
ind = day[2] + '/' + day[1]
|
||||
//myarrlabel.value.push(rec._id)
|
||||
myarrlabel.value.push(ind)
|
||||
myarrdata.value.push(rec.count)
|
||||
myarrsum.value.push(somma)
|
||||
ind++
|
||||
// ind++
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,8 +116,8 @@ export default defineComponent({
|
||||
getoffset,
|
||||
q,
|
||||
options,
|
||||
lineChartProps,
|
||||
lineChartRef,
|
||||
barChartProps,
|
||||
barChartRef,
|
||||
myarrdata,
|
||||
myarrlabel,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<LineChart v-bind="lineChartProps" />
|
||||
<BarChart v-bind="barChartProps" />
|
||||
<!--<DoughnutChart ref="doughnutRef" :chartData="objdata" :options="options" />-->
|
||||
|
||||
|
||||
|
||||
@@ -12,17 +12,17 @@
|
||||
<q-banner
|
||||
v-if="!tools.isUsernameTelegOk()"
|
||||
inline-actions rounded class="bg-green-4 text-black">
|
||||
<br>🔑 Ora torna su Telegram ed imposta l'<b>Username di Telegram</b>:<br>
|
||||
<div class="text-subtitle1">🔑 E' necessario ora impostare un <b>Username su Telegram</b>:</div>
|
||||
|
||||
💬 In questo modo le persone potranno contattarti (sia su Telegram sia dalla APP) <strong>senza aver bisogno di condividere il tuo numero di cellulare</strong>.<br>
|
||||
<br>
|
||||
💬 In questo modo le persone potranno contattarti su Telegram senza aver bisogno del tuo numero di cellulare, e potranno farlo anche dalla APP.<br>
|
||||
<br>
|
||||
👉🏻 1. Su telegram premi sull'icona (tre linee orizzontali) del menu principale in alto a sinistra.<br>
|
||||
👉🏻 1. Vai su Telegram, e nella pagina iniziale (dove vedi tutte le chat), premi sull'icona (tre linee orizzontali) del menu principale in alto a sinistra.<br>
|
||||
👉🏻 2. Seleziona la voce <b>Impostazioni</b> nel menu.<br>
|
||||
👉🏻 3.Premi su <b>Username</b> nella sezione account.<br>
|
||||
👉🏻 4. Digita il tuo username. (deve essere un nome ancora libero e non già usato da altri).<br>
|
||||
👉🏻 3. Premi su <b>Username</b> nella sezione account.<br>
|
||||
👉🏻 4. Digita un <strong>username qualsiasi</strong> a tua scelta (deve essere un nome ancora libero e non già usato da altri, <u>non deve per forza coincidere con l'username che hai scelto per la APP</u>).<br>
|
||||
👉🏻 5. Per confermare premi sull'icona con la spunta (V) in alto a destra.<br>
|
||||
|
||||
🏁 Infine vai sul <b>BOT RISO</b> Telegram e scrivi OK nel messaggio.
|
||||
🏁 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"
|
||||
type="a"
|
||||
:href="tools.getLinkBotTelegram()" target="_blank"></q-btn>
|
||||
@@ -32,6 +32,10 @@
|
||||
L'USERNAME SU TELEGRAM</a><br>
|
||||
<br>
|
||||
|
||||
Se hai difficoltà, contatta la Chat del Supporto Tecnico: "Help - RISO"
|
||||
<br><strong>CLICCANDO QUI</strong> 👉🏻 <a href="https://t.me/+dTHFNIwkc_phNmQ8" target="_blank"><strong>Help - RISO</strong></a>
|
||||
<br><br>
|
||||
|
||||
</q-banner>
|
||||
<q-banner v-else
|
||||
inline-actions rounded class="bg-orange text-black">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { defineComponent, ref, computed } from 'vue'
|
||||
import { defineComponent, ref, computed, onMounted, watch, onBeforeUnmount } from 'vue'
|
||||
|
||||
import MixinBase from '@src/mixins/mixin-base'
|
||||
import { CCopyBtn } from '../CCopyBtn'
|
||||
@@ -6,6 +6,7 @@ import { useUserStore } from '@store/UserStore'
|
||||
import { useQuasar } from 'quasar'
|
||||
import { useI18n } from '@/boot/i18n'
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'CVerifyTelegram',
|
||||
@@ -16,7 +17,58 @@ export default defineComponent({
|
||||
const { t } = useI18n()
|
||||
|
||||
const userStore = useUserStore()
|
||||
const $router = useRouter()
|
||||
|
||||
const polling = ref()
|
||||
|
||||
|
||||
watch(() => $q.appVisible, (value: any, oldval: any) => {
|
||||
console.log('visible', value)
|
||||
|
||||
if (value && !oldval) {
|
||||
// console.log('Ora è visibile !')
|
||||
start()
|
||||
}
|
||||
if (!value && oldval) {
|
||||
// console.log('Ora è invisibile !')
|
||||
end()
|
||||
}
|
||||
})
|
||||
|
||||
function refresh() {
|
||||
console.log('refresh')
|
||||
userStore.autologin_FromLocalStorage($router, $q)
|
||||
}
|
||||
|
||||
function load() {
|
||||
start()
|
||||
}
|
||||
|
||||
function start() {
|
||||
refresh()
|
||||
if (tools.notFinishReg()) {
|
||||
if (!polling.value) {
|
||||
polling.value = setInterval(() => {
|
||||
refresh()
|
||||
}, 10000)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function end() {
|
||||
if (polling.value) {
|
||||
clearInterval(polling.value)
|
||||
polling.value = null
|
||||
}
|
||||
}
|
||||
|
||||
function beforeDestroy() {
|
||||
end()
|
||||
}
|
||||
|
||||
onMounted(load)
|
||||
onBeforeUnmount(beforeDestroy)
|
||||
|
||||
return {
|
||||
tools,
|
||||
|
||||
@@ -2661,7 +2661,7 @@ export const fieldsTable = {
|
||||
value: 'provinces',
|
||||
label: 'Provincia',
|
||||
columns: colProvinces,
|
||||
colkey: '_id',
|
||||
colkey: 'prov',
|
||||
collabel: 'descr',
|
||||
remote: true,
|
||||
},
|
||||
|
||||
@@ -4141,7 +4141,7 @@ export const tools = {
|
||||
return userStore.my.username
|
||||
else
|
||||
return false
|
||||
}catch (e) {
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
@@ -5033,6 +5033,10 @@ export const tools = {
|
||||
return userStore.isUsernameTelegOk()
|
||||
},
|
||||
|
||||
notFinishReg() {
|
||||
return !this.isUserOk()
|
||||
},
|
||||
|
||||
getParamsByTable(table: string) {
|
||||
|
||||
let obj = {
|
||||
@@ -5277,15 +5281,15 @@ export const tools = {
|
||||
const mycolchiaro = tools.colourNameToHex(newcol)
|
||||
|
||||
return 'background: ' + mycol +
|
||||
' background: -webkit-linear-gradient('+degree+'deg, ' + mycol + ', ' + mycolchiaro + ') !important; ' +
|
||||
' background: linear-gradient('+degree+'deg, ' + mycol + ', ' + mycolchiaro + ') !important;'
|
||||
' background: -webkit-linear-gradient(' + degree + 'deg, ' + mycol + ', ' + mycolchiaro + ') !important; ' +
|
||||
' background: linear-gradient(' + degree + 'deg, ' + mycol + ', ' + mycolchiaro + ') !important;'
|
||||
},
|
||||
|
||||
getCurrentUrl(){
|
||||
getCurrentUrl() {
|
||||
return window.location.pathname
|
||||
},
|
||||
|
||||
isCurrentUrlSignUp(){
|
||||
isCurrentUrlSignUp() {
|
||||
return window.location.pathname.indexOf('signup') >= 0
|
||||
},
|
||||
|
||||
|
||||
@@ -62,6 +62,9 @@ export const toolsext = {
|
||||
TABMYGROUPS: 'mygroups',
|
||||
TABSKILLS: 'skills',
|
||||
TABSECTORS: 'sectors',
|
||||
TABREGIONS: 'regions',
|
||||
TABCITIES: 'cities',
|
||||
TABPROVINCE: 'provinces',
|
||||
TABMYSKILLS: 'myskills',
|
||||
TABMYGOODS: 'mygoods',
|
||||
TABMYBACHECAS: 'mybachecas',
|
||||
|
||||
@@ -263,7 +263,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
},
|
||||
|
||||
isUserOk(): boolean {
|
||||
return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
return this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador! && this.isUsernameTelegOk()
|
||||
// return this.my.verified_email! && this.my.profile.teleg_id! > 0 && this.my.verified_by_aportador!
|
||||
},
|
||||
|
||||
@@ -838,7 +838,7 @@ export const useUserStore = defineStore('UserStore', {
|
||||
// console.log('setGlobal: END')
|
||||
},
|
||||
|
||||
async autologin_FromLocalStorage($router: Router) {
|
||||
async autologin_FromLocalStorage($router: Router, $q: any) {
|
||||
try {
|
||||
const globalStore = useGlobalStore()
|
||||
|
||||
@@ -903,6 +903,27 @@ export const useUserStore = defineStore('UserStore', {
|
||||
}
|
||||
|
||||
return await this.setGlobal($router, isLogged)
|
||||
.then((loadstorage: any) => {
|
||||
if (loadstorage) {
|
||||
|
||||
if ($q.screen.gt.sm) {
|
||||
globalStore.setleftDrawerOpen(true)
|
||||
}
|
||||
|
||||
/*if (toolsext.getLocale() !== '') {
|
||||
// console.log('SETLOCALE :', this.$i18n.locale)
|
||||
$i18n.locale = toolsext.getLocale() // Set Lang
|
||||
} else {
|
||||
userStore.setlang($router, this.$i18n.locale)
|
||||
}*/
|
||||
|
||||
|
||||
//++Todo PWA: globalroutines('loadapp', '')
|
||||
|
||||
// Create Subscription to Push Notification
|
||||
globalStore.createPushSubscription()
|
||||
}
|
||||
})
|
||||
|
||||
// console.log('autologin _id STATE ', this._id)
|
||||
|
||||
|
||||
@@ -537,7 +537,7 @@ export const useGlobalStore = defineStore('GlobalStore', {
|
||||
}
|
||||
},
|
||||
|
||||
createPushSubscription() {
|
||||
async createPushSubscription() {
|
||||
|
||||
// If Already subscribed, don't send to the Server DB
|
||||
// if (state.wasAlreadySubOnDb) {
|
||||
|
||||
Reference in New Issue
Block a user