++ diffusori

fixed user chip
This commit is contained in:
Surya Paolo
2022-12-11 02:57:45 +01:00
parent 955c4daaa1
commit cf990db03a
20 changed files with 148 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="13" APP_ID="13"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="16" APP_ID="16"
DIRECTORY_LOCAL=newfreeplanet DIRECTORY_LOCAL=newfreeplanet

View File

@@ -1,4 +1,4 @@
APP_VERSION="0.5.32" APP_VERSION="0.5.33"
SERVICE_WORKER_FILE="service-worker.js" SERVICE_WORKER_FILE="service-worker.js"
APP_ID="14" APP_ID="14"
DIRECTORY_LOCAL="newfreeplanet" DIRECTORY_LOCAL="newfreeplanet"

View File

@@ -31,6 +31,7 @@
<q-select <q-select
v-model="tablesel" v-model="tablesel"
:options="optionsMainCards" :options="optionsMainCards"
dark
emit-value emit-value
borderless borderless
map-options map-options
@@ -93,6 +94,7 @@
label-color="white" label-color="white"
myclass="comboselector" myclass="comboselector"
color="primary" color="primary"
dark
:dense="true" :dense="true"
:icon_alternative="item.icon" :icon_alternative="item.icon"
:optval="fieldsTable.getKeyByTable(item.table)" :optval="fieldsTable.getKeyByTable(item.table)"
@@ -123,6 +125,7 @@
@update:arrvalue="searchval(item.arrvalue, item.table)" @update:arrvalue="searchval(item.arrvalue, item.table)"
:addall="item.addall" :addall="item.addall"
:addnone="item.addnone" :addnone="item.addnone"
dark
:addlast="true" :addlast="true"
:tablesel="item.tablesel" :tablesel="item.tablesel"
:pickup="true" :pickup="true"
@@ -147,6 +150,7 @@
:label="labelcombo(item)" :label="labelcombo(item)"
@update:model-value="searchval(item.arrvalue, item.table)" @update:model-value="searchval(item.arrvalue, item.table)"
rounded rounded
dark
dense dense
outlined outlined
multiple multiple

View File

@@ -535,8 +535,7 @@
/> />
</template> </template>
<span class="mybanner" <span class="mybanner"
>Per Aggiornare alla nuova versione, chiudere e riaprire la APP (o >Aggiornamento APP in corso ... Se dopo 1 minuto non dovesse scomparire questo messaggio, chiudere e riaprire la pagina.</span
il browser)</span
> >
</q-banner> </q-banner>
</div> </div>

View File

@@ -85,6 +85,7 @@
<span class="extrafield">{{ $t(col.extrafield) }}</span> <span class="extrafield">{{ $t(col.extrafield) }}</span>
</span> </span>
<div <div
v-if=" v-if="
(col.tipovisu === costanti.TipoVisu.LINK || (col.tipovisu === costanti.TipoVisu.LINK ||
@@ -106,14 +107,14 @@
> >
<q-item-section avatar> <q-item-section avatar>
<q-avatar round size="48px"> <q-avatar round size="48px">
<img :src="userStore.getImgByProfile(row)" /> <img :src="userStore.getImgByProfile(row, true, col)" />
<q-badge v-if="tools.isUserOnline(row)" align="top" floating color="green">online</q-badge> <q-badge v-if="tools.isUserOnline(row, col)" align="top" floating color="green">online</q-badge>
</q-avatar> </q-avatar>
</q-item-section> </q-item-section>
<q-item-section class=""> <q-item-section class="">
<q-item-label>{{ tools.getNameToShow(row) }}</q-item-label> <q-item-label>{{ tools.getNameToShow(row, col) }}</q-item-label>
<q-item-label caption>{{ <q-item-label caption>{{
tools.getUserNameOnlyIfToShow(row) tools.getUserNameOnlyIfToShow(row, col)
}}</q-item-label> }}</q-item-label>
</q-item-section> </q-item-section>
<q-item-section side></q-item-section> <q-item-section side></q-item-section>

View File

@@ -20,14 +20,14 @@
</CCurrencyValue> </CCurrencyValue>
<div v-if="!small && account && account.notifspending && account.notifspending.length > 0" :class="`text-h5 bordo_stondato_stretto full-width`" <div v-if="!small && account && account.notifspending && account.notifspending.length > 0" :class="`text-h5 full-width`"
:style="(!$q.screen.lt.sm ? `min-width: 250px; ` : ``) + (color_border ? `border-color: ` + color_border + `!important;`: '')"> :style="(!$q.screen.lt.sm ? `min-width: 250px; ` : ``) + (color_border ? `border-color: ` + color_border + `!important;`: '')">
<div class="text-center text-h7-dense text-italic text-grey-14"> <div class="text-center text-h7-dense text-italic text-grey-14">
{{ t('movement.pendingtransaction') }} {{ t('movement.pendingtransaction') }}
</div> </div>
<div v-for="(myrec, index) in account.notifspending" :key="myrec._id"> <div v-for="(myrec, index) in account.notifspending" :key="myrec._id">
<div class="row justify-evenly items-center bordo_stondato_pending"> <q-card class="row justify-evenly items-center">
<span v-for="(mycol, indcol) of colTableNotifCoins" :key="indcol"> <span v-for="(mycol, indcol) of colTableNotifCoins" :key="indcol">
<div <div
class="col" class="col"
@@ -46,7 +46,7 @@
</CMyFieldRec> </CMyFieldRec>
</div> </div>
</span> </span>
</div> </q-card>
</div> </div>
</div> </div>

View File

@@ -0,0 +1,3 @@
.index_diffusore {
font-size: 1rem;
}

View File

@@ -60,6 +60,7 @@ export default defineComponent({
num_teleg_pending: 0, num_teleg_pending: 0,
lastsreg: [], lastsreg: [],
lastsonline: [], lastsonline: [],
diffusorilist: [],
checkuser: { verified_email: false } checkuser: { verified_email: false }
}) })
@@ -81,6 +82,9 @@ export default defineComponent({
const lastsonline = computed(() => { const lastsonline = computed(() => {
return datastat.value.lastsonline return datastat.value.lastsonline
}) })
const diffusorilist = computed(() => {
return datastat.value.diffusorilist
})
watch(() => $q.appVisible, (value: any, oldval: any) => { watch(() => $q.appVisible, (value: any, oldval: any) => {
// console.log('visible', value) // console.log('visible', value)
@@ -197,6 +201,7 @@ export default defineComponent({
emailnonverif, emailnonverif,
lastsreg, lastsreg,
lastsonline, lastsonline,
diffusorilist,
datastat, datastat,
tools, tools,
costanti, costanti,

View File

@@ -54,8 +54,21 @@
<div class="column animazione"> <div class="column animazione">
<q-tabs v-model="mytab" class="text-blue"> <q-tabs v-model="mytab" class="text-blue">
<q-tab name="reg" :label="$t('pages.statusreg.newreg')" /> <q-tab
<q-tab name="online" :label="$t('pages.statusreg.onlineusers')" /> name="reg"
:label="$t('pages.statusreg.newreg')"
icon="fas fa-user-plus"
/>
<q-tab
name="online"
:label="$t('pages.statusreg.onlineusers')"
icon="fas fa-wifi"
/>
<q-tab
name="diffusori"
:label="$t('pages.statusreg.diffusori')"
icon="fas fa-medal"
/>
</q-tabs> </q-tabs>
<q-tab-panels v-model="mytab" animated> <q-tab-panels v-model="mytab" animated>
@@ -142,6 +155,60 @@
</q-list> </q-list>
</div> </div>
</q-tab-panel> </q-tab-panel>
<q-tab-panel name="diffusori">
<div class="q-pa-md" style="max-width: 300px">
<div class="text-center text-bold text-h6">I Migliori Invitanti su RISO:</div>
<div class="text-center"> Indica il numero di persone registrate tramite il link d'invito personale.
</div>
<q-list bordered>
<transition-group
name="fade"
mode="out-in"
appear
enter-active-class="animazione fadeIn"
leave-active-class="animazione fadeOut"
>
<q-item
v-for="(user, index) in diffusorilist"
:key="index"
class="animated chip_shadow q-ma-sm"
clickable
v-ripple
@click="gotoPage(`/my/${user.username}`)"
>
<q-item-section avatar>
<q-avatar round size="48px">
<img :src="userStore.getImgByProfile(user)" />
<q-badge
v-if="tools.isUserOnline(user)"
align="top"
floating
color="green"
>online</q-badge
>
</q-avatar>
</q-item-section>
<q-item-section class="">
<q-item-label overline>
<div class="index_diffusore">{{ index + 1 }}°</div>
</q-item-label>
<q-item-label>
{{ tools.getNameToShow(user) }}</q-item-label
>
<q-item-label caption>{{
tools.getUserNameOnlyIfToShow(user)
}}</q-item-label>
</q-item-section>
<q-item-section side
><span class="text-h6 q-mr-sm">{{
user.count
}}</span></q-item-section
>
</q-item>
</transition-group>
</q-list>
</div>
</q-tab-panel>
</q-tab-panels> </q-tab-panels>
</div> </div>

View File

@@ -6,7 +6,7 @@
</CVerifyTelegram> </CVerifyTelegram>
--> -->
<div v-if="site.confpages.enableRegMultiChoice"> <div v-if="tools.isLogged() && site.confpages.enableRegMultiChoice">
<CVerifyEmail v-if="!tools.isEmailVerified() && !tools.TelegVerificato()"> <CVerifyEmail v-if="!tools.isEmailVerified() && !tools.TelegVerificato()">
</CVerifyEmail> </CVerifyEmail>
</div> </div>

View File

@@ -818,9 +818,8 @@ h3 {
border: solid 2px #49b502; border: solid 2px #49b502;
} }
.bordo_stondato_pending { .bordo_stondato_pending, .bordo_quadrato_pending {
margin: 4px; margin: 4px;
border-radius: 3rem;
padding-left: 14px; padding-left: 14px;
padding-right: 14px; padding-right: 14px;
padding-top: 0px; padding-top: 0px;
@@ -828,6 +827,10 @@ h3 {
border: solid 1px #4a6598; border: solid 1px #4a6598;
} }
.bordo_stondato_pending {
border-radius: 3rem;
}
.bordo_stondato_circuiti { .bordo_stondato_circuiti {
margin: 4px; margin: 4px;
border-radius: 1.15rem; border-radius: 1.15rem;
@@ -1311,6 +1314,7 @@ h3 {
.last_access { .last_access {
opacity: 0.7; opacity: 0.7;
margin-top: -10px; margin-top: -10px;
color: white;
z-index: 1000; z-index: 1000;
margin-bottom: 5px; margin-bottom: 5px;
padding: 5px; padding: 5px;

View File

@@ -99,8 +99,9 @@ const msg_website_it = {
autorizzare: 'In attesa di Abilitazione', autorizzare: 'In attesa di Abilitazione',
passeggeri: 'Passeggeri Navi', passeggeri: 'Passeggeri Navi',
giainlista: 'Gia in Lista', giainlista: 'Gia in Lista',
newreg: 'Ultimi Registrati', newreg: 'Registrati',
onlineusers: 'Utenti OnLine', onlineusers: 'OnLine',
diffusori: 'Diffusori',
nationality: 'Nazionalità', nationality: 'Nazionalità',
nationality_born: 'Nazione di Nascita', nationality_born: 'Nazione di Nascita',
verified: 'Verificata', verified: 'Verificata',

View File

@@ -33,6 +33,7 @@ export interface INotData {
arr_nations?: string arr_nations?: string
lastsreg?: IUserFields[] lastsreg?: IUserFields[]
lastsonline?: IUserFields[] lastsonline?: IUserFields[]
diffusorilist?: IUserFields[]
checkuser?: ICheckUser | any checkuser?: ICheckUser | any
numreg_untilday?: number numreg_untilday?: number
reg_daily?: string reg_daily?: string

View File

@@ -3614,7 +3614,7 @@ export const tools = {
return date.addToDate(mydate, { days }) return date.addToDate(mydate, { days })
}, },
isUserOnline(user: IUserFields) { isUserOnline(user: IUserFields, col: any = null) {
const dateonline = tools.addDays(tools.getDateNow(), -1) const dateonline = tools.addDays(tools.getDateNow(), -1)
return user.lasttimeonline && new Date(user.lasttimeonline).getTime() > dateonline.getTime() return user.lasttimeonline && new Date(user.lasttimeonline).getTime() > dateonline.getTime()
}, },
@@ -7344,18 +7344,18 @@ export const tools = {
return '' return ''
}, },
getNameToShow(user: IUserFields): string { getNameToShow(user: IUserFields, col: any = null): string {
const userStore = useUserStore() const userStore = useUserStore()
let name = userStore.getNameToShow(user) let name = userStore.getNameToShow(user, col)
return name return name
}, },
getUserNameOnlyIfToShow(user: IUserFields): string { getUserNameOnlyIfToShow(user: IUserFields, col: any = null): string {
const userStore = useUserStore() const userStore = useUserStore()
let name = userStore.getUserNameOnlyIfToShow(user) let name = userStore.getUserNameOnlyIfToShow(user, col)
return name return name
}, },

View File

@@ -304,16 +304,20 @@ export const useUserStore = defineStore('UserStore', {
return img ? img : 'images/noimg-user.svg' return img ? img : 'images/noimg-user.svg'
}, },
getImgByProfile(userparam: IUserFields, reale: any = false): string { getImgByProfile(userparam: any, reale: any = false, col: any = null): string {
try { try {
if (userparam.profile && userparam.profile.img) { let myrec = this.getRecByCol(userparam, col)
return costanti.DIR_UPLOAD + 'profile/' + userparam.username + '/' + userparam.profile.img
if (myrec.profile && myrec.profile.img) {
return costanti.DIR_UPLOAD + 'profile/' + myrec.username + '/' + myrec.profile.img
} else {
return 'images/noimg-user.svg'
} }
} catch (e) { } catch (e) {
// //
} }
if (!reale) if (!reale)
return 'images/noimg.png' return 'images/noimg-user.svg'
else else
return '' return ''
}, },
@@ -426,24 +430,40 @@ export const useUserStore = defineStore('UserStore', {
return `(${username})` return `(${username})`
}, },
getNameToShow(user: IUserFields): string { getRecByCol(user: any, col: any = null) {
let myrec = user
if (col && col.field === 'userto')
myrec = user.userto
if (col && col.field === 'userfrom')
myrec = user.userfrom
return myrec
},
getNameToShow(user: any, col: any = null): string {
let name = '' let name = ''
if (!!user.name) let myrec = this.getRecByCol(user, col)
name = user.name
if (!!user.surname) if (!!myrec.name)
name += ' ' + user.surname name = myrec.name
if (!!myrec.surname)
name += ' ' + myrec.surname
if (!name) { if (!name) {
name = user.username name = myrec.username
}
if (col && col.field === 'extrarec' && !name) {
name = myrec.dest
} }
return name return name
}, },
getUserNameOnlyIfToShow(user: IUserFields): string { getUserNameOnlyIfToShow(user: any, col: any = null): string {
let myrec = this.getRecByCol(user, col)
if (user.name || user.surname) { if (myrec.name || myrec.surname) {
return user.username return myrec.username
} }
return '' return ''

View File

@@ -25,7 +25,8 @@ export default defineComponent({
const emailsent = ref(false) const emailsent = ref(false)
const form = reactive({ const form = reactive({
email: '', email: '',
tokenforgot: '' tokenforgot: '',
tokenforgot_code: ''
}) })
// @ts-ignore // @ts-ignore