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
a312fd73
Commit
a312fd73
authored
Oct 05, 2023
by
Muhammadali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update-
parent
6877e063
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
118 additions
and
7 deletions
+118
-7
package.json
package.json
+1
-1
style.js
src/components/BxMiniWidjetUi/style.js
+2
-1
index.jsx
src/components/InnerCaller/index.jsx
+34
-0
style.js
src/components/InnerCaller/style.js
+71
-0
style.js
src/components/ModalPhoneNumpad/style.js
+7
-2
controlRenderBX.jsx
src/lib/controlRenderBX.jsx
+0
-1
index.jsx
src/root/index.jsx
+3
-2
No files found.
package.json
View file @
a312fd73
{
"name"
:
"boxdialer"
,
"version"
:
"3.
7.9
"
,
"version"
:
"3.
8.0
"
,
"description"
:
""
,
"main"
:
"src/boxDialer.js"
,
"scripts"
:
{
...
...
src/components/BxMiniWidjetUi/style.js
View file @
a312fd73
...
...
@@ -19,6 +19,7 @@ const colorTypeFunc = (type) => {
};
const
BxMiniWidjetUiStyle
=
styled
.
div
`
box-shadow: -2px 0px 9px 3px #0000004f;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
/* background-color:
${({
status
=
''
})
=>
status
===
'
pending
'
...
...
@@ -98,7 +99,7 @@ BxMiniWidjetUiStyle.StatusLine = styled.div`
height
:
100
%
;
border
-
bottom
-
left
-
radius
:
30
px
;
border
-
bottom
-
right
-
radius
:
30
px
;
$
{({
status
})
=>
(
status
?
status
:
{})}
/* ${({ status }) => (status ? status : {})} */
display
:
flex
;
align
-
items
:
center
;
justify
-
content
:
center
;
...
...
src/components/InnerCaller/index.jsx
0 → 100644
View file @
a312fd73
/** @format */
import
React
from
'
react
'
;
import
Block
from
'
./style
'
;
import
{
useTranslator
}
from
'
@eo-locale/react
'
;
const
InnerCaller
=
({
hidden
,
modalState
})
=>
{
const
boxDialer
=
window
.
BoxDialer
;
const
translator
=
useTranslator
();
return
(
<
Block
hidden=
{
hidden
}
>
<
div
className=
'top'
>
<
p
className=
'call_text nocopy'
>
{
translator
.
translate
(
'
CALL_FROM
'
)
}{
'
'
}
<
span
>
{
this
?.
callSession
?.
_remote_identity
?.
_uri
?.
user
}
</
span
>
</
p
>
</
div
>
<
div
className=
'bottom'
>
<
button
className=
'button light_blue nocopy'
onClick=
{
()
=>
boxDialer
.
answerButtonClick
()
}
>
{
translator
.
translate
(
'
ANSWER
'
)
}
</
button
>
<
button
className=
'button red nocopy'
onClick=
{
()
=>
boxDialer
.
skipButtonClick
()
}
>
{
translator
.
translate
(
'
REJECT
'
)
}
</
button
>
</
div
>
</
Block
>
);
};
export
default
InnerCaller
;
src/components/InnerCaller/style.js
0 → 100644
View file @
a312fd73
/** @format */
import
styled
from
'
styled-components
'
;
const
positionInnerCaller
=
(
pos
)
=>
{
const
open
=
{
right
:
'
52px
'
,
};
const
hidden
=
{
right
:
'
-270px
'
,
};
pos
?
open
:
hidden
;
};
const
Block
=
styled
.
div
`
box-shadow: -2px 0px 9px 3px #0000004f;
z-index: 998;
box-sizing: border-box;
padding: 5px 15px 5px 10px;
position: fixed;
bottom: 1px;
right: 52px;
height: 62px;
width: 250px;
border: 3px solid green;
background-color: #fff;
/* border-radius: 13px; */
border-top-left-radius: 13px;
border-bottom-left-radius: 13px;
transition: 0.3s;
${({
hidden
})
=>
positionInnerCaller
(
hidden
)}
display: grid;
grid-template-rows: 1fr 1fr;
grid-row-gap: 5px;
.top {
display: flex;
align-items: center;
justify-content: center;
}
.bottom {
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
.call_text {
padding: 0;
margin: 0;
}
.button {
max-width: 100px;
width: 100%;
padding: 5px 0px;
border-radius: 5px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
}
.light_blue {
background-color: #d2f95f;
border: 0;
color: #333;
}
.red {
background-color: #ff0505;
border: 0;
color: #fff;
}
`
;
export
default
Block
;
src/components/ModalPhoneNumpad/style.js
View file @
a312fd73
...
...
@@ -5,6 +5,8 @@ import KeyboardBackspaceIcon from '@mui/icons-material/KeyboardBackspace';
import
{
boxDialerWidjetPosition
}
from
'
../../lib/boxDialerWidjetPosition
'
;
const
ModalPhoneNumpadStyle
=
styled
.
div
`
backdrop-filter: blur(4px);
box-shadow: inset 0 0 20px 20px #c0bbbb45;
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
margin: 0;
padding: 0;
...
...
@@ -18,7 +20,7 @@ const ModalPhoneNumpadStyle = styled.div`
hiddenValue
?
boxDialerWidjetPosition
[
variant
][
position
].
numpad
.
hidden
:
boxDialerWidjetPosition
[
variant
][
position
].
numpad
.
seen
}
background-color: #c9d5d9;
/* background-color: #c9d5d9; */
border-radius: 20px;
padding: 15px;
display: grid;
...
...
@@ -83,6 +85,9 @@ Input.BackSpaceIcon = styled(KeyboardBackspaceIcon)`
`
;
const
NumberButton
=
styled
.
div
`
/* background-color: #607d8b8f; */
text-shadow: 0px 0px 3px #000;
border-radius: 20px;
color: #fff;
font-weight: bold;
display: flex;
...
...
@@ -97,7 +102,7 @@ const NumberButton = styled.div`
?
status
===
'
pending
'
?
'
orange
'
:
status
===
'
connected
'
&&
'
#a0c13d
'
:
'
#
5e5e5e
'
}
;
:
'
#
607d8b8f
'
}
;
`
;
NumberButton
.
Icon
=
styled
.
div
`
font-size: 20px;
...
...
src/lib/controlRenderBX.jsx
View file @
a312fd73
...
...
@@ -4,7 +4,6 @@ import Root from '../root';
const
ControlRenderBX
=
()
=>
{
const
[
wsphonedata
,
setWsphonedata
]
=
useState
({});
console
.
log
(
'
boxdialer_wsphone_data:
'
,
window
.
alovoice_wsphone
);
useEffect
(()
=>
{
setWsphonedata
(
window
.
alovoice_wsphone
);
if
(
!
window
.
alovoice_wsphone
)
{
...
...
src/root/index.jsx
View file @
a312fd73
...
...
@@ -7,6 +7,7 @@ import ModalPhoneNumpad from '../components/ModalPhoneNumpad';
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
})
=>
{
...
...
@@ -31,8 +32,6 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
// onSetDnd = window.alovoice_onsetdnd;
// }
console
.
log
(
'
boxdialer_wsphone_data:
'
,
wsphonedata
);
const
[
phoneModal
,
setPhoneModal
]
=
useState
(
false
);
const
[
dynamicValue
,
setDynamicValue
]
=
useState
(
'
pending
'
);
const
[
modalState
,
setModalState
]
=
useState
(
false
);
...
...
@@ -145,6 +144,8 @@ const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
}
/>
<
InnerCaller
hidden=
{
modalState
.
bool
}
modalState=
{
modalState
}
/>
<
SecondNotifSip
secondLine=
{
secondLine
}
/>
</>
);
...
...
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