From 25be953a11d64d04bf8b7b272540c5e06f50189d Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Sat, 10 Dec 2022 01:23:38 +0100 Subject: [PATCH] Add followed & banned status to search result in backend and frontend --- webui/src/components/UserCard.vue | 4 ++-- webui/src/views/SearchView.vue | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/webui/src/components/UserCard.vue b/webui/src/components/UserCard.vue index ecb58e0..fa2f02a 100644 --- a/webui/src/components/UserCard.vue +++ b/webui/src/components/UserCard.vue @@ -5,7 +5,7 @@ export default { data: function() { return { errorMsg: "aaa", - user_followed: this.post_followed, + user_followed: this.followed, user_banned: this.banned, myself: this.my_id == this.user_id, show_post_form: false, @@ -43,7 +43,7 @@ export default { unban() { this.$axios.delete("/users/" + this.my_id + "/bans/" + this.user_id) .then(response => { - this.user_banned = true + this.user_banned = false this.$emit('updateInfo') }) .catch(error => alert(error.toString())); diff --git a/webui/src/views/SearchView.vue b/webui/src/views/SearchView.vue index bce7e29..fec48ef 100644 --- a/webui/src/views/SearchView.vue +++ b/webui/src/views/SearchView.vue @@ -76,7 +76,12 @@ export default {
- +