Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BoxDialer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
BoxDialer
Commits
810c925d
Commit
810c925d
authored
Oct 23, 2023
by
Muhammadali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-
parent
9024a5a3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
38 deletions
+20
-38
package.json
package.json
+1
-1
modalEventProperty.js
src/context/modalEventProperty.js
+1
-0
index.jsx
src/root/index.jsx
+18
-37
No files found.
package.json
View file @
810c925d
{
"name"
:
"boxdialer"
,
"version"
:
"4.8.1
6
"
,
"version"
:
"4.8.1
7
"
,
"description"
:
""
,
"main"
:
"src/boxDialer.js"
,
"scripts"
:
{
...
...
src/context/modalEventProperty.js
View file @
810c925d
...
...
@@ -11,6 +11,7 @@ const ModalEventProperty = ({ children }) => {
useEffect
(()
=>
{
boxDialer
.
setSipStateChangeCallback
(
setCallEvents
,
'
setCallEvents
'
);
},
[]);
console
.
log
(
'
callEvents:
'
,
callEvents
);
return
(
<
contextModalEventProperty
.
Provider
value
=
{[
callEvents
,
setCallEvents
]}
>
{
children
}
...
...
src/root/index.jsx
View file @
810c925d
...
...
@@ -8,30 +8,25 @@ import Modal from '../components/Modal';
import
BxMiniWidjetUi
from
'
../components/BxMiniWidjetUi
'
;
import
SecondNotifSip
from
'
../components/SecondNotifSip
'
;
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
[
dynamicValue
,
setDynamicValue
]
=
useState
(
'
pending
'
);
const
[
modalState
,
setModalState
]
=
useState
(
false
);
...
...
@@ -64,16 +59,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
setInnerCallerModal
,
'
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
())
{
console
.
log
(
'
UA is running! in other tab
'
);
}
else
{
...
...
@@ -81,10 +66,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
}
setTimeout
(
function
waitUaRegisterLost
()
{
// console.log(
// '==========------------reg_checking: ',
// boxDialer.isUaRunning(),
// );
if
(
boxDialer
.
isUaRunning
()
||
boxDialer
.
isRestarting
)
{
setTimeout
(
waitUaRegisterLost
,
10
);
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment