From b355c9d72df717255ab4474f859f4bf96e6d1f5e Mon Sep 17 00:00:00 2001 From: DorraJaouad Date: Wed, 6 Sep 2023 15:42:47 +0200 Subject: [PATCH] Move the method to the guestNameStore and don't use setGuestUsername in the welcome window and other refactoring Signed-off-by: DorraJaouad --- src/components/ChatView.vue | 6 +-- src/components/GuestWelcomeWindow.vue | 59 ++++++++++++++------------- src/components/LobbyScreen.vue | 6 +-- src/components/SetGuestUsername.vue | 10 ++--- 4 files changed, 40 insertions(+), 41 deletions(-) diff --git a/src/components/ChatView.vue b/src/components/ChatView.vue index 6452746c172..96b17399d54 100644 --- a/src/components/ChatView.vue +++ b/src/components/ChatView.vue @@ -23,7 +23,7 @@ @dragover.prevent="handleDragOver" @dragleave.prevent="handleDragLeave" @drop.prevent="handleDropFiles"> - +
@@ -113,8 +113,8 @@ export default { return this.$store.getters.getActorType() === 'guests' }, - isGuestAndhasNotUserName() { - const userName = localStorage.getItem('nick') + isGuestAndhasNotUsername() { + const userName = this.$store.getters.getDisplayName() return !userName && this.isGuest }, diff --git a/src/components/GuestWelcomeWindow.vue b/src/components/GuestWelcomeWindow.vue index dcf617d0c7c..4ccdfd6678e 100644 --- a/src/components/GuestWelcomeWindow.vue +++ b/src/components/GuestWelcomeWindow.vue @@ -21,8 +21,7 @@ -->