Friendship Accepted and Refused (notification updated)

This commit is contained in:
Paolo Arena
2022-07-27 20:55:47 +02:00
parent 43619ec719
commit 7f23fe6d05
10 changed files with 87 additions and 16 deletions

View File

@@ -86,7 +86,31 @@
</q-item-section>
<q-item-section v-ripple @click="clickNotif(notif)">
<q-item-label lines="3" :class="(!notif.read) ? 'unread' : 'read'"><div v-html="getNotifText(notif, false)"></div></q-item-label>
<q-item-label lines="3" :class="(!notif.read) ? 'unread' : 'read'">
<div v-html="getNotifText($t, notif, false)"></div>
</q-item-label>
<q-item-label caption lines="2" v-if="notif.typedir === shared_consts.TypeNotifs.TYPEDIR_FRIENDS && notif.status === 0">
<div class="row no-wrap justify-evenly" v-if="userStore.IsReqFriendByUsername(notif.sender)">
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-plus"
color="positive" :label="$t('friends.accept')"
@click="tools.addToMyFriends($q, userStore.my.username, notif.sender)"
/>
<q-btn
dense
rounded
size="sm"
icon="fas fa-user-minus"
color="negative" :label="$t('friends.refuse')"
@click="tools.refuseReqFriends($q, userStore.my.username, notif.sender)"
/>
</div>
</q-item-label>
<q-item-label caption lines="1" :class="(!notif.read) ? 'unread-date' : 'read-date'">
{{ tools.timeAgo(notif.datenotif) }}
<!--{{ // getUsernameChatByNotif(notif) }}-->