mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
[feature] added close button to the single room chat window
This commit is contained in:
parent
33f5746220
commit
fade2eed21
@ -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',
|
||||
},
|
||||
|
||||
@ -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>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user