Commit f497df0e authored by Muhammadali's avatar Muhammadali

update verison: 0.8.5

parent 91fd4397
This diff is collapsed.
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.4", "version": "0.8.5",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1", "react-hot-toast": "^2.4.1",
"styled-components": "^6.0.7" "styled-components": "^5.3.5"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.22.10", "@babel/core": "^7.22.10",
......
...@@ -13,22 +13,22 @@ const BxMiniWidjetUi = ({ ...@@ -13,22 +13,22 @@ const BxMiniWidjetUi = ({
onClick, onClick,
position, position,
}) => { }) => {
console.log(reason, 'reason');
return ( return (
<BxMiniWidjetUiStyle <BxMiniWidjetUiStyle
status={widjetState} status={widjetState || ''}
onClick={onClick} onClick={onClick}
position={position}> position={position}>
<div className='left'> <div className='left'>
<p className='title'>{phoneNumber}</p> <p className='title'>{phoneNumber}</p>
<p> <p>
<span className='status'>{reason}</span> <BxMiniWidjetUiStyle.ReasonTest className='status' reason={reason}>
{reason}
</BxMiniWidjetUiStyle.ReasonTest>
<TimerUi reason={reason} time={leftTime} /> <TimerUi reason={reason} time={leftTime} />
</p> </p>
</div> </div>
<div className='bottom'> <div className='bottom'>
<BxMiniWidjetUiStyle.StatusLine status={widjetState}> <BxMiniWidjetUiStyle.StatusLine status={widjetState || ''}>
<p className='verison'>v {widjetVersion}</p> <p className='verison'>v {widjetVersion}</p>
</BxMiniWidjetUiStyle.StatusLine> </BxMiniWidjetUiStyle.StatusLine>
</div> </div>
......
...@@ -11,7 +11,7 @@ const BxMiniWidjetUiStyle = styled.div` ...@@ -11,7 +11,7 @@ const BxMiniWidjetUiStyle = styled.div`
box-sizing: border-box; box-sizing: border-box;
} }
height: 70px; height: 90px;
width: 80px; width: 80px;
border-radius: 13px; border-radius: 13px;
background-color: #164e63e6; background-color: #164e63e6;
...@@ -48,20 +48,30 @@ const BxMiniWidjetUiStyle = styled.div` ...@@ -48,20 +48,30 @@ const BxMiniWidjetUiStyle = styled.div`
grid-column: 1/3; grid-column: 1/3;
grid-row: 2/3; grid-row: 2/3;
} }
.status { `;
border-radius: 10px;
padding: 0 3px; BxMiniWidjetUiStyle.ReasonTest = styled.div`
margin: 0 5px; border-radius: 10px;
font-size: 12px; padding: 0 1px;
color: #ffffffab; margin: 0 5px;
} font-size: 12px;
${({ reason }) =>
reason == 'free'
? {
color: '#ffffffab',
}
: {
backgroundColor: 'orange',
color: '#000',
}}
`; `;
BxMiniWidjetUiStyle.StatusLine = styled.div` BxMiniWidjetUiStyle.StatusLine = styled.div`
height: 100%; height: 100%;
background-color: ${({ backColor }) => backColor}; background-color: ${({ backColor }) => backColor};
border-bottom-left-radius: 30px; border-bottom-left-radius: 30px;
border-bottom-right-radius: 30px; border-bottom-right-radius: 30px;
background-color: ${({ status }) => background-color: ${({ status = '' }) =>
status === 'pending' status === 'pending'
? 'orange' ? 'orange'
: status === 'connected' : status === 'connected'
...@@ -78,6 +88,7 @@ BxMiniWidjetUiStyle.StatusLine = styled.div` ...@@ -78,6 +88,7 @@ BxMiniWidjetUiStyle.StatusLine = styled.div`
float: right; float: right;
} }
`; `;
const DialPadIcon = styled(CallIcon)` const DialPadIcon = styled(CallIcon)`
font-size: 26px; font-size: 26px;
`; `;
......
...@@ -29,7 +29,9 @@ const DefaultWidjetUi = ({ ...@@ -29,7 +29,9 @@ const DefaultWidjetUi = ({
<DialPadIcon /> <DialPadIcon />
</div> </div>
<div className='bottom'> <div className='bottom'>
<DefaultWidjetStyle.StatusLine status={widjetState}> <DefaultWidjetStyle.StatusLine
status={widjetState}
>
<p className='verison'>v {widjetVersion}</p> <p className='verison'>v {widjetVersion}</p>
</DefaultWidjetStyle.StatusLine> </DefaultWidjetStyle.StatusLine>
</div> </div>
......
...@@ -53,7 +53,7 @@ const DefaultWidjetStyle = styled.div` ...@@ -53,7 +53,7 @@ const DefaultWidjetStyle = styled.div`
border-radius: 10px; border-radius: 10px;
padding: 0 5px; padding: 0 5px;
margin: 0 5px; margin: 0 5px;
background-color: ${({ status }) => background-color: ${({ status = '' }) =>
status === 'pending' status === 'pending'
? 'orange' ? 'orange'
: status === 'connected' : status === 'connected'
...@@ -68,7 +68,7 @@ DefaultWidjetStyle.StatusLine = styled.div` ...@@ -68,7 +68,7 @@ DefaultWidjetStyle.StatusLine = styled.div`
background-color: ${({ backColor }) => backColor}; background-color: ${({ backColor }) => backColor};
border-bottom-left-radius: 30px; border-bottom-left-radius: 30px;
border-bottom-right-radius: 30px; border-bottom-right-radius: 30px;
background-color: ${({ status }) => background-color: ${({ status = '' }) =>
status === 'pending' status === 'pending'
? 'orange' ? 'orange'
: status === 'connected' : status === 'connected'
......
...@@ -111,7 +111,7 @@ const ModalPhoneNumpad = ({ ...@@ -111,7 +111,7 @@ const ModalPhoneNumpad = ({
const callButton = () => { const callButton = () => {
if (dynamicValue === 'connected') { if (dynamicValue === 'connected') {
boxDialer.initialized(inputValue, data.number); boxDialer.initialized(inputValue);
} else { } else {
toast.error('Please wait', { toast.error('Please wait', {
style: { style: {
...@@ -165,8 +165,7 @@ const ModalPhoneNumpad = ({ ...@@ -165,8 +165,7 @@ const ModalPhoneNumpad = ({
<NumberButton <NumberButton
onClick={() => callButton()} onClick={() => callButton()}
// onClick={() => boxDialer.stopTimer()} status={dynamicValue || ''}
status={dynamicValue}
type={'call_button'}> type={'call_button'}>
<CallIcon /> <CallIcon />
</NumberButton> </NumberButton>
......
...@@ -86,7 +86,7 @@ const NumberButton = styled.div` ...@@ -86,7 +86,7 @@ const NumberButton = styled.div`
font-size: 22px; font-size: 22px;
cursor: pointer; cursor: pointer;
height: 33px; height: 33px;
background-color: ${({ status, type }) => background-color: ${({ status = '', type = '' }) =>
type === 'call_button' type === 'call_button'
? status === 'pending' ? status === 'pending'
? 'orange' ? 'orange'
......
...@@ -130,6 +130,7 @@ const NumberButton = styled.div` ...@@ -130,6 +130,7 @@ const NumberButton = styled.div`
? 'orange' ? 'orange'
: status === 'connected' && '#a0c13d'}; : status === 'connected' && '#a0c13d'};
`; `;
NumberButton.Icon = styled.div` NumberButton.Icon = styled.div`
font-size: 20px; font-size: 20px;
`; `;
......
...@@ -9,6 +9,16 @@ import Modal from '../components/Modal'; ...@@ -9,6 +9,16 @@ import Modal from '../components/Modal';
import BxMiniWidjetUi from '../components/BxMiniWidjetUi'; import BxMiniWidjetUi from '../components/BxMiniWidjetUi';
const Root = ({ data, onSetDnd }) => { const Root = ({ data, onSetDnd }) => {
let localValue = localStorage.getItem('activeValue') || false;
console.log(localValue, 'localValue');
// useEffect(() => {
// if (localValue && localValue > 0)
// localStorage.setItem('activeValue', +localValue + 1);
// else localStorage.setItem('activeValue', 1);
// }, []);
if (!data) { if (!data) {
data = { data = {
iscloud: true, iscloud: true,
...@@ -16,9 +26,9 @@ const Root = ({ data, onSetDnd }) => { ...@@ -16,9 +26,9 @@ const Root = ({ data, onSetDnd }) => {
wsurl: 'cld.alovoice.uz:61040', wsurl: 'cld.alovoice.uz:61040',
server_id: 40, server_id: 40,
secret: '26a830', secret: '26a830',
reason: 'free',
lefttime: 231461, lefttime: 231461,
reasons: ['free', 'outcalls', 'home', 'totop'], reasons: ['free', 'outcalls', 'home', 'totop'],
reason: 'free',
variant: 'bxmini', variant: 'bxmini',
position: 'bottomRight', position: 'bottomRight',
}; };
...@@ -80,12 +90,7 @@ const Root = ({ data, onSetDnd }) => { ...@@ -80,12 +90,7 @@ const Root = ({ data, onSetDnd }) => {
} }
}; };
if ( if (!data || !data?.number || !data?.position) return;
!data ||
!data?.number
// || !data?.position
)
return;
return ( return (
<> <>
......
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