Commit 810c925d authored by Muhammadali's avatar Muhammadali

update-

parent 9024a5a3
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.8.16", "version": "4.8.17",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -11,6 +11,7 @@ const ModalEventProperty = ({ children }) => { ...@@ -11,6 +11,7 @@ const ModalEventProperty = ({ children }) => {
useEffect(() => { useEffect(() => {
boxDialer.setSipStateChangeCallback(setCallEvents, 'setCallEvents'); boxDialer.setSipStateChangeCallback(setCallEvents, 'setCallEvents');
}, []); }, []);
console.log('callEvents: ', callEvents);
return ( return (
<contextModalEventProperty.Provider value={[callEvents, setCallEvents]}> <contextModalEventProperty.Provider value={[callEvents, setCallEvents]}>
{children} {children}
......
...@@ -8,30 +8,25 @@ import Modal from '../components/Modal'; ...@@ -8,30 +8,25 @@ import Modal from '../components/Modal';
import BxMiniWidjetUi from '../components/BxMiniWidjetUi'; import BxMiniWidjetUi from '../components/BxMiniWidjetUi';
import SecondNotifSip from '../components/SecondNotifSip'; import SecondNotifSip from '../components/SecondNotifSip';
import InnerCaller from '../components/InnerCaller'; import InnerCaller from '../components/InnerCaller';
// setWsphonedata;
// const Root = ({ wsphonedata, onSetDnd, setWsphonedata }) => {
const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
// const [dataSecond, setDataSecond] = useState([]);
// if (!data) {
// data = {
// iscloud: true,
// number: '4003',
// wsurl: 'cld.alovoice.uz:61040',
// server_id: 40,
// secret: '26a830',
// lefttime: 231461,
// reasons: ['free', 'outcalls', 'home', 'totop'],
// reason: 'free',
// variant: 'bxmini',
// position: 'bottomRight',
// };
// }
// if (window?.alovoice_wsphone) {
// wsphonedata = window.alovoice_wsphone;
// onSetDnd = window.alovoice_onsetdnd;
// }
var no_active_delay = 60;
var now_no_active = 0;
function activeUser() {
now_no_active = 0;
}
function updateChat() {
if (now_no_active >= no_active_delay) {
location.reload();
return;
}
}
setInterval(() => {
now_no_active++;
updateChat();
}, 1000);
document.onmousemove = activeUser;
const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
const [phoneModal, setPhoneModal] = useState(false); const [phoneModal, setPhoneModal] = useState(false);
const [dynamicValue, setDynamicValue] = useState('pending'); const [dynamicValue, setDynamicValue] = useState('pending');
const [modalState, setModalState] = useState(false); const [modalState, setModalState] = useState(false);
...@@ -64,16 +59,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -64,16 +59,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
setInnerCallerModal, setInnerCallerModal,
'innerCallerModal', 'innerCallerModal',
); );
// console.log(
// 'isUaRunning: ==========---------------',
// typeof window.BX !== 'undefined',
// window.localStorage.getItem(BX.bitrix_sessid() + '_mycall'),
// window.localStorage.getItem('mycall'),
// '============================',
// Boolean(typeof window.BX !== 'undefined'),
// Boolean(window.localStorage.getItem(BX.bitrix_sessid() + '_mycall')),
// Boolean(window.localStorage.getItem('mycall')),
// );
if (boxDialer.isUaRunning()) { if (boxDialer.isUaRunning()) {
console.log('UA is running! in other tab'); console.log('UA is running! in other tab');
} else { } else {
...@@ -81,10 +66,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => { ...@@ -81,10 +66,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
} }
setTimeout(function waitUaRegisterLost() { setTimeout(function waitUaRegisterLost() {
// console.log(
// '==========------------reg_checking: ',
// boxDialer.isUaRunning(),
// );
if (boxDialer.isUaRunning() || boxDialer.isRestarting) { if (boxDialer.isUaRunning() || boxDialer.isRestarting) {
setTimeout(waitUaRegisterLost, 10); setTimeout(waitUaRegisterLost, 10);
} else { } else {
......
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