Stringi la mano (fase prima)
This commit is contained in:
@@ -218,119 +218,127 @@
|
||||
<div v-if="myuser._id" class="col-12 text-h8 q-mt-sm">
|
||||
{{ myuser.profile.biografia }}
|
||||
</div>
|
||||
<q-banner
|
||||
rounded
|
||||
dense
|
||||
size="lg"
|
||||
class="bg-grey-1 shadow-5 q-my-sm"
|
||||
color="primary q-title"
|
||||
style="text-align: center"
|
||||
>
|
||||
<div class="mybanner bg-blue text-white">{{ $t('handshake.strettedimano')}}:</div>
|
||||
<div v-if="userStore.IsHandShakeByUsername(myuser.username)">
|
||||
{{ $t('db.addtohandshake', { username: myuser.username }) }}
|
||||
</div>
|
||||
|
||||
<q-btn
|
||||
v-if="handshake_inCommon && handshake_inCommon.length > 0"
|
||||
:label="quanteHandShakeInCommon"
|
||||
class="q-my-sm"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'black'"
|
||||
rounded
|
||||
<div v-if="userStore.IsHandShakeByUsername(myuser.username)">
|
||||
<q-chip
|
||||
color="green"
|
||||
dense
|
||||
class="cltexth4 chipbooked shadow-5 q-pa-sm2"
|
||||
size="md"
|
||||
icon="fas fa-handshake"
|
||||
@click="
|
||||
usersList.show = true;
|
||||
usersList.title = 'Strette di mano in Comune';
|
||||
usersList.list = handshake_inCommon;
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="myuser.profile && myuser.profile.handshake && myuser.profile.handshake.length > 0"
|
||||
:label="quantiHandShake"
|
||||
class="q-my-sm"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'black'"
|
||||
rounded
|
||||
icon="fas fa-handshake"
|
||||
@click="
|
||||
usersList.show = true;
|
||||
usersList.title = 'Lista Strette di mano';
|
||||
usersList.list = myuser.profile.handshake;
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
|
||||
<!--HANDSHAKE-->
|
||||
<div v-if="!isMyRecord(myuser.username)">
|
||||
<div
|
||||
class="row centeritems q-ma-sm q-pa-sm"
|
||||
v-if="userStore.IsReqHandShakeByUsername(myuser.username)"
|
||||
<span
|
||||
> <em class="q-pa-xxs text-white rounded-borders shadow-2">
|
||||
{{ $t('db.addtohandshake', { username: myuser.username }) }}
|
||||
</em></span
|
||||
>
|
||||
<q-btn
|
||||
icon="fas fa-handshake"
|
||||
color="positive"
|
||||
:label="$t('handshake.accept_handshake')"
|
||||
@click="
|
||||
tools.addToMyHandShake(
|
||||
$q,
|
||||
myuser.username,
|
||||
userStore.my.username,
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
icon="fas fa-handshake-alt-slash"
|
||||
color="negative"
|
||||
:label="$t('handshake.reject_ask_handshake')"
|
||||
@click="
|
||||
tools.refuseReqHandShake(
|
||||
$q,
|
||||
myuser.username,
|
||||
userStore.my.username,
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn
|
||||
v-if="
|
||||
!userStore.IsHandShakeByUsername(myuser.username) &&
|
||||
!userStore.IsAskedHandShakeByUsername(myuser.username)
|
||||
"
|
||||
icon="fas fa-handshake"
|
||||
color="primary"
|
||||
:label="$t('handshake.ask_handshake')"
|
||||
@click="
|
||||
tools.setRequestHandShake(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
myuser.username,
|
||||
true
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</q-chip>
|
||||
</div>
|
||||
<q-btn
|
||||
v-if="
|
||||
myuser.profile &&
|
||||
myuser.profile.handshake &&
|
||||
myuser.profile.handshake.length > 0
|
||||
"
|
||||
:label="quantiHandShake"
|
||||
class="q-my-sm"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'black'"
|
||||
rounded
|
||||
icon="fas fa-handshake"
|
||||
@click="
|
||||
usersList.show = true;
|
||||
usersList.title = 'Lista Strette di mano';
|
||||
usersList.list = myuser.profile.handshake;
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
<q-btn
|
||||
v-if="
|
||||
myuser.username !== myusername() &&
|
||||
handshake_inCommon &&
|
||||
handshake_inCommon.length > 0
|
||||
"
|
||||
:label="quanteHandShakeInCommon"
|
||||
class="q-my-sm"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'black'"
|
||||
rounded
|
||||
icon="fas fa-handshake"
|
||||
@click="
|
||||
usersList.show = true;
|
||||
usersList.title = 'Strette di mano in Comune';
|
||||
usersList.list = handshake_inCommon;
|
||||
"
|
||||
>
|
||||
</q-btn>
|
||||
|
||||
<!--HANDSHAKE-->
|
||||
<div v-if="!isMyRecord(myuser.username)">
|
||||
<div
|
||||
class="row centeritems q-ma-sm q-pa-sm"
|
||||
v-if="userStore.IsReqHandShakeByUsername(myuser.username)"
|
||||
>
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.IsAskedHandShakeByUsername(myuser.username) &&
|
||||
!userStore.IsHandShakeByUsername(myuser.username)
|
||||
"
|
||||
icon="fas fa-handshake-alt-slash"
|
||||
:label="$t('handshake.cancel_ask_handshake_short')"
|
||||
icon="fas fa-handshake"
|
||||
color="positive"
|
||||
:label="$t('handshake.accept_handshake')"
|
||||
@click="
|
||||
tools.cancelReqHandShake(
|
||||
tools.addToMyHandShake(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
myuser.username
|
||||
myuser.username,
|
||||
userStore.my.username
|
||||
)
|
||||
"
|
||||
/>
|
||||
<q-btn
|
||||
icon="fas fa-handshake-alt-slash"
|
||||
color="negative"
|
||||
:label="$t('handshake.reject_ask_handshake')"
|
||||
@click="
|
||||
tools.refuseReqHandShake(
|
||||
$q,
|
||||
myuser.username,
|
||||
userStore.my.username
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div v-else>
|
||||
<q-btn
|
||||
v-if="
|
||||
!userStore.IsHandShakeByUsername(myuser.username) &&
|
||||
!userStore.IsAskedHandShakeByUsername(myuser.username)
|
||||
"
|
||||
icon="fas fa-handshake"
|
||||
color="primary"
|
||||
:label="$t('handshake.ask_handshake')"
|
||||
@click="
|
||||
tools.setRequestHandShake(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
myuser.username,
|
||||
true
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
</q-banner>
|
||||
|
||||
<div v-if="!isMyRecord(myuser.username)">
|
||||
<q-btn
|
||||
v-if="
|
||||
userStore.IsAskedHandShakeByUsername(myuser.username) &&
|
||||
!userStore.IsHandShakeByUsername(myuser.username)
|
||||
"
|
||||
icon="fas fa-handshake-alt-slash"
|
||||
:text-color="$q.dark.isActive ? 'black' : 'black'"
|
||||
:label="$t('handshake.cancel_ask_handshake_short')"
|
||||
@click="
|
||||
tools.cancelReqHandShake(
|
||||
$q,
|
||||
userStore.my.username,
|
||||
myuser.username
|
||||
)
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div v-if="!isMyRecord(myuser.username)" class="q-ma-sm">
|
||||
<div
|
||||
class="row centeritems q-ma-sm q-pa-sm"
|
||||
v-if="userStore.IsReqFriendByUsername(myuser.username)"
|
||||
@@ -458,7 +466,7 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<CContactUser :myuser="myuser" :showBtnActivities="true"/>
|
||||
<CContactUser :myuser="myuser" :showBtnActivities="true" />
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user