diff --git a/src/assets/css/_variables.scss b/src/assets/css/_variables.scss index ea510aa..88fa7b5 100644 --- a/src/assets/css/_variables.scss +++ b/src/assets/css/_variables.scss @@ -18,4 +18,6 @@ $voice-recording-color: red; $voice-recorded-color: #3ae17d; $poll-hilite-color: #6360f0; $poll-hilite-color-bg: #d6d5fc; -$alert-bg-color: #FF3300; \ No newline at end of file +$alert-bg-color: #FF3300; + +$min-touch-target: 48px; \ No newline at end of file diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 4938df9..0636372 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -286,7 +286,7 @@ body { .input-area-button { margin: 0; padding: 0; - min-width: 48px; + min-width: $min-touch-target; &.input-more-icon { svg { @@ -430,6 +430,10 @@ body { display: inline-block; position: relative; max-width: 70%; + + @media #{map-get($display-breakpoints, 'sm-and-down')} { + min-height: $min-touch-target; + } } &.from-admin .bubble { background-color: rgba($admin-bg,0.8); @@ -520,6 +524,10 @@ body { display: inline-block; position: relative; max-width: 70%; + + @media #{map-get($display-breakpoints, 'sm-and-down')} { + min-height: $min-touch-target; + } } .audio-bubble { background-color: rgba(#e5e5e5,0.8); @@ -1409,7 +1417,7 @@ body { bottom: 68px; left: 8px; right: 8px; - height: 48px; + height: $min-touch-target; background: rgba(0, 0, 0, 0.69); border: 1px solid #000000; border-radius: 5px; diff --git a/src/assets/css/components/_poll.scss b/src/assets/css/components/_poll.scss index 89374a2..8e39b64 100644 --- a/src/assets/css/components/_poll.scss +++ b/src/assets/css/components/_poll.scss @@ -37,7 +37,7 @@ border-radius: 4px; padding: 15px 14px; margin: 0px; - height: 48px; + height: $min-touch-target; &:hover { cursor: pointer; } @@ -225,7 +225,7 @@ .add-answer-button { border-radius: 4px; - height: 48px; + height: $min-touch-target; width: 100%; overflow: hidden; border: 1px solid #242424; diff --git a/src/assets/css/filedrop.scss b/src/assets/css/filedrop.scss index f4cccd1..b66c5dd 100644 --- a/src/assets/css/filedrop.scss +++ b/src/assets/css/filedrop.scss @@ -1,4 +1,4 @@ -$large-button-height: 48px; +$large-button-height: $min-touch-target; $small-button-height: 36px; .file-drop-root { @@ -295,11 +295,11 @@ $small-button-height: 36px; position: relative; padding: 8px; .v-image { - width: 48px; - height: 48px; + width: $min-touch-target; + height: $min-touch-target; border-radius: 8px; object-fit: cover; - flex: 0 0 48px; + flex: 0 0 $min-touch-target; margin-right: 8px; } margin-bottom: 8px; diff --git a/src/assets/heart.png b/src/assets/heart.png new file mode 100644 index 0000000..8d357d1 Binary files /dev/null and b/src/assets/heart.png differ diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 0446698..bac6bbc 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -82,6 +82,7 @@ showMoreMessageOperations({event: event, anchor: $event.anchor}) " v-on:layout-change="onLayoutChange" + v-on:addQuickHeartReaction="addQuickHeartReaction(event)" /> @@ -327,6 +328,9 @@ +
+
+
@@ -493,6 +497,7 @@ export default { retentionTimer: null, showProfileDialog: false, showPurgeConfirmation: false, + heartAnimation: false }; }, @@ -533,6 +538,9 @@ export default { }, computed: { + heartEmoji() { + return this.$refs.emojiPicker.mapEmojis["Symbols"].find(({ aliases }) => aliases.includes('heart')).data; + }, compActiveMember() { const currentUserId= this.selectedEvent?.sender.userId || this.$matrix.currentUserId return this.joinedAndInvitedMembers.find(({userId}) => userId === currentUserId) @@ -1569,6 +1577,10 @@ export default { this.sendQuickReaction({ reaction: e.emoji, event: e.event }); }, + addQuickHeartReaction(event) { + this.sendQuickReaction({ reaction: this.heartEmoji, event }, true); + }, + setReplyToImage(event) { util .getThumbnail(this.$matrix.matrixClient, event, this.$config) @@ -1652,7 +1664,15 @@ export default { }); }, - sendQuickReaction(e) { + showHeartAnimation() { + const self = this; + this.heartAnimation = true; + setTimeout(() => { + self.heartAnimation = false; + }, 1000) + }, + + sendQuickReaction(e, heartAnimationFlag = false) { let previousReaction = null; // Figure out if we have already sent this emoji, in that case redact it again (toggle) @@ -1679,6 +1699,10 @@ export default { .catch((err) => { console.log("Failed to send quick reaction:", err); }); + + if(heartAnimationFlag) { + this.showHeartAnimation(); + } } }, @@ -1909,4 +1933,33 @@ export default { diff --git a/src/components/InputControl.vue b/src/components/InputControl.vue index 251bd7e..fb74749 100644 --- a/src/components/InputControl.vue +++ b/src/components/InputControl.vue @@ -73,7 +73,7 @@ export default { width: 100%; display: flex; position: relative; - min-height: 48px; + min-height: $min-touch-target; background: #f5f5f5; border-radius: 4px; diff --git a/src/components/MessageRetentionDialog.vue b/src/components/MessageRetentionDialog.vue index 8ebb7ce..6a37160 100644 --- a/src/components/MessageRetentionDialog.vue +++ b/src/components/MessageRetentionDialog.vue @@ -117,6 +117,6 @@ export default { } .v-radio.flex-row-reverse { - height: 48px; + height: $min-touch-target; } diff --git a/src/components/file_mode/ThumbnailView.vue b/src/components/file_mode/ThumbnailView.vue index 1756151..02f9b77 100644 --- a/src/components/file_mode/ThumbnailView.vue +++ b/src/components/file_mode/ThumbnailView.vue @@ -1,16 +1,16 @@ diff --git a/src/components/messages/MessageIncoming.vue b/src/components/messages/MessageIncoming.vue index 6e945be..eb40a2c 100644 --- a/src/components/messages/MessageIncoming.vue +++ b/src/components/messages/MessageIncoming.vue @@ -14,7 +14,9 @@ }} - + + +
more_vert @@ -28,10 +30,16 @@ diff --git a/src/components/messages/MessageIncomingImage.vue b/src/components/messages/MessageIncomingImage.vue index 732c584..08bb1dd 100644 --- a/src/components/messages/MessageIncomingImage.vue +++ b/src/components/messages/MessageIncomingImage.vue @@ -1,13 +1,12 @@