diff --git a/webapp/components/Chat/Chat.vue b/webapp/components/Chat/Chat.vue index ce4d869ee..2f39afd07 100644 --- a/webapp/components/Chat/Chat.vue +++ b/webapp/components/Chat/Chat.vue @@ -28,6 +28,28 @@ + +
+
+
+ {{ getInitialsName(selectedRoom.roomName) }} +
+
+ +
+
+
+ {{ getInitialsName(room.roomName) }} +
+
@@ -122,6 +144,7 @@ export default { showDemoOptions: true, responsiveBreakpoint: 600, singleRoom: !!this.singleRoomId || false, + selectedRoom: null, } }, mounted() { @@ -174,6 +197,8 @@ export default { this.$toast.error(error.message) } this.messagesLoaded = true + + this.selectedRoom = room }) }, @@ -195,6 +220,11 @@ export default { } this.refetchMessage(message.roomId) }, + + getInitialsName(fullname){ + if(!fullname) return + return fullname.match(/\b\w/g).join('').substring(0, 3).toUpperCase() + } }, apollo: { Rooms: { @@ -235,4 +265,25 @@ export default { body { font-family: 'Quicksand', sans-serif; } +.vac-avatar { + background-size: cover; + background-position: center center; + background-repeat: no-repeat; + background-color: $color-primary-dark; + color: $text-color-primary-inverse; + height: 42px; + width: 42px; + min-height: 42px; + min-width: 42px; + margin-right: 15px; + border-radius: 50%; + position: relative; + + > .initials{ + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } +} diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 39a84bf14..0e7420956 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -19,7 +19,6 @@
- >