From 80b38d463c0d5dacac93bc2aeb666bbb19781e1e Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Sat, 2 May 2020 01:17:43 +0200 Subject: [PATCH] UserBio: a few fixes, but still doesn't work as expected --- client/src/components/UserBio.vue | 20 +++++++++----- client/src/views/Game.vue | 45 ++++++++++++++++++++----------- client/src/views/Hall.vue | 5 +++- server/models/User.js | 2 +- server/routes/users.js | 3 ++- 5 files changed, 50 insertions(+), 25 deletions(-) diff --git a/client/src/components/UserBio.vue b/client/src/components/UserBio.vue index c954f3d8..181c7dfe 100644 --- a/client/src/components/UserBio.vue +++ b/client/src/components/UserBio.vue @@ -6,11 +6,10 @@ div data-checkbox="modalBio" ) .card - div(v-if="st.user.id == id") + div(v-if="st.user.id > 0 && st.user.id == uid") h3.section(@click="modeEdit = !modeEdit") Click to edit textarea( - v-if="userBio !== undefined" - v-show="modeEdit" + v-if="userBio !== undefined && modeEdit" v-model="userBio" ) button#submitBtn(@click="sendBio()") Submit @@ -20,7 +19,11 @@ div @click="modeEdit = !modeEdit" ) #dialog.text-center {{ st.tr[infoMsg] }} - span.clickable(@click="showBio()") {{ name }} + span( + :class="{ clickable: !!uname }" + @click="showBio()" + ) + | {{ uname || "@nonymous" }}