Commit 527616c0 authored by Muhammadali's avatar Muhammadali

verison: 0.5.4

parent 901e0499
{
"name": "boxdialer",
"version": "0.5.3",
"version": "0.5.4",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
......@@ -13,7 +13,7 @@ const MainBlock = styled.div`
transition: '0.3s',
width: '175px',
height: '45px',
bottom: '170px',
bottom: '115px',
left: '50px',
borderRadius: '50px',
display: 'flex',
......
......@@ -16,6 +16,7 @@ import CallIcon from '@mui/icons-material/Call';
import { toast } from 'react-hot-toast';
import DropDownTailwind from '../TailwindComponents/DropDown';
import TimerUi from '../TimerUi';
import '../../index.css';
const WidjetButton = ({ data, onSetDnd }) => {
if (!data) {
......@@ -32,6 +33,7 @@ const WidjetButton = ({ data, onSetDnd }) => {
}
if (window?.alovoice_wsphone) {
// data = window.alovoice_wsphone; // если window.alovoice_wsphone то кроме numpad не какой UI не должен работать
data = window.alovoice_wsphone;
onSetDnd = window.alovoice_onsetdnd;
// console.log(
......
......@@ -7,7 +7,6 @@ import { createRoot } from 'react-dom/client';
import { Toaster } from 'react-hot-toast';
import WidjetButton from './components/WidjetButton/index';
import { BoxDialer } from './lib/boxDIaler';
import './index.css';
window.BoxDialer = new BoxDialer();
......
......@@ -216,28 +216,37 @@ export class BoxDialer {
this.oSipSessionRegister.register();
}
callBxMethods({ bxMethodName, bxFuncParams, callback }) {
if (window.BX24 && window.BX24.placement) {
window?.BX24.placement.call(bxMethodName, bxFuncParams, callback);
} else if (window.alovoicePhone && window.alovoicePhone.callMethods) {
window.alovoicePhone.callMethods[bxMethodName](bxFuncParams, callback);
}
}
setGuiPhoneState({ stateCode, funcName, funcParam }) {
if (typeof window?.BX24 !== 'undefined') {
let bxStateCode = '';
let uiState = '';
switch (stateCode) {
case 'i_new_call':
bxStateCode = 'incoming';
uiState = 'incoming';
break;
case 'connected':
bxStateCode = '';
uiState = 'connected';
break;
default:
break;
}
window?.BX24.placement.call(
'CallCardSetUiState',
{ uiState: bxStateCode },
(e) => {
this.bxLog('CallCardSetUiState', e);
this.callBxMethods({
bxMethodName: 'CallCardSetUiState',
bxFuncParams: { uiState },
callback: (e) => {
console.log(e, `CallCardSetUiState method done ${e}`);
},
);
});
} else {
if (this.onSipStateChange[funcName] !== 'undefined') {
this.onSipStateChange[funcName](funcParam);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment