Skip to content

Commit

Permalink
fix: show "close" header icon when chat is popping up over call [WTEL…
Browse files Browse the repository at this point in the history
…-4027]
  • Loading branch information
dlohvinov committed Nov 9, 2023
1 parent 52e35dc commit d189b46
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>v{{ buildInfo.release }}--{{ buildInfo.build }}
</div>
<wt-icon-btn
v-show="showCloseBtn"
v-show="!hideCloseBtn"
icon="close"
size="sm"
@click="$emit('close')"
Expand All @@ -25,6 +25,7 @@
import { mapState } from 'vuex';
import SessionState from '../../../../modules/call/enums/SessionState.enum';
import WebitelLogo from '../../../assets/img/logo.svg';
import WidgetChannel from '../../../enums/WidgetChannel.enum';
export default {
name: 'wt-omni-widget-window-header',
Expand All @@ -35,6 +36,12 @@ export default {
build: process.env.VUE_APP_BUILD_NUMBER,
},
}),
props: {
channel: {
type: String, // WidgetChannel.enum
required: true,
},
},
computed: {
...mapState('call', {
callSessionState: (state) => state.sessionState,
Expand All @@ -43,8 +50,8 @@ export default {
const { logoUrl } = this.config.view;
return logoUrl || WebitelLogo;
},
showCloseBtn() {
return this.callSessionState === SessionState.IDLE;
hideCloseBtn() {
return this.channel === WidgetChannel.CALL && this.callSessionState !== SessionState.IDLE;
},
},
methods: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<section class="wt-omni-widget-window">
<portal-target name="in-window-popup"></portal-target>
<wt-omni-widget-header
:channel="channel"
@close="$emit('close')"
></wt-omni-widget-header>
<component
Expand Down

0 comments on commit d189b46

Please sign in to comment.