From 7b3f08a0d4f72ae0fbc8347e44d458841c0a8b65 Mon Sep 17 00:00:00 2001 From: Aziz Hasanain Date: Sat, 27 Feb 2021 00:49:45 +0300 Subject: [PATCH] Fix group chats, emails support, general bug fixes --- src/App.vue | 2 +- src/components/DownloadAttachment.vue | 4 +-- src/components/Message.vue | 36 +++++++++++++++++++-------- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/App.vue b/src/App.vue index ddb2cd9..f8b3f06 100644 --- a/src/App.vue +++ b/src/App.vue @@ -423,7 +423,7 @@ export default { } }) notif.show() - } else if (reaction.sender != 1) { + } else if (reactions && reactions.length > 0 && reactions[0].sender != 1) { console.log('Notifications are not supported on this system.') } }, diff --git a/src/components/DownloadAttachment.vue b/src/components/DownloadAttachment.vue index 6707e1c..19835fe 100644 --- a/src/components/DownloadAttachment.vue +++ b/src/components/DownloadAttachment.vue @@ -49,12 +49,12 @@ export default { border-radius: 10px; padding: 10px 10px; color: lighten(#c2c2c2, 20%); - width: 135px; + max-width: 100%; + width: max-content; background-color: #3A3A3C; position: relative; overflow-wrap: break-word; display: inline-block; - margin-bottom: 3px; .feather { float: right; diff --git a/src/components/Message.vue b/src/components/Message.vue index ede02d5..83c07ef 100644 --- a/src/components/Message.vue +++ b/src/components/Message.vue @@ -86,7 +86,7 @@
- -
+
@@ -504,6 +504,9 @@ export default { } else if (/^\+\d{11,16}/gi.test(input)) { this.receiver = input this.hookPasteAndDrop() + } else if (/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(input)) { + this.receiver = input + this.hookPasteAndDrop() } }, previewFiles () { @@ -693,7 +696,7 @@ export default { .attachmentPreview { border: 1px solid #545454; margin-left: 32px; - margin-right: 64px; + margin-right: 58px; margin-bottom: -1px; border-top-left-radius: 14px; border-top-right-radius: 14px; @@ -778,7 +781,7 @@ export default { font-family: 'Roboto', -apple-system, BlinkMacSystemFont, Avenir, Helvetica, Arial, sans-serif; margin-left: 32px; - width: calc(100% - 118px); + width: calc(100% - 112px); background: #1d1d1d !important; border: 1px solid #545454 !important; border-top-left-radius: 14px; @@ -800,7 +803,7 @@ export default { #twemoji-textarea-outer { background-color: transparent !important; - width: calc(100% - 58px); + width: calc(100% - 52px); float: left; #twemoji-textarea { @@ -983,8 +986,8 @@ export default { } .sendBtn { - width: 24px; - height: 24px; + width: 22px; + height: 22px; border-radius: 50%; background: #2284FF; float: right; @@ -992,7 +995,11 @@ export default { justify-content: center; align-items: center; cursor: pointer; - margin-right: 6px; + margin-right: 4px; + + &.SMS { + background: #35CC5B; + } svg { stroke: rgb(255,255,255); @@ -1032,8 +1039,8 @@ export default { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - max-width: calc(100% - 30px); - width: fit-content; + width: calc(100% - 30px); + // width: max-content; -webkit-app-region: no-drag; } } @@ -1123,7 +1130,7 @@ export default { .attachment { // max-width: 75%; // max-height: 60vh; - width: auto; + width: 100%; height: auto; border-radius: 18px; padding-bottom: 1px; @@ -1193,6 +1200,7 @@ export default { align-items: flex-start; flex-direction: column; margin-right: 25%; + width: 75%; max-width: 75%; margin-bottom: 1px; } @@ -1251,11 +1259,17 @@ export default { .send { align-items: flex-end; + .attachment { + display: inline-flex; + justify-content: flex-end; + } + .textWrapper { display: flex; align-items: flex-end; flex-direction: column; margin-left: 25%; + width: 75%; max-width: 75%; margin-bottom: 1px; }