strette di mano

This commit is contained in:
Surya Paolo
2023-01-06 15:51:58 +01:00
parent d5d005a714
commit 865e1ad738
37 changed files with 644 additions and 76 deletions

View File

@@ -83,6 +83,25 @@
</q-btn>
</q-item-label>
</q-item-section>
<q-item-section side v-else-if="visu === costanti.REQ_HANDSHAKE">
<q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list v-if="true" style="min-width: 150px">
<q-item clickable v-close-popup @click="setCmd($q, shared_consts.FRIENDSCMD.SETHANDSHAKE, userStore.my.username, '', contact.username)">
<q-item-section>{{ $t('friends.accept_handshake') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 150px">
<q-item clickable icon="fas fa-user-minus" v-close-popup
@click="setCmd($q, shared_consts.FRIENDSCMD.REQ_HANDSHAKE, userStore.my.username, false, contact.username, false)">
<q-item-section>{{ $t('friends.reject_ask_handshake') }}</q-item-section>
</q-item>
</q-list>
</q-menu>
</q-btn>
</q-item-label>
</q-item-section>
<q-item-section side v-else-if="visu === costanti.REQ_ADD_USER_TO_GROUP">
<q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h">
@@ -253,11 +272,15 @@
<q-item-label>
<q-btn rounded icon="fas fa-ellipsis-h">
<q-menu>
<q-list v-if="!userStore.IsMyFriendByUsername(contact.username)" style="min-width: 200px">
<q-item clickable icon="fas fa-user-plus" v-close-popup
<q-list style="min-width: 200px">
<q-item v-if="!userStore.IsMyFriendByUsername(contact.username)" clickable icon="fas fa-user-plus" v-close-popup
@click="setCmd($q, shared_consts.FRIENDSCMD.REQFRIEND, userStore.my.username, true, contact.username)">
<q-item-section>{{ $t('friends.ask_friend') }}</q-item-section>
</q-item>
<q-item v-if="!userStore.IsHandShakeByUsername(contact.username)" clickable icon="far fa-handshake" v-close-popup
@click="setCmd($q, shared_consts.FRIENDSCMD.REQ_HANDSHAKE, userStore.my.username, true, contact.username)">
<q-item-section>{{ $t('handshake.ask_handshake') }}</q-item-section>
</q-item>
</q-list>
<q-list style="min-width: 200px">
<q-item clickable icon="fas fa-user-minus" v-close-popup
@@ -299,6 +322,30 @@
</q-item-section>
<q-item-section>{{ $t('friends.remove_from_myfriends') }}</q-item-section>
</q-item>
<q-item v-if="(!userStore.IsHandShakeByUsername(contact.username) && !userStore.IsAskedHandShakeByUsername(contact.username))"
clickable v-close-popup @click="setCmd($q, shared_consts.FRIENDSCMD.REQ_HANDSHAKE, userStore.my.username, true, contact.username)">
<q-item-section avatar>
<q-icon color="positive" name="far fa-handshake"/>
</q-item-section>
<q-item-section>{{ $t('handshake.ask_handshake') }}</q-item-section>
</q-item>
<q-item v-else-if="(!userStore.IsHandShakeByUsername(contact.username) && userStore.IsAskedHandShakeByUsername(contact.username))"
clickable v-close-popup @click="setCmd($q, shared_consts.FRIENDSCMD.REQ_HANDSHAKE, userStore.my.username, false, contact.username)">
<q-item-section avatar>
<q-icon color="negative" name="far fa-handshake-alt-slash"/>
</q-item-section>
<q-item-section>{{ $t('handshake.cancel_ask_handshake') }}</q-item-section>
</q-item>
<q-item v-else-if="userStore.IsHandShakeByUsername(contact.username)" style="min-width: 200px"
clickable v-close-popup
@click="setCmd($q, shared_consts.FRIENDSCMD.REMOVE_FROM_MYHANDSHAKE, userStore.my.username, '', contact.username)">
<q-item-section avatar>
<q-icon color="negative" name="far fa-handshake-alt-slash"/>
</q-item-section>
<q-item-section>{{ $t('handshake.remove_from_myhandshake') }}</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="tools.reportUser($q, userStore.my.username, contact.username)">
<q-item-section avatar>
<q-icon color="negative" name="fas fa-flag"/>