From b663aa28dd31ffef865c5ba410a9f07bcfcec0f2 Mon Sep 17 00:00:00 2001 From: Marco Realacci Date: Sat, 24 Dec 2022 20:48:07 +0100 Subject: [PATCH] Vue: fix UserCard not always showing the username --- webui/src/components/UserCard.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webui/src/components/UserCard.vue b/webui/src/components/UserCard.vue index f3955bb..e2e89f7 100644 --- a/webui/src/components/UserCard.vue +++ b/webui/src/components/UserCard.vue @@ -2,6 +2,9 @@ export default { props: ["user_id", "name", "followed", "banned", "show_new_post"], watch: { + name: function (new_val, old_val) { + this.username = new_val; + }, banned: function (new_val, old_val) { this.user_banned = new_val; }, @@ -78,7 +81,7 @@ export default { }) }, }, - created() { + mounted() { }, }