Add option to start private chat

By clicking on avatar. Issue #101.
This commit is contained in:
N-Pex 2021-05-10 16:11:03 +02:00
parent f3b37f7479
commit 91dfb0bc8e
6 changed files with 196 additions and 7 deletions

View file

@ -0,0 +1,37 @@
<template>
<div
:class="{
'avatar-operations': true,
incoming: incoming,
outgoing: !incoming,
}"
>
<v-btn v-if="incoming" text @click.stop="startPrivateChat" class="ma-0 pa-0"
>Private chat with this user</v-btn
>
</div>
</template>
<script>
import messageMixin from "./messageMixin";
export default {
mixins: [messageMixin],
mounted() {
// Any items to show?
if (this.room && this.event && this.$matrix.isDirectRoomWith(this.room, this.event.getSender())) {
this.$emit("close");
}
},
methods: {
startPrivateChat() {
this.$emit("close");
this.$emit("start-private-chat", { event: this.event });
},
},
};
</script>
<style lang="scss">
@import "@/assets/css/chat.scss";
</style>