[feature] added close button to the single room chat window

This commit is contained in:
Markus 2023-07-11 10:23:44 +02:00
parent 33f5746220
commit fade2eed21
2 changed files with 20 additions and 7 deletions

View File

@ -22,7 +22,13 @@
:responsive-breakpoint="responsiveBreakpoint"
:single-room="singleRoom"
@show-demo-options="showDemoOptions = $event"
/>
>
<div slot="menu-icon" @click.prevent.stop="$emit('close-single-room', true)">
<div v-if="singleRoom">
<ds-icon name="close"></ds-icon>
</div>
</div>
</vue-advanced-chat>
</client-only>
</div>
</template>
@ -47,7 +53,12 @@ export default {
data() {
return {
menuActions: [
/* {
// NOTE: if menuActions is empty, the related slot is not shown
{
name: 'dummyItem',
title: 'Just a dummy item',
}
/*{
name: 'inviteUser',
title: 'Invite User',
},

View File

@ -15,12 +15,9 @@
</client-only>
<div v-if="$store.getters['chat/showChat'].showChat" class="chat-modul">
<ds-text align="right" class="close">
RoomID: {{ $store.getters['chat/showChat'].roomID }}
<ds-button @click="$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' })">
x
</ds-button>
RoomID: {{ $store.getters['chat/showChat'].roomID }}
</ds-text>
<chat-module :singleRoomId="$store.getters['chat/showChat'].roomID" />
<chat-module v-on:close-single-room="closeSingleRoom" :singleRoomId="$store.getters['chat/showChat'].roomID" />
</div>
>
</div>
@ -41,6 +38,11 @@ export default {
ChatModule,
},
mixins: [seo, mobile()],
methods: {
closeSingleRoom(){
this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' });
}
}
}
</script>