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
54bc2bae
Commit
54bc2bae
authored
Oct 20, 2023
by
Muhammadali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-
parent
7ba1067d
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
44 additions
and
8 deletions
+44
-8
package.json
package.json
+1
-1
index.jsx
src/components/InnerCaller/index.jsx
+32
-2
style.js
src/components/InnerCaller/style.js
+2
-1
index.jsx
src/components/ModalPhoneNumpad/index.jsx
+2
-0
style.js
src/components/ModalPhoneNumpad/style.js
+2
-2
index.jsx
src/root/index.jsx
+5
-2
No files found.
package.json
View file @
54bc2bae
{
{
"name"
:
"boxdialer"
,
"name"
:
"boxdialer"
,
"version"
:
"4.8.1
0
"
,
"version"
:
"4.8.1
1
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"src/boxDialer.js"
,
"main"
:
"src/boxDialer.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/components/InnerCaller/index.jsx
View file @
54bc2bae
...
@@ -4,9 +4,22 @@ import React from 'react';
...
@@ -4,9 +4,22 @@ import React from 'react';
import
Block
from
'
./style
'
;
import
Block
from
'
./style
'
;
import
{
useTranslator
}
from
'
@eo-locale/react
'
;
import
{
useTranslator
}
from
'
@eo-locale/react
'
;
import
{
intervalToDuration
}
from
'
date-fns
'
;
import
{
intervalToDuration
}
from
'
date-fns
'
;
import
{
useState
}
from
'
react
'
;
import
{
useEffect
}
from
'
react
'
;
import
MicIcon
from
'
@mui/icons-material/Mic
'
;
import
MicOffIcon
from
'
@mui/icons-material/MicOff
'
;
import
PlayArrowIcon
from
'
@mui/icons-material/PlayArrow
'
;
import
PauseIcon
from
'
@mui/icons-material/Pause
'
;
const
InnerCaller
=
({
hidden
,
type
,
from
,
innerTimer
})
=>
{
const
InnerCaller
=
({
hidden
,
type
,
from
,
innerTimer
})
=>
{
const
boxDialer
=
window
.
BoxDialer
;
const
boxDialer
=
window
.
BoxDialer
;
const
translator
=
useTranslator
();
const
translator
=
useTranslator
();
const
[
callEvents
,
setCallEvents
]
=
useState
({});
useEffect
(()
=>
{
boxDialer
.
setSipStateChangeCallback
(
setCallEvents
,
'
setCallEvents
'
);
},
[]);
const
dataFormatter
=
(
secund
)
=>
{
const
dataFormatter
=
(
secund
)
=>
{
let
ts
=
intervalToDuration
({
let
ts
=
intervalToDuration
({
start
:
0
,
start
:
0
,
...
@@ -21,7 +34,24 @@ const InnerCaller = ({ hidden, type, from, innerTimer }) => {
...
@@ -21,7 +34,24 @@ const InnerCaller = ({ hidden, type, from, innerTimer }) => {
case
'
connected
'
:
case
'
connected
'
:
return
(
return
(
<>
<>
<
div
className=
'button timer'
>
{
dataFormatter
(
innerTimer
)
}
</
div
>
<
div
className=
'button timer'
>
<
div
>
{
dataFormatter
(
innerTimer
)
}
</
div
>
<
div
onClick=
{
()
=>
boxDialer
.
holdButtonClick
()
}
>
{
callEvents
.
callHold
?
(
<
PlayArrowIcon
style=
{
{
color
:
'
#fff
'
}
}
/>
)
:
(
<
PauseIcon
style=
{
{
color
:
'
#fff
'
}
}
/>
)
}
</
div
>
<
div
onClick=
{
()
=>
boxDialer
.
muteButtonClick
()
}
>
{
callEvents
.
callMute
?
(
<
MicOffIcon
style=
{
{
color
:
'
#fff
'
}
}
/>
)
:
(
<
MicIcon
style=
{
{
color
:
'
#fff
'
}
}
/>
)
}
</
div
>
</
div
>
<
button
<
button
className=
'button red nocopy'
className=
'button red nocopy'
onClick=
{
()
=>
boxDialer
.
hangupButtonClick
()
}
>
onClick=
{
()
=>
boxDialer
.
hangupButtonClick
()
}
>
...
@@ -75,7 +105,7 @@ const InnerCaller = ({ hidden, type, from, innerTimer }) => {
...
@@ -75,7 +105,7 @@ const InnerCaller = ({ hidden, type, from, innerTimer }) => {
)
}
)
}
</
p
>
</
p
>
</
div
>
</
div
>
<
div
className=
'bottom'
>
{
selectModalType
(
type
)
}
</
div
>
<
div
className=
'bottom'
>
{
selectModalType
(
'
connected
'
)
}
</
div
>
</
Block
>
</
Block
>
);
);
};
};
...
...
src/components/InnerCaller/style.js
View file @
54bc2bae
...
@@ -46,7 +46,8 @@ const Block = styled.div`
...
@@ -46,7 +46,8 @@ const Block = styled.div`
.timer {
.timer {
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: space-between;
gap: 10px;
color: #fff;
color: #fff;
font-weight: bold;
font-weight: bold;
font-size: 18px;
font-size: 18px;
...
...
src/components/ModalPhoneNumpad/index.jsx
View file @
54bc2bae
...
@@ -28,6 +28,8 @@ const ModalPhoneNumpad = ({
...
@@ -28,6 +28,8 @@ const ModalPhoneNumpad = ({
const
[
numberSelectHistory
,
setNumberSelectHistory
]
=
useState
(
0
);
const
[
numberSelectHistory
,
setNumberSelectHistory
]
=
useState
(
0
);
const
[
exNum
,
setExNum
]
=
useState
();
const
[
exNum
,
setExNum
]
=
useState
();
const
translator
=
useTranslator
();
const
translator
=
useTranslator
();
useEffect
(()
=>
{
useEffect
(()
=>
{
let
currentCalls
=
localStorage
.
getItem
(
'
callhistory
'
)
let
currentCalls
=
localStorage
.
getItem
(
'
callhistory
'
)
?
JSON
.
parse
(
localStorage
.
getItem
(
'
callhistory
'
))
?
JSON
.
parse
(
localStorage
.
getItem
(
'
callhistory
'
))
...
...
src/components/ModalPhoneNumpad/style.js
View file @
54bc2bae
...
@@ -201,8 +201,8 @@ NumberButton.CallButtonModal = styled.div`
...
@@ -201,8 +201,8 @@ NumberButton.CallButtonModal = styled.div`
border
-
bottom
-
left
-
radius
:
30
px
;
border
-
bottom
-
left
-
radius
:
30
px
;
border
-
bottom
-
right
-
radius
:
30
px
;
border
-
bottom
-
right
-
radius
:
30
px
;
padding
:
3
px
3
px
15
px
3
px
;
padding
:
3
px
3
px
15
px
3
px
;
border
-
top
-
left
-
radius
:
10
px
;
border
-
top
-
left
-
radius
:
8
px
;
border
-
top
-
right
-
radius
:
10
px
;
border
-
top
-
right
-
radius
:
8
px
;
transition
:
0.1
s
;
transition
:
0.1
s
;
clip
-
path
:
polygon
(
100
%
0
,
100
%
93
%
,
57
%
93
%
,
50
%
100
%
,
43
%
93
%
,
0
93
%
,
0
0
);
clip
-
path
:
polygon
(
100
%
0
,
100
%
93
%
,
57
%
93
%
,
50
%
100
%
,
43
%
93
%
,
0
93
%
,
0
0
);
$
{({
visiblevalue
})
=>
$
{({
visiblevalue
})
=>
...
...
src/root/index.jsx
View file @
54bc2bae
...
@@ -203,8 +203,10 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
...
@@ -203,8 +203,10 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
/>
/>
<
InnerCaller
<
InnerCaller
hidden=
{
innerCallerModal
.
bool
}
// hidden={innerCallerModal.bool}
type=
{
innerCallerModal
.
type
}
hidden=
{
true
}
// type={innerCallerModal.type}
type=
{
'
connectingIncoming
'
}
from=
{
innerCallerModal
.
from
}
from=
{
innerCallerModal
.
from
}
innerTimer=
{
innerTimer
}
innerTimer=
{
innerTimer
}
/>
/>
...
@@ -214,3 +216,4 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
...
@@ -214,3 +216,4 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
);
);
};
};
export
default
Root
;
export
default
Root
;
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