Commit 527616c0 authored by Muhammadali's avatar Muhammadali

verison: 0.5.4

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