websockets implemented
This commit is contained in:
@@ -4,9 +4,8 @@
|
||||
name="UserProfileDialog" display="flex">
|
||||
<div class="activities">
|
||||
<span>{{ $t(`socialnetwork.friendship.state.${friendshipState}`) }}</span>
|
||||
<img v-if="['none', 'denied', 'withdrawn'].includes(friendshipState)" src="/images/icons/request-friendship.png"
|
||||
@click="handleFriendship()" />
|
||||
<img v-else-if="['accepted', 'open']" src="/images/icons/cancel-friendship.png"
|
||||
<img :src="'/images/icons/' +
|
||||
(['none', 'denied', 'withdrawn'].includes(friendshipState) ? 'request-friendship.png' : 'cancel-friendship.png')"
|
||||
@click="handleFriendship()" />
|
||||
</div>
|
||||
<div class="profile-content">
|
||||
@@ -320,7 +319,7 @@ export default {
|
||||
},
|
||||
async handleFriendship() {
|
||||
console.log(this.friendshipState);
|
||||
if (this.friendshipState === 'none') {
|
||||
if (['none', 'withdrawn'].includes(this.friendshipState)) {
|
||||
this.requestFriendship();
|
||||
} else if (this.friendshipState === 'waiting') {
|
||||
this.cancelFriendship();
|
||||
|
||||
Reference in New Issue
Block a user