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"
|
:responsive-breakpoint="responsiveBreakpoint"
|
||||||
:single-room="singleRoom"
|
:single-room="singleRoom"
|
||||||
@show-demo-options="showDemoOptions = $event"
|
@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>
|
</client-only>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -47,6 +53,11 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
menuActions: [
|
menuActions: [
|
||||||
|
// NOTE: if menuActions is empty, the related slot is not shown
|
||||||
|
{
|
||||||
|
name: 'dummyItem',
|
||||||
|
title: 'Just a dummy item',
|
||||||
|
}
|
||||||
/*{
|
/*{
|
||||||
name: 'inviteUser',
|
name: 'inviteUser',
|
||||||
title: 'Invite User',
|
title: 'Invite User',
|
||||||
|
|||||||
@ -16,11 +16,8 @@
|
|||||||
<div v-if="$store.getters['chat/showChat'].showChat" class="chat-modul">
|
<div v-if="$store.getters['chat/showChat'].showChat" class="chat-modul">
|
||||||
<ds-text align="right" class="close">
|
<ds-text align="right" class="close">
|
||||||
RoomID: {{ $store.getters['chat/showChat'].roomID }}
|
RoomID: {{ $store.getters['chat/showChat'].roomID }}
|
||||||
<ds-button @click="$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' })">
|
|
||||||
x
|
|
||||||
</ds-button>
|
|
||||||
</ds-text>
|
</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>
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
@ -41,6 +38,11 @@ export default {
|
|||||||
ChatModule,
|
ChatModule,
|
||||||
},
|
},
|
||||||
mixins: [seo, mobile()],
|
mixins: [seo, mobile()],
|
||||||
|
methods: {
|
||||||
|
closeSingleRoom(){
|
||||||
|
this.$store.commit('chat/SET_OPEN_CHAT', { showChat: false, roomID: 'u0' });
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user