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
d6c2a31c
Commit
d6c2a31c
authored
Sep 20, 2023
by
Muhammadali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
d4621ebd
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
183 additions
and
4 deletions
+183
-4
package.json
package.json
+1
-1
index.jsx
src/components/CallHistoryInputDropdown/index.jsx
+48
-0
style.js
src/components/CallHistoryInputDropdown/style.js
+123
-0
style.js
src/components/DropDown/style.js
+0
-1
index.jsx
src/components/ModalPhoneNumpad/index.jsx
+11
-2
No files found.
package.json
View file @
d6c2a31c
{
{
"name"
:
"boxdialer"
,
"name"
:
"boxdialer"
,
"version"
:
"1.8.
8
"
,
"version"
:
"1.8.
9
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"src/boxDialer.js"
,
"main"
:
"src/boxDialer.js"
,
"scripts"
:
{
"scripts"
:
{
...
...
src/components/CallHistoryInputDropdown/index.jsx
0 → 100644
View file @
d6c2a31c
/** @format */
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
Block
,
{
Input
,
ModalDropDown
}
from
'
./style.js
'
;
const
CallHistoryInputDropdown
=
({
inputValue
,
call_history
,
selectFunc
})
=>
{
const
[
modal
,
setModal
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
call_history
.
length
)
{
var
elem
=
document
.
getElementById
(
'
data
'
);
elem
.
scrollTop
=
elem
.
scrollHeight
;
}
},
[
call_history
]);
const
selectFuncInset
=
(
e
)
=>
{
selectFunc
(
e
);
setModal
(
false
);
};
return
(
<
Block
>
<
Input
onClick=
{
()
=>
setModal
(
!
modal
)
}
className=
'nocopy'
type=
'text'
value=
{
inputValue
}
>
{
inputValue
}
</
Input
>
<
ModalDropDown
visiblevalue=
{
modal
}
>
<
ModalDropDown
.
Inset
id=
'data'
>
{
call_history
.
reverse
().
map
((
value
,
index
)
=>
(
<
p
className=
'item'
key=
{
index
}
onClick=
{
()
=>
selectFuncInset
(
value
)
}
>
{
value
}
</
p
>
))
}
</
ModalDropDown
.
Inset
>
</
ModalDropDown
>
<
ModalDropDown
.
FullWindow
visiblevalue=
{
modal
}
onClick=
{
()
=>
setModal
(
!
modal
)
}
/>
</
Block
>
);
};
export
default
CallHistoryInputDropdown
;
src/components/CallHistoryInputDropdown/style.js
0 → 100644
View file @
d6c2a31c
/** @format */
import
styled
from
'
styled-components
'
;
const
Block
=
styled
.
div
`
height: 100%;
position: relative;
`
;
const
Input
=
styled
.
div
`
position: absolute;
top: 0;
left: 0;
margin: 0;
padding: 0;
box-sizing: border-box;
width: 100%;
height: 100%;
max-height: 45px;
border-radius: 3px;
background-color: #fff;
border: 0;
padding: 0 35px 0 10px;
font-size: 22px;
color: #000;
display: flex;
align-items: center;
:focus {
border-color: inherit;
-webkit-box-shadow: none;
box-shadow: none;
padding: 0 10px;
font-size: 24px;
outline: 0 none;
}
position: relative;
margin: 0;
outline: none;
&::-webkit-outer-spin-button,
&::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* Firefox */
&[type='number'] {
-moz-appearance: textfield;
}
`
;
const
ModalDropDown
=
styled
.
div
`
width: 200px;
height: 150px;
position: absolute;
background-color: #c9d5d9;
border-radius: 20px;
padding: 15px;
transition: 0.1s;
z-index: 15;
bottom: 60px;
left: 50%;
${({
visiblevalue
})
=>
visiblevalue
?
{
opacity
:
'
1
'
,
transform
:
'
translate(-50%, 0)
'
,
}
:
{
opacity
:
'
0
'
,
transform
:
'
translate(-50%, 0)
'
,
}}
`;
ModalDropDown.Inset = styled.div`
width
:
100
%
;
height
:
100
%
;
overflow
-
y
:
scroll
;
.
item
{
font
-
size
:
18
px
;
transition
:
0.2
s
;
padding
:
5
px
2
px
;
margin
:
3
px
0
;
border
-
radius
:
10
px
;
:
hover
{
background
-
color
:
#
00000014
;
}
}
::
-
webkit
-
scrollbar
{
width
:
5
px
;
}
/* Track */
::
-
webkit
-
scrollbar
-
track
{
background
:
#
fff0
;
}
/* Handle */
::
-
webkit
-
scrollbar
-
thumb
{
background
:
#
abaaaa
;
border
-
radius
:
10
px
;
}
/* Handle on hover */
::
-
webkit
-
scrollbar
-
thumb
:
hover
{
background
:
#
555
;
}
`;
ModalDropDown.FullWindow = styled.div`
display
:
$
{({
visiblevalue
})
=>
(
visiblevalue
?
'
block
'
:
'
none
'
)}
;
position: fixed;
left: 0;
top: 0;
z-index: 10;
width: 100%;
height: 100vh;
`
;
export
{
Input
,
ModalDropDown
};
export
default
Block
;
src/components/DropDown/style.js
View file @
d6c2a31c
...
@@ -9,7 +9,6 @@ const DropDownStyle = styled.div`
...
@@ -9,7 +9,6 @@ const DropDownStyle = styled.div`
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
position: relative;
position: relative;
`
;
`
;
DropDownStyle
.
Text
=
styled
.
div
`
DropDownStyle
.
Text
=
styled
.
div
`
font-size: 22px;
font-size: 22px;
...
...
src/components/ModalPhoneNumpad/index.jsx
View file @
d6c2a31c
...
@@ -7,6 +7,7 @@ import CallIcon from '@mui/icons-material/Call';
...
@@ -7,6 +7,7 @@ import CallIcon from '@mui/icons-material/Call';
import
{
toast
}
from
'
react-hot-toast
'
;
import
{
toast
}
from
'
react-hot-toast
'
;
import
DropDown
from
'
../DropDown
'
;
import
DropDown
from
'
../DropDown
'
;
import
{
CommentsDisabledOutlined
}
from
'
@mui/icons-material
'
;
import
{
CommentsDisabledOutlined
}
from
'
@mui/icons-material
'
;
import
CallHistoryInputDropdown
from
'
../CallHistoryInputDropdown
'
;
const
ModalPhoneNumpad
=
({
const
ModalPhoneNumpad
=
({
phoneModal
,
phoneModal
,
...
@@ -128,7 +129,6 @@ const ModalPhoneNumpad = ({
...
@@ -128,7 +129,6 @@ const ModalPhoneNumpad = ({
const
gameState
=
{
const
gameState
=
{
toggleCP
:
(
e
)
=>
{
toggleCP
:
(
e
)
=>
{
if
(
phoneModal
&&
(
modalState
.
bool
?
false
:
true
)
&&
e
.
key
===
'
Enter
'
)
{
if
(
phoneModal
&&
(
modalState
.
bool
?
false
:
true
)
&&
e
.
key
===
'
Enter
'
)
{
// boxDialer.initialized(inputValue);
callButton
();
callButton
();
}
else
if
(
}
else
if
(
phoneModal
&&
phoneModal
&&
...
@@ -184,6 +184,7 @@ const ModalPhoneNumpad = ({
...
@@ -184,6 +184,7 @@ const ModalPhoneNumpad = ({
localStorage
.
setItem
(
'
callhistory
'
,
newCallsStringify
);
localStorage
.
setItem
(
'
callhistory
'
,
newCallsStringify
);
}
}
boxDialer
.
initialized
(
inputValue
);
boxDialer
.
initialized
(
inputValue
);
setInputValue
(
''
);
}
else
{
}
else
{
toast
.
error
(
'
Please wait
'
,
{
toast
.
error
(
'
Please wait
'
,
{
style
:
{
style
:
{
...
@@ -192,6 +193,9 @@ const ModalPhoneNumpad = ({
...
@@ -192,6 +193,9 @@ const ModalPhoneNumpad = ({
});
});
}
}
};
};
const
selectFunc
=
(
e
)
=>
{
setInputValue
(
e
);
};
return
(
return
(
<
ModalPhoneNumpadStyle
<
ModalPhoneNumpadStyle
position=
{
position
}
position=
{
position
}
...
@@ -199,7 +203,12 @@ const ModalPhoneNumpad = ({
...
@@ -199,7 +203,12 @@ const ModalPhoneNumpad = ({
variant=
{
variant
}
variant=
{
variant
}
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
onClick=
{
(
e
)
=>
e
.
stopPropagation
()
}
>
<
ModalPhoneNumpadStyle
.
InputArea
>
<
ModalPhoneNumpadStyle
.
InputArea
>
<
Input
disabled
type=
'text'
value=
{
inputValue
}
/>
{
/* <Input disabled type='text' value={inputValue} /> */
}
<
CallHistoryInputDropdown
call_history=
{
call_history
}
inputValue=
{
inputValue
}
selectFunc=
{
selectFunc
}
/>
{
inputValue
.
length
?
(
{
inputValue
.
length
?
(
<
Input
.
BackSpaceIcon
<
Input
.
BackSpaceIcon
onClick=
{
()
=>
inputController
({
type
:
'
delete
'
,
from
:
'
button
'
})
}
onClick=
{
()
=>
inputController
({
type
:
'
delete
'
,
from
:
'
button
'
})
}
...
...
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