diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 8fc8fde..f1925fe 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -140,7 +140,7 @@ $chat-text-size: 0.7pt; margin-left: 30% !important; text-align: right; .bubble { - background-color: #00eea0; + background-color: #88eec0; border-radius: 10px 10px 0 10px; padding: 8px; } @@ -148,8 +148,23 @@ $chat-text-size: 0.7pt; padding: 0px; overflow: hidden; } - .message { - color: white; + .sender { + font-family: 'Titillium Web', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 10 * $chat-text-size; + color: rgba(#000000, 0.6); + display: inline-block; + margin-left: 40px; + margin-right: 8px; + } + .time { + font-family: 'Titillium Web', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 10 * $chat-text-size; + color: rgba(#000000, 0.6); + display: inline-block; } } @@ -159,12 +174,16 @@ $chat-text-size: 0.7pt; text-align: left; position: relative; .bubble { - background-color: white; - border-radius: 10px 10px 10px 0; + background-color: #eeeeee; + border-radius: 0px 10px 10px 10px; padding: 8px; border-width: 1px !important; border-style: solid !important; - border-color: #cccccc !important; + border-color: #eeeeee !important; + margin-left: 40px; + } + .audio-bubble { + margin-left: 40px; } .bubble.image-bubble { padding: 0px; @@ -177,8 +196,22 @@ $chat-text-size: 0.7pt; border: 2px solid white; } .sender { - position: relative; - left: 40px; + font-family: 'Titillium Web', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 10 * $chat-text-size; + color: rgba(#000000, 0.6); + display: inline-block; + margin-left: 40px; + margin-right: 8px; + } + .time { + font-family: 'Titillium Web', sans-serif; + font-weight: 400; + font-style: normal; + font-size: 10 * $chat-text-size; + color: rgba(#000000, 0.6); + display: inline-block; } } @@ -193,7 +226,7 @@ $chat-text-size: 0.7pt; .message { font-family: 'Titillium Web', sans-serif; font-weight: 400; - font-size: 22 * $chat-text-size; + font-size: 14 * $chat-text-size; color: #000000; overflow-wrap: break-word; .edit-marker { @@ -207,8 +240,8 @@ $chat-text-size: 0.7pt; font-weight: 300; font-style: italic; font-size: 15 * $chat-text-size; - text-align: center; color: #1c242a; + display: inline-block; } .statusEvent { diff --git a/src/assets/css/main.scss b/src/assets/css/main.scss index 379a96c..07dc4a4 100644 --- a/src/assets/css/main.scss +++ b/src/assets/css/main.scss @@ -1,3 +1,3 @@ -$background: #008860; +$background: #ffffff; @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&display=swap'); \ No newline at end of file diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 662ca48..8e0aaa5 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -60,7 +60,7 @@
- {{ contactIsTyping ? "Someone is typing..." : "" }} + {{ typingMembersString }}
@@ -215,7 +215,7 @@ export default { return { events: [], currentInput: "", - contactIsTyping: false, + typingMembers: [], timelineWindow: null, scrollPosition: null, currentImageInput: null, @@ -261,6 +261,16 @@ export default { sendButtonDisabled() { return this.currentInput.length == 0; }, + typingMembersString() { + const count = this.typingMembers.length; + if (count > 1) { + return "" + count + " members are typing"; + } else if (count > 0) { + return this.typingMembers[0].name + " is typing"; + } else { + return ""; + } + } }, watch: { @@ -271,7 +281,7 @@ export default { // Clear old events this.events = []; this.timelineWindow = null; - this.contactIsTyping = false; + this.typingMembers = []; if (!room) { return; // no room @@ -437,11 +447,21 @@ export default { } }, - onUserTyping(event) { - if (event.getRoomId() !== this.roomId) { + onUserTyping(event, member) { + if (member.roomId !== this.roomId) { return; // Not for this room } - console.log("Typing:", event); + if (member.typing) { + if (!this.typingMembers.includes(member)) { + this.typingMembers.push(member); + } + } else { + const index = this.typingMembers.indexOf(member); + if (index > -1) { + this.typingMembers.splice(index, 1); + } + } + console.log("Typing: ", this.typingMembers); }, sendMessage() { diff --git a/src/components/ChatHeader.vue b/src/components/ChatHeader.vue index dfd6ce5..816c066 100644 --- a/src/components/ChatHeader.vue +++ b/src/components/ChatHeader.vue @@ -4,7 +4,7 @@ - + diff --git a/src/components/messages/MessageIncomingAudio.vue b/src/components/messages/MessageIncomingAudio.vue index ffa06c0..d18876e 100644 --- a/src/components/messages/MessageIncomingAudio.vue +++ b/src/components/messages/MessageIncomingAudio.vue @@ -1,12 +1,10 @@