parent
f3b37f7479
commit
91dfb0bc8e
6 changed files with 196 additions and 7 deletions
37
src/components/messages/AvatarOperations.vue
Normal file
37
src/components/messages/AvatarOperations.vue
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue