From 82dfdf6ed394c347deb06e97575524ba15e97d85 Mon Sep 17 00:00:00 2001 From: 10G Meow <10gmeow@gmail.com> Date: Sun, 10 Apr 2022 10:32:25 +0300 Subject: [PATCH 01/19] onReply show only latest messages and remove previous conversation --- src/components/Chat.vue | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 0bdf05b..77a335b 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -137,7 +137,7 @@
{{ $t("message.replying_to", { user: replyToEvent.sender.name }) }}
-
{{ replyToEvent.getContent().body }}
+
{{ replyToEvent.getContent().body | latestReply }}
{{ $t("message.reply_image") }}
{{ $t("message.reply_audio_message") }}
{{ $t("message.reply_video") }}
@@ -643,6 +643,16 @@ export default { }; }, + filters: { + latestReply(contents) { + const contentArr = contents.split('\n').reverse(); + if (contentArr[0] === '') { + contentArr.shift(); + } + return contentArr[0].replace(/^> (<.*> )?/g, ''); + } + }, + mounted() { const container = this.$refs.chatContainer; this.scrollPosition = new ScrollPosition(container); From 52869784a5e955bbf446a53bfd46747cc73cd8af Mon Sep 17 00:00:00 2001 From: 10G Meow <10gmeow@gmail.com> Date: Sun, 10 Apr 2022 11:56:24 +0300 Subject: [PATCH 02/19] room details header improvement and fixes --- src/assets/css/_utilities.scss | 6 ++++++ src/assets/css/chat.scss | 4 +++- src/components/RoomInfo.vue | 9 ++++----- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/assets/css/_utilities.scss b/src/assets/css/_utilities.scss index f7c4fd3..53f4bfb 100644 --- a/src/assets/css/_utilities.scss +++ b/src/assets/css/_utilities.scss @@ -18,3 +18,9 @@ .white-space-pre { white-space: pre; } +.v-visible { + visibility: visible; +} +.v-hidden { + visibility: hidden; +} \ No newline at end of file diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss index 6ea6685..f8dde87 100644 --- a/src/assets/css/chat.scss +++ b/src/assets/css/chat.scss @@ -818,7 +818,9 @@ $admin-fg: white; } .filled-button { - min-width: 180px !important; + @media #{map-get($display-breakpoints, 'sm-and-up')} { + min-width: 180px !important; + } } .v-card { diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 4cb538b..56169cf 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -1,23 +1,22 @@ @@ -58,19 +80,24 @@ import LeaveRoomDialog from "../components/LeaveRoomDialog"; import ProfileInfoPopup from "../components/ProfileInfoPopup"; import profileInfoMixin from "../components/profileInfoMixin"; +import PurgeRoomDialog from "../components/PurgeRoomDialog"; + +import roomInfoMixin from "./roomInfoMixin"; export default { name: "ChatHeader", - mixins: [profileInfoMixin], + mixins: [profileInfoMixin, roomInfoMixin], components: { LeaveRoomDialog, ProfileInfoPopup, + PurgeRoomDialog }, data() { return { memberCount: null, showLeaveConfirmation: false, showProfileInfo: false, + showPurgeConfirmation: false }; }, mounted() { diff --git a/src/components/RoomInfo.vue b/src/components/RoomInfo.vue index 3732bcc..02053ff 100644 --- a/src/components/RoomInfo.vue +++ b/src/components/RoomInfo.vue @@ -167,19 +167,6 @@ - -
- {{ $t("room_info.purge") }} -
-
{{ $t("room_info.version_info", { version: buildVersion }) }}
@@ -190,12 +177,6 @@ @close="showLeaveConfirmation = false" /> - -
@@ -203,7 +184,6 @@