websockets implemented

This commit is contained in:
Torsten Schulz
2024-12-04 19:08:26 +01:00
parent d46a51db38
commit 069c97fa90
64 changed files with 2488 additions and 562 deletions

View File

@@ -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();