fix strette di mano
This commit is contained in:
@@ -5475,7 +5475,8 @@ export const tools = {
|
|||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
notifStore.updateNotification = true
|
notifStore.updateNotification = true
|
||||||
userStore.my.profile.handshake = [...userStore.my.profile.handshake, res]
|
userStore.my.profile.handshake = res.myuser.profile.handshake
|
||||||
|
userStore.userprofile = res.userprofile
|
||||||
tools.showPositiveNotif($q, t('db.addedhandshake'))
|
tools.showPositiveNotif($q, t('db.addedhandshake'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -5494,7 +5495,7 @@ export const tools = {
|
|||||||
|
|
||||||
userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE, null).then((res) => {
|
userStore.setFriendsCmd($q, t, username, usernameDest, shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE, null).then((res) => {
|
||||||
if (res) {
|
if (res) {
|
||||||
userStore.my.profile.handshake = userStore.my.profile.handshake.filter((rec: IFriends) => rec.username !== usernameDest)
|
userStore.userprofile.profile.handshake = userStore.userprofile.profile.handshake.filter((rec: IFriends) => rec.username !== username)
|
||||||
tools.showPositiveNotif($q, t('db.removedhandshake'))
|
tools.showPositiveNotif($q, t('db.removedhandshake'))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -148,6 +148,7 @@ export const DefaultProfile: IUserProfile = {
|
|||||||
export const useUserStore = defineStore('UserStore', {
|
export const useUserStore = defineStore('UserStore', {
|
||||||
state: () => ({
|
state: () => ({
|
||||||
my: { ...DefaultUser },
|
my: { ...DefaultUser },
|
||||||
|
userprofile: DefaultUser,
|
||||||
groups: [],
|
groups: [],
|
||||||
lang: process.env.LANG_DEFAULT ? process.env.LANG_DEFAULT : 'it',
|
lang: process.env.LANG_DEFAULT ? process.env.LANG_DEFAULT : 'it',
|
||||||
repeatPassword: '',
|
repeatPassword: '',
|
||||||
|
|||||||
@@ -52,27 +52,27 @@ export default defineComponent({
|
|||||||
const { getRefLink } = MixinUsers()
|
const { getRefLink } = MixinUsers()
|
||||||
|
|
||||||
const animation = ref('fade')
|
const animation = ref('fade')
|
||||||
const quantiHandShake = ref('')
|
const usersList = ref({ show: false, title: '', list: [] })
|
||||||
const quanteHandShakeInCommon = ref('')
|
|
||||||
const usersList = ref({show: false, title: '', list: []})
|
|
||||||
|
|
||||||
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
const username = computed(() => $route.params.username ? $route.params.username.toString() : userStore.my.username)
|
||||||
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
const idnotif = computed(() => $route.query.idnotif ? $route.query.idnotif.toString() : '')
|
||||||
const isDebugOn = computed(() => tools.isDebugOn())
|
const isDebugOn = computed(() => tools.isDebugOn())
|
||||||
|
|
||||||
|
|
||||||
const filtroutente = ref(<any[]>[])
|
const filtroutente = ref(<any[]>[])
|
||||||
const showPic = ref(false)
|
const showPic = ref(false)
|
||||||
const caricato = ref(false)
|
const caricato = ref(false)
|
||||||
const showsendCoinTo = ref(false)
|
const showsendCoinTo = ref(false)
|
||||||
const showinghand = ref(false)
|
const showinghand = ref(false)
|
||||||
|
|
||||||
const myuser = ref(<IUserFields | null>null)
|
|
||||||
const handshake_inCommon = ref(<IFriends[]>[])
|
|
||||||
|
|
||||||
const actualcard = ref('mygoods')
|
const actualcard = ref('mygoods')
|
||||||
|
|
||||||
const notifStore = useNotifStore()
|
const notifStore = useNotifStore()
|
||||||
|
|
||||||
|
const quantiHandShake = computed(() => (userStore.userprofile.profile.handshake ? userStore.userprofile.profile.handshake.length : 0) + ' ' + t('handshake.strettedimano'))
|
||||||
|
const handshake_inCommon = computed(() => userStore.getMyHandshakeInCommon(userStore.userprofile))
|
||||||
|
const quanteHandShakeInCommon = computed(() => (handshake_inCommon.value ? handshake_inCommon.value.length : 0) + ' ' + t('handshake.incommon'))
|
||||||
|
|
||||||
const mycards = computed(() => {
|
const mycards = computed(() => {
|
||||||
return costanti.MAINCARDS.filter((rec: any) => rec.table)
|
return costanti.MAINCARDS.filter((rec: any) => rec.table)
|
||||||
})
|
})
|
||||||
@@ -97,23 +97,21 @@ export default defineComponent({
|
|||||||
if (username.value) {
|
if (username.value) {
|
||||||
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
await userStore.loadUserProfile({ username: username.value, idnotif: idnotif.value }).then((ris) => {
|
||||||
console.log('loadUserProfile = ', ris)
|
console.log('loadUserProfile = ', ris)
|
||||||
myuser.value = ris
|
userStore.userprofile = ris
|
||||||
if (myuser.value) {
|
if (userStore.userprofile) {
|
||||||
filtroutente.value = [{ userId: myuser.value._id }]
|
filtroutente.value = [{ userId: userStore.userprofile._id }]
|
||||||
notifStore.setAsRead(idnotif.value)
|
notifStore.setAsRead(idnotif.value)
|
||||||
|
|
||||||
quantiHandShake.value = (myuser.value.profile.handshake ? myuser.value.profile.handshake.length : 0) + ' ' + t('handshake.strettedimano')
|
|
||||||
handshake_inCommon.value = userStore.getMyHandshakeInCommon(myuser.value)
|
|
||||||
quanteHandShakeInCommon.value = (handshake_inCommon.value ? handshake_inCommon.value.length : 0) + ' ' + t('handshake.incommon')
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
listgroupsfiltered.value = globalStore.mygroups.filter((grp: IMyGroup) => myuser.value!.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
|
if (userStore.userprofile)
|
||||||
|
listgroupsfiltered.value = globalStore.mygroups.filter((grp: IMyGroup) => userStore.userprofile.profile.mygroups.findIndex((rec: IMyGroup) => rec.groupname === grp.groupname) >= 0)
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
listgroupsfiltered.value = []
|
listgroupsfiltered.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
listcircuitsfiltered.value = myuser.value.profile.mycircuits
|
listcircuitsfiltered.value = userStore.userprofile.profile.mycircuits
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
listcircuitsfiltered.value = []
|
listcircuitsfiltered.value = []
|
||||||
}
|
}
|
||||||
@@ -123,7 +121,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
caricato.value = true
|
caricato.value = true
|
||||||
}
|
}
|
||||||
}catch (e) {
|
} catch (e) {
|
||||||
console.error('ERR loadProfile', e)
|
console.error('ERR loadProfile', e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,8 +139,8 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getImgUser() {
|
function getImgUser() {
|
||||||
if (myuser.value)
|
if (userStore.userprofile)
|
||||||
return userStore.getImgByProfile(myuser.value)
|
return userStore.getImgByProfile(userStore.userprofile)
|
||||||
else
|
else
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
@@ -164,7 +162,6 @@ export default defineComponent({
|
|||||||
tools,
|
tools,
|
||||||
toolsext,
|
toolsext,
|
||||||
costanti,
|
costanti,
|
||||||
myuser,
|
|
||||||
shared_consts,
|
shared_consts,
|
||||||
getImgUser,
|
getImgUser,
|
||||||
checkifShow,
|
checkifShow,
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
<span v-if="!!tools.isLogged()">Logged: {{ tools.isLogged() }}</span> -
|
<span v-if="!!tools.isLogged()">Logged: {{ tools.isLogged() }}</span> -
|
||||||
<span v-if="!!tools.isUserOk()">UserOk: {{ tools.isUserOk() }}</span> -
|
<span v-if="!!tools.isUserOk()">UserOk: {{ tools.isUserOk() }}</span> -
|
||||||
<span v-if="caricato">caricato: {{ caricato }}</span> -
|
<span v-if="caricato">caricato: {{ caricato }}</span> -
|
||||||
<span v-if="myuser">myuser: {{ myuser.username }}</span>
|
<span v-if="userStore.userprofile"
|
||||||
|
>userStore.userprofile: {{ userStore.userprofile.username }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!caricato"
|
v-if="!caricato"
|
||||||
@@ -32,27 +34,33 @@
|
|||||||
<div v-else-if="!tools.isLogged()">
|
<div v-else-if="!tools.isLogged()">
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
<div
|
<div
|
||||||
v-if="myuser && myuser.date_reg"
|
v-if="userStore.userprofile && userStore.userprofile.date_reg"
|
||||||
class="fit column no-wrap justify-evenly items-center content-start"
|
class="fit column no-wrap justify-evenly items-center content-start"
|
||||||
>
|
>
|
||||||
<div class="">
|
<div class="">
|
||||||
<q-avatar size="140px">
|
<q-avatar size="140px">
|
||||||
<q-img
|
<q-img
|
||||||
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
:src="
|
||||||
|
userStore.userprofile.profile
|
||||||
|
? getImgUser(userStore.userprofile.profile)
|
||||||
|
: ''
|
||||||
|
"
|
||||||
:alt="username"
|
:alt="username"
|
||||||
img-class="imgprofile"
|
img-class="imgprofile"
|
||||||
height="140px"
|
height="140px"
|
||||||
@click="showPic = true"
|
@click="showPic = true"
|
||||||
/>
|
/>
|
||||||
<q-badge
|
<q-badge
|
||||||
v-if="tools.isUserOnline(myuser)"
|
v-if="tools.isUserOnline(userStore.userprofile)"
|
||||||
align="top"
|
align="top"
|
||||||
floating
|
floating
|
||||||
color="green"
|
color="green"
|
||||||
>online</q-badge
|
>online</q-badge
|
||||||
>
|
>
|
||||||
<q-badge
|
<q-badge
|
||||||
v-if="userStore.IsHandShakeByUsername(myuser.username)"
|
v-if="
|
||||||
|
userStore.IsHandShakeByUsername(userStore.userprofile.username)
|
||||||
|
"
|
||||||
align="bottom"
|
align="bottom"
|
||||||
floating
|
floating
|
||||||
color="red"
|
color="red"
|
||||||
@@ -63,10 +71,10 @@
|
|||||||
|
|
||||||
<div class="last_access">
|
<div class="last_access">
|
||||||
OnLine:
|
OnLine:
|
||||||
<CTimeAgo :datetime="myuser.lasttimeonline" />
|
<CTimeAgo :datetime="userStore.userprofile.lasttimeonline" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="myuser.reported">
|
<div v-if="userStore.userprofile.reported">
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
||||||
bgcolor="bg-red"
|
bgcolor="bg-red"
|
||||||
@@ -77,75 +85,86 @@
|
|||||||
|
|
||||||
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
||||||
<div class="text-h6">
|
<div class="text-h6">
|
||||||
<span v-if="checkifShow('name') && myuser.name">
|
<span v-if="checkifShow('name') && userStore.userprofile.name">
|
||||||
{{ myuser.name }}</span
|
{{ userStore.userprofile.name }}</span
|
||||||
>
|
>
|
||||||
<span v-if="checkifShow('surname') && myuser.surname"
|
<span v-if="checkifShow('surname') && userStore.userprofile.surname"
|
||||||
> {{ myuser.surname }}</span
|
> {{ userStore.userprofile.surname }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||||
{{ myuser.username }}
|
{{ userStore.userprofile.username }}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-h7">
|
<div class="col-12 text-h7">
|
||||||
<span v-if="myuser.profile && myuser.profile.born_city_id">
|
<span
|
||||||
|
v-if="
|
||||||
|
userStore.userprofile.profile &&
|
||||||
|
userStore.userprofile.profile.born_city_id
|
||||||
|
"
|
||||||
|
>
|
||||||
<CMyFieldRec
|
<CMyFieldRec
|
||||||
title=""
|
title=""
|
||||||
table="users"
|
table="users"
|
||||||
tablesel="cities"
|
tablesel="cities"
|
||||||
:id="myuser._id"
|
:id="userStore.userprofile._id"
|
||||||
:rec="myuser"
|
:rec="userStore.userprofile"
|
||||||
field="profile.born_city_id"
|
field="profile.born_city_id"
|
||||||
:canEdit="false"
|
:canEdit="false"
|
||||||
:canModify="false"
|
:canModify="false"
|
||||||
>
|
>
|
||||||
</CMyFieldRec>
|
</CMyFieldRec>
|
||||||
|
|
||||||
{{ myuser.profile.born_city_str }}</span
|
{{ userStore.userprofile.profile.born_city_str }}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
myuser.profile &&
|
userStore.userprofile.profile &&
|
||||||
myuser.profile.nationality &&
|
userStore.userprofile.profile.nationality &&
|
||||||
myuser.profile.nationality !== 'Italia'
|
userStore.userprofile.profile.nationality !== 'Italia'
|
||||||
"
|
"
|
||||||
>({{ myuser.profile.nationality }})</span
|
>({{ userStore.userprofile.profile.nationality }})</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
<div v-if="userStore.userprofile._id" class="col-12 text-h8 q-mt-sm">
|
||||||
<span v-if="myuser.profile.qualifica">
|
<span v-if="userStore.userprofile.profile.qualifica">
|
||||||
<em
|
<em
|
||||||
><span class="qualifica">{{ myuser.profile.qualifica }}</span></em
|
><span class="qualifica">{{
|
||||||
|
userStore.userprofile.profile.qualifica
|
||||||
|
}}</span></em
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
<div v-if="userStore.userprofile._id" class="col-12 text-h8 q-mt-sm">
|
||||||
{{ myuser.profile.biografia }}
|
{{ userStore.userprofile.profile.biografia }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<CCheckIfIsLogged></CCheckIfIsLogged>
|
<CCheckIfIsLogged></CCheckIfIsLogged>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="tools.isUserOk() || tools.isLogged()">
|
<div v-else-if="tools.isUserOk() || tools.isLogged()">
|
||||||
<div v-if="myuser">
|
<div v-if="userStore.userprofile">
|
||||||
<CNotifAtTop />
|
<CNotifAtTop />
|
||||||
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
<div class="q-gutter-sm q-pa-sm q-pb-md">
|
||||||
<div
|
<div
|
||||||
v-if="myuser && myuser.date_reg"
|
v-if="userStore.userprofile && userStore.userprofile.date_reg"
|
||||||
class="fit column no-wrap justify-evenly items-center content-start"
|
class="fit column no-wrap justify-evenly items-center content-start"
|
||||||
>
|
>
|
||||||
<div class="">
|
<div class="">
|
||||||
<q-avatar size="140px">
|
<q-avatar size="140px">
|
||||||
<q-img
|
<q-img
|
||||||
:src="myuser.profile ? getImgUser(myuser.profile) : ''"
|
:src="
|
||||||
|
userStore.userprofile.profile
|
||||||
|
? getImgUser(userStore.userprofile.profile)
|
||||||
|
: ''
|
||||||
|
"
|
||||||
:alt="username"
|
:alt="username"
|
||||||
img-class="imgprofile"
|
img-class="imgprofile"
|
||||||
height="140px"
|
height="140px"
|
||||||
@click="showPic = true"
|
@click="showPic = true"
|
||||||
/>
|
/>
|
||||||
<q-badge
|
<q-badge
|
||||||
v-if="tools.isUserOnline(myuser)"
|
v-if="tools.isUserOnline(userStore.userprofile)"
|
||||||
align="top"
|
align="top"
|
||||||
floating
|
floating
|
||||||
color="green"
|
color="green"
|
||||||
@@ -155,10 +174,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="last_access">
|
<div class="last_access">
|
||||||
OnLine: <CTimeAgo :datetime="myuser.lasttimeonline" />
|
OnLine:
|
||||||
|
<CTimeAgo :datetime="userStore.userprofile.lasttimeonline" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="myuser.reported">
|
<div v-if="userStore.userprofile.reported">
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
title="⚠️ L'utente è stato Segnalato per comportamento non idoneo."
|
||||||
bgcolor="bg-red"
|
bgcolor="bg-red"
|
||||||
@@ -169,62 +189,68 @@
|
|||||||
|
|
||||||
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
<div v-if="site && site.confpages && site.confpages.showNameSurname">
|
||||||
<div class="text-h6">
|
<div class="text-h6">
|
||||||
<span v-if="checkifShow('name') && myuser.name">
|
<span v-if="checkifShow('name') && userStore.userprofile.name">
|
||||||
{{ myuser.name }}</span
|
{{ userStore.userprofile.name }}</span
|
||||||
>
|
>
|
||||||
<span v-if="checkifShow('surname') && myuser.surname"
|
<span
|
||||||
> {{ myuser.surname }}</span
|
v-if="checkifShow('surname') && userStore.userprofile.surname"
|
||||||
|
> {{ userStore.userprofile.surname }}</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 text-h7 text-blue text-shadow-2">
|
<div class="col-12 text-h7 text-blue text-shadow-2">
|
||||||
{{ myuser.username }}
|
{{ userStore.userprofile.username }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 text-h7">
|
<div class="col-12 text-h7">
|
||||||
<span v-if="myuser.profile && myuser.profile.born_city_id">
|
<span
|
||||||
|
v-if="
|
||||||
|
userStore.userprofile.profile &&
|
||||||
|
userStore.userprofile.profile.born_city_id
|
||||||
|
"
|
||||||
|
>
|
||||||
<CMyFieldRec
|
<CMyFieldRec
|
||||||
title=""
|
title=""
|
||||||
table="users"
|
table="users"
|
||||||
tablesel="cities"
|
tablesel="cities"
|
||||||
:id="myuser._id"
|
:id="userStore.userprofile._id"
|
||||||
:rec="myuser"
|
:rec="userStore.userprofile"
|
||||||
field="profile.born_city_id"
|
field="profile.born_city_id"
|
||||||
:canEdit="false"
|
:canEdit="false"
|
||||||
:canModify="false"
|
:canModify="false"
|
||||||
>
|
>
|
||||||
</CMyFieldRec>
|
</CMyFieldRec>
|
||||||
|
|
||||||
{{ myuser.profile.born_city_str }}</span
|
{{ userStore.userprofile.profile.born_city_str }}</span
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
v-if="
|
v-if="
|
||||||
myuser.profile &&
|
userStore.userprofile.profile &&
|
||||||
myuser.profile.nationality &&
|
userStore.userprofile.profile.nationality &&
|
||||||
myuser.profile.nationality !== 'Italia'
|
userStore.userprofile.profile.nationality !== 'Italia'
|
||||||
"
|
"
|
||||||
>({{ myuser.profile.nationality }})</span
|
>({{ userStore.userprofile.profile.nationality }})</span
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
<div v-if="userStore.userprofile._id" class="col-12 text-h8 q-mt-sm">
|
||||||
<span v-if="myuser.profile.qualifica">
|
<span v-if="userStore.userprofile.profile.qualifica">
|
||||||
<em
|
<em
|
||||||
><span class="qualifica">{{
|
><span class="qualifica">{{
|
||||||
myuser.profile.qualifica
|
userStore.userprofile.profile.qualifica
|
||||||
}}</span></em
|
}}</span></em
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
<div v-if="userStore.userprofile._id" class="col-12 text-h8 q-mt-sm">
|
||||||
{{ myuser.profile.biografia }}
|
{{ userStore.userprofile.profile.biografia }}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
myuser.profile &&
|
userStore.userprofile.profile &&
|
||||||
myuser.profile.handshake &&
|
userStore.userprofile.profile.handshake &&
|
||||||
myuser.profile.handshake.length > 0
|
userStore.userprofile.profile.handshake.length > 0
|
||||||
"
|
"
|
||||||
:label="quantiHandShake"
|
:label="quantiHandShake"
|
||||||
class="q-my-sm"
|
class="q-my-sm"
|
||||||
@@ -235,13 +261,13 @@
|
|||||||
@click="
|
@click="
|
||||||
usersList.show = true;
|
usersList.show = true;
|
||||||
usersList.title = 'Lista Strette di mano';
|
usersList.title = 'Lista Strette di mano';
|
||||||
usersList.list = myuser.profile.handshake;
|
usersList.list = userStore.userprofile.profile.handshake;
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
myuser.username !== myusername() &&
|
userStore.userprofile.username !== myusername() &&
|
||||||
handshake_inCommon &&
|
handshake_inCommon &&
|
||||||
handshake_inCommon.length > 0
|
handshake_inCommon.length > 0
|
||||||
"
|
"
|
||||||
@@ -258,74 +284,107 @@
|
|||||||
>
|
>
|
||||||
</q-btn>
|
</q-btn>
|
||||||
</div>
|
</div>
|
||||||
<q-chip
|
<div v-if="userStore.userprofile.username !== myusername()">
|
||||||
v-if="
|
<q-chip
|
||||||
userStore.IsHandShakeByMe(myuser) &&
|
v-if="
|
||||||
userStore.IsHandShakeByUsername(myuser.username)
|
userStore.IsHandShakeByMe(userStore.userprofile) &&
|
||||||
"
|
userStore.IsHandShakeByUsername(
|
||||||
color="green"
|
userStore.userprofile.username
|
||||||
dense
|
)
|
||||||
class="cltexth3 chipbooked shadow-5 q-pa-sm2"
|
"
|
||||||
size="lg"
|
color="green"
|
||||||
text-color="white"
|
dense
|
||||||
icon="fas fa-handshake"
|
class="chipbooked shadow-5 q-pa-sm2"
|
||||||
>
|
size="md"
|
||||||
<span
|
text-color="white"
|
||||||
> <em class="q-pa-xxs text-white rounded-borders shadow-2">
|
icon="fas fa-handshake"
|
||||||
{{ $t('db.both_fiducia', { username: myuser.username }) }}
|
|
||||||
</em></span
|
|
||||||
>
|
>
|
||||||
</q-chip>
|
<span
|
||||||
<q-chip
|
> <em
|
||||||
v-else-if="
|
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||||
userStore.IsHandShakeByMe(myuser) &&
|
>
|
||||||
!userStore.IsHandShakeByUsername(myuser.username)
|
{{
|
||||||
"
|
$t('db.both_fiducia', {
|
||||||
color="blue"
|
username: userStore.userprofile.username,
|
||||||
dense
|
})
|
||||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
}}
|
||||||
size="md"
|
</em></span
|
||||||
text-color="white"
|
>
|
||||||
icon="fas fa-handshake"
|
</q-chip>
|
||||||
>
|
<q-chip
|
||||||
<span
|
v-else-if="
|
||||||
> <em class="q-pa-xxs text-white rounded-borders shadow-2">
|
!userStore.IsHandShakeByMe(userStore.userprofile) &&
|
||||||
{{ $t('db.handshake_him', { username: myuser.username }) }}
|
userStore.IsHandShakeByUsername(
|
||||||
</em></span
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||||
|
size="md"
|
||||||
|
text-color="white"
|
||||||
|
icon="fas fa-handshake"
|
||||||
>
|
>
|
||||||
</q-chip>
|
<span
|
||||||
<q-chip
|
> <em
|
||||||
v-else
|
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||||
color="blue"
|
>
|
||||||
dense
|
{{
|
||||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
$t('db.handshake_him', {
|
||||||
size="md"
|
username: userStore.userprofile.username,
|
||||||
text-color="white"
|
})
|
||||||
icon="fas fa-handshake"
|
}}
|
||||||
>
|
</em></span
|
||||||
<span
|
>
|
||||||
> <em class="q-pa-xxs text-white rounded-borders shadow-2">
|
</q-chip>
|
||||||
{{ $t('db.handshake_you', { username: myuser.username }) }}
|
<q-chip
|
||||||
</em></span
|
v-else-if="
|
||||||
|
userStore.IsHandShakeByMe(userStore.userprofile) &&
|
||||||
|
!userStore.IsHandShakeByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
color="blue"
|
||||||
|
dense
|
||||||
|
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||||
|
size="md"
|
||||||
|
text-color="white"
|
||||||
|
icon="fas fa-handshake"
|
||||||
>
|
>
|
||||||
</q-chip>
|
<span
|
||||||
|
> <em
|
||||||
|
class="q-pa-xxs text-white rounded-borders shadow-2"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
$t('db.handshake_you', {
|
||||||
|
username: userStore.userprofile.username,
|
||||||
|
})
|
||||||
|
}}
|
||||||
|
</em></span
|
||||||
|
>
|
||||||
|
</q-chip>
|
||||||
|
</div>
|
||||||
|
|
||||||
<!--HANDSHAKE-->
|
<!--HANDSHAKE-->
|
||||||
<div v-if="!isMyRecord(myuser.username)">
|
<div v-if="!isMyRecord(userStore.userprofile.username)">
|
||||||
<div
|
<div
|
||||||
class="row centeritems q-pa-sm"
|
class="row centeritems q-pa-sm"
|
||||||
v-if="!userStore.IsHandShakeByUsername(myuser.username)"
|
v-if="!userStore.IsHandShakeByMe(userStore.userprofile)"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="userStore.IsHandShakeByMe(myuser)"
|
v-if="
|
||||||
|
userStore.IsHandShakeByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
icon="fas fa-handshake"
|
icon="fas fa-handshake"
|
||||||
color="positive"
|
color="positive"
|
||||||
:label="$t('handshake.accept_you_too_handshake')"
|
:label="$t('handshake.accept_you_too_handshake')"
|
||||||
@click="
|
@click="
|
||||||
tools.addToMyHandShake(
|
tools.addToMyHandShake(
|
||||||
$q,
|
$q,
|
||||||
myuser.username,
|
userStore.my.username,
|
||||||
userStore.my.username
|
userStore.userprofile.username
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -337,8 +396,8 @@
|
|||||||
@click="
|
@click="
|
||||||
tools.addToMyHandShake(
|
tools.addToMyHandShake(
|
||||||
$q,
|
$q,
|
||||||
myuser.username,
|
userStore.my.username,
|
||||||
userStore.my.username
|
userStore.userprofile.username
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -346,11 +405,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="!isMyRecord(myuser.username)" class="q-ma-sm">
|
<div
|
||||||
|
v-if="!isMyRecord(userStore.userprofile.username)"
|
||||||
|
class="q-ma-sm"
|
||||||
|
>
|
||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<div
|
<div
|
||||||
class="row centeritems q-ma-sm q-pa-sm"
|
class="row centeritems q-ma-sm q-pa-sm"
|
||||||
v-if="userStore.IsReqFriendByUsername(myuser.username)"
|
v-if="
|
||||||
|
userStore.IsReqFriendByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
>
|
>
|
||||||
<q-btn
|
<q-btn
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
@@ -360,7 +426,7 @@
|
|||||||
tools.addToMyFriends(
|
tools.addToMyFriends(
|
||||||
$q,
|
$q,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
myuser.username
|
userStore.userprofile.username
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -372,7 +438,7 @@
|
|||||||
tools.refuseReqFriends(
|
tools.refuseReqFriends(
|
||||||
$q,
|
$q,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
myuser.username
|
userStore.userprofile.username
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
@@ -380,8 +446,12 @@
|
|||||||
<div v-else>
|
<div v-else>
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
!userStore.IsMyFriendByUsername(myuser.username) &&
|
!userStore.IsMyFriendByUsername(
|
||||||
!userStore.IsAskedFriendByUsername(myuser.username)
|
userStore.userprofile.username
|
||||||
|
) &&
|
||||||
|
!userStore.IsAskedFriendByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
"
|
"
|
||||||
icon="fas fa-user-plus"
|
icon="fas fa-user-plus"
|
||||||
color="primary"
|
color="primary"
|
||||||
@@ -390,7 +460,7 @@
|
|||||||
tools.setRequestFriendship(
|
tools.setRequestFriendship(
|
||||||
$q,
|
$q,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
myuser.username,
|
userStore.userprofile.username,
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
@@ -401,8 +471,9 @@
|
|||||||
<div class="row justify-center">
|
<div class="row justify-center">
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
userStore.IsMyFriendByUsername(myuser.username) ||
|
userStore.IsMyFriendByUsername(
|
||||||
userStore.IsHandShakeByUsername(myuser.username)
|
userStore.userprofile.username
|
||||||
|
) || userStore.IsHandShakeByMe(userStore.userprofile)
|
||||||
"
|
"
|
||||||
class="text-center"
|
class="text-center"
|
||||||
rounded
|
rounded
|
||||||
@@ -411,7 +482,30 @@
|
|||||||
<q-menu>
|
<q-menu>
|
||||||
<q-list style="min-width: 150px">
|
<q-list style="min-width: 150px">
|
||||||
<q-item
|
<q-item
|
||||||
v-if="userStore.IsMyFriendByUsername(myuser.username)"
|
v-if="userStore.IsHandShakeByMe(userStore.userprofile)"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
tools.removeFromMyHandShake(
|
||||||
|
$q,
|
||||||
|
userStore.my.username,
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="negative" name="fas fa-handshake-slash" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>{{
|
||||||
|
$t('handshake.remove_from_myhandshake')
|
||||||
|
}}</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
v-if="
|
||||||
|
userStore.IsMyFriendByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
clickable
|
clickable
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
v-close-popup
|
v-close-popup
|
||||||
@@ -419,40 +513,7 @@
|
|||||||
tools.removeFromMyFriends(
|
tools.removeFromMyFriends(
|
||||||
$q,
|
$q,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
myuser.username
|
userStore.userprofile.username
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-item-section>{{
|
|
||||||
$t('friends.remove_from_myfriends')
|
|
||||||
}}</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
v-if="userStore.IsMyFriendByUsername(myuser.username)"
|
|
||||||
clickable
|
|
||||||
icon="fas fa-ban"
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
tools.blockUser(
|
|
||||||
$q,
|
|
||||||
userStore.my.username,
|
|
||||||
myuser.username
|
|
||||||
)
|
|
||||||
"
|
|
||||||
>
|
|
||||||
<q-item-section>{{
|
|
||||||
$t('friends.block_user')
|
|
||||||
}}</q-item-section>
|
|
||||||
</q-item>
|
|
||||||
<q-item
|
|
||||||
v-if="userStore.IsMyFriendByUsername(myuser.username)"
|
|
||||||
clickable
|
|
||||||
v-close-popup
|
|
||||||
@click="
|
|
||||||
tools.reportUser(
|
|
||||||
$q,
|
|
||||||
userStore.my.username,
|
|
||||||
myuser.username
|
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
@@ -460,23 +521,55 @@
|
|||||||
<q-icon color="negative" name="fas fa-user-minus" />
|
<q-icon color="negative" name="fas fa-user-minus" />
|
||||||
</q-item-section>
|
</q-item-section>
|
||||||
<q-item-section>{{
|
<q-item-section>{{
|
||||||
$t('friends.report_user')
|
$t('friends.remove_from_myfriends')
|
||||||
}}</q-item-section>
|
}}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
<q-item>
|
<q-item
|
||||||
<q-btn
|
v-if="
|
||||||
v-if="userStore.IsHandShakeByUsername(myuser.username)"
|
userStore.IsMyFriendByUsername(
|
||||||
icon="fas fa-handshake-slash"
|
userStore.userprofile.username
|
||||||
color="negative"
|
)
|
||||||
:label="$t('handshake.remove_from_myhandshake')"
|
"
|
||||||
@click="
|
clickable
|
||||||
tools.removeFromMyHandShake(
|
icon="fas fa-ban"
|
||||||
$q,
|
v-close-popup
|
||||||
userStore.my.username,
|
@click="
|
||||||
myuser.username
|
tools.blockUser(
|
||||||
)
|
$q,
|
||||||
"
|
userStore.my.username,
|
||||||
/>
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="negative" name="fas fa-ban" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>{{
|
||||||
|
$t('friends.block_user')
|
||||||
|
}}</q-item-section>
|
||||||
|
</q-item>
|
||||||
|
<q-item
|
||||||
|
v-if="
|
||||||
|
userStore.IsMyFriendByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
clickable
|
||||||
|
v-close-popup
|
||||||
|
@click="
|
||||||
|
tools.reportUser(
|
||||||
|
$q,
|
||||||
|
userStore.my.username,
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<q-item-section avatar>
|
||||||
|
<q-icon color="negative" name="fas fa-flag" />
|
||||||
|
</q-item-section>
|
||||||
|
<q-item-section>{{
|
||||||
|
$t('friends.report_user')
|
||||||
|
}}</q-item-section>
|
||||||
</q-item>
|
</q-item>
|
||||||
</q-list>
|
</q-list>
|
||||||
</q-menu>
|
</q-menu>
|
||||||
@@ -484,8 +577,12 @@
|
|||||||
|
|
||||||
<q-btn
|
<q-btn
|
||||||
v-if="
|
v-if="
|
||||||
userStore.IsAskedFriendByUsername(myuser.username) &&
|
userStore.IsAskedFriendByUsername(
|
||||||
!userStore.IsMyFriendByUsername(myuser.username)
|
userStore.userprofile.username
|
||||||
|
) &&
|
||||||
|
!userStore.IsMyFriendByUsername(
|
||||||
|
userStore.userprofile.username
|
||||||
|
)
|
||||||
"
|
"
|
||||||
icon="fas fa-user-minus"
|
icon="fas fa-user-minus"
|
||||||
:label="$t('friends.cancel_ask_friend_short')"
|
:label="$t('friends.cancel_ask_friend_short')"
|
||||||
@@ -493,22 +590,25 @@
|
|||||||
tools.cancelReqFriends(
|
tools.cancelReqFriends(
|
||||||
$q,
|
$q,
|
||||||
userStore.my.username,
|
userStore.my.username,
|
||||||
myuser.username
|
userStore.userprofile.username
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CContactUser :myuser="myuser" :showBtnActivities="true" />
|
<CContactUser
|
||||||
|
:myuser="userStore.userprofile"
|
||||||
|
:showBtnActivities="true"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
myuser &&
|
userStore.userprofile &&
|
||||||
myuser._id &&
|
userStore.userprofile._id &&
|
||||||
(userStore.IsMyFriendByUsername(myuser.username) ||
|
(userStore.IsMyFriendByUsername(userStore.userprofile.username) ||
|
||||||
isMyRecord(myuser.username))
|
isMyRecord(userStore.userprofile.username))
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
<CTitleBanner
|
<CTitleBanner
|
||||||
@@ -520,33 +620,36 @@
|
|||||||
:canopen="true"
|
:canopen="true"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
v-if="myuser.profile"
|
v-if="userStore.userprofile.profile"
|
||||||
class="fit column no-wrap justify-evenly content-start"
|
class="fit column no-wrap justify-evenly content-start"
|
||||||
>
|
>
|
||||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||||
<CDateTime
|
<CDateTime
|
||||||
v-if="
|
v-if="
|
||||||
checkifShow('profile.dateofbirth') &&
|
checkifShow('profile.dateofbirth') &&
|
||||||
!!myuser.profile.dateofbirth
|
!!userStore.userprofile.profile.dateofbirth
|
||||||
"
|
"
|
||||||
v-model:value="myuser.profile.dateofbirth"
|
v-model:value="userStore.userprofile.profile.dateofbirth"
|
||||||
:label="$t('reg.dateofbirth')"
|
:label="$t('reg.dateofbirth')"
|
||||||
:canEdit="false"
|
:canEdit="false"
|
||||||
>
|
>
|
||||||
</CDateTime>
|
</CDateTime>
|
||||||
<CLabel
|
<CLabel
|
||||||
v-if="!!myuser.profile.cell"
|
v-if="!!userStore.userprofile.profile.cell"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
:copy="true"
|
:copy="true"
|
||||||
:value="myuser.profile.intcode_cell + myuser.profile.cell"
|
:value="
|
||||||
|
userStore.userprofile.profile.intcode_cell +
|
||||||
|
userStore.userprofile.profile.cell
|
||||||
|
"
|
||||||
label="Cellulare"
|
label="Cellulare"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
<CMyFieldRec
|
<CMyFieldRec
|
||||||
table="users"
|
table="users"
|
||||||
:id="myuser._id"
|
:id="userStore.userprofile._id"
|
||||||
:rec="myuser"
|
:rec="userStore.userprofile"
|
||||||
field="profile.cell"
|
field="profile.cell"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:canEdit="false"
|
:canEdit="false"
|
||||||
@@ -559,9 +662,12 @@
|
|||||||
</CTitleBanner>
|
</CTitleBanner>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
<div class="col-md-6 col-sm-6 q-ma-xs col-xs-12">
|
||||||
<CLabel v-if="!!myuser.useraport" :label="t('profile.aportador_him')">
|
<CLabel
|
||||||
|
v-if="!!userStore.userprofile.useraport"
|
||||||
|
:label="t('profile.aportador_him')"
|
||||||
|
>
|
||||||
<CMyUser
|
<CMyUser
|
||||||
:mycontact="myuser.useraport"
|
:mycontact="userStore.userprofile.useraport"
|
||||||
:visu="costanti.FIND_PEOPLE"
|
:visu="costanti.FIND_PEOPLE"
|
||||||
@setCmd="tools.setCmd"
|
@setCmd="tools.setCmd"
|
||||||
>
|
>
|
||||||
@@ -574,7 +680,7 @@
|
|||||||
</q-dialog>
|
</q-dialog>
|
||||||
|
|
||||||
<q-page-sticky
|
<q-page-sticky
|
||||||
v-if="myuser.username === myusername()"
|
v-if="userStore.userprofile.username === myusername()"
|
||||||
position="top-right"
|
position="top-right"
|
||||||
:offset="[18, 18]"
|
:offset="[18, 18]"
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user