feat: Add an SDK method for opening conversation in popout window (#4232)
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
<script>
|
||||
import { mapGetters } from 'vuex';
|
||||
import { IFrameHelper, RNHelper } from 'widget/helpers/utils';
|
||||
import { buildPopoutURL } from '../helpers/urlParamsHelper';
|
||||
import { popoutChatWindow } from '../helpers/popoutHelper';
|
||||
import FluentIcon from 'shared/components/FluentIcon/Index.vue';
|
||||
|
||||
export default {
|
||||
@@ -69,19 +69,12 @@ export default {
|
||||
chatwootWebChannel: { websiteToken },
|
||||
authToken,
|
||||
} = window;
|
||||
|
||||
const popoutWindowURL = buildPopoutURL({
|
||||
popoutChatWindow(
|
||||
origin,
|
||||
websiteToken,
|
||||
locale: this.$root.$i18n.locale,
|
||||
conversationCookie: authToken,
|
||||
});
|
||||
const popoutWindow = window.open(
|
||||
popoutWindowURL,
|
||||
`webwidget_session_${websiteToken}`,
|
||||
'resizable=off,width=400,height=600'
|
||||
this.$root.$i18n.locale,
|
||||
authToken
|
||||
);
|
||||
popoutWindow.focus();
|
||||
},
|
||||
closeWindow() {
|
||||
if (IFrameHelper.isIFrame()) {
|
||||
|
||||
Reference in New Issue
Block a user