Commit 8ff2e615 authored by Muhammadali's avatar Muhammadali

update verison: 0.8.7

parent 182d8a41
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.5", "version": "0.8.6",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.5", "version": "0.8.6",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
......
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.6", "version": "0.8.7",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
...@@ -21,10 +21,13 @@ const BxMiniWidjetUi = ({ ...@@ -21,10 +21,13 @@ const BxMiniWidjetUi = ({
<div className='left'> <div className='left'>
<p className='title'>{phoneNumber}</p> <p className='title'>{phoneNumber}</p>
<div> <div>
<BxMiniWidjetUiStyle.ReasonTest className='status' reason={reason}> {reason !== 'free' ? (
<span>{reason}</span> <TimerUi reason={reason} time={leftTime} />
</BxMiniWidjetUiStyle.ReasonTest> ) : (
<TimerUi reason={reason} time={leftTime} /> <BxMiniWidjetUiStyle.ReasonTest className='status' reason={reason}>
<span>{reason}</span>
</BxMiniWidjetUiStyle.ReasonTest>
)}
</div> </div>
</div> </div>
<div className='bottom'> <div className='bottom'>
......
...@@ -10,11 +10,15 @@ const BxMiniWidjetUiStyle = styled.div` ...@@ -10,11 +10,15 @@ const BxMiniWidjetUiStyle = styled.div`
padding: 0; padding: 0;
box-sizing: border-box; box-sizing: border-box;
} }
background-color: ${({ status = '' }) =>
height: 90px; status === 'pending'
width: 80px; ? 'orange'
: status === 'connected'
? '#a0c13d'
: '#ccc'};
height: 64px;
width: 64px;
border-radius: 13px; border-radius: 13px;
background-color: #164e63e6;
cursor: pointer; cursor: pointer;
color: white; color: white;
z-index: 999; z-index: 999;
...@@ -68,7 +72,6 @@ BxMiniWidjetUiStyle.ReasonTest = styled.div` ...@@ -68,7 +72,6 @@ BxMiniWidjetUiStyle.ReasonTest = styled.div`
`; `;
BxMiniWidjetUiStyle.StatusLine = styled.div` BxMiniWidjetUiStyle.StatusLine = styled.div`
height: 100%; height: 100%;
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 = '' }) =>
......
...@@ -29,9 +29,7 @@ const DefaultWidjetUi = ({ ...@@ -29,9 +29,7 @@ const DefaultWidjetUi = ({
<DialPadIcon /> <DialPadIcon />
</div> </div>
<div className='bottom'> <div className='bottom'>
<DefaultWidjetStyle.StatusLine <DefaultWidjetStyle.StatusLine status={widjetState}>
status={widjetState}
>
<p className='verison'>v {widjetVersion}</p> <p className='verison'>v {widjetVersion}</p>
</DefaultWidjetStyle.StatusLine> </DefaultWidjetStyle.StatusLine>
</div> </div>
......
/** @format */
import React, { useState } from 'react';
import DropDownStyle from './style';
const DropDown = ({ reasons, reason, selectFunc }) => {
const [visible, setVisible] = useState(false);
return (
<DropDownStyle visible={visible} onClick={() => setVisible(!visible)}>
<DropDownStyle.Text>{reason}</DropDownStyle.Text>
<DropDownStyle.DropDown visible={visible} className={'nocopy'}>
{reasons.map((value, index) => (
<div className='select' key={index} onClick={() => selectFunc(value)}>
{value}
</div>
))}
</DropDownStyle.DropDown>
<DropDownStyle.Window
visible={visible}
onClick={() => setVisible(false)}
/>
</DropDownStyle>
);
};
export default DropDown;
/** @format */
import styled from 'styled-components';
const DropDownStyle = styled.div`
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
position: relative;
`;
DropDownStyle.Text = styled.div``;
DropDownStyle.Window = styled.div`
display: ${({ visible }) => (visible ? 'block' : 'none')};
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
`;
DropDownStyle.DropDown = styled.div`
z-index: 99999999999;
border-radius: 10px;
background-color: #fff;
position: absolute;
bottom: 40px;
left: 50%;
display: flex;
flex-direction: column;
gap: 5px;
width: 150px;
transition: 0.2s;
padding: 10px 0;
.select {
padding: 5px 10px;
white-space: nowrap;
color: #111827;
font-size: 20px;
:hover {
background-color: #e9e9e9;
}
}
${({ visible }) =>
visible
? {
opacity: '1',
transform: 'scale(1) translate(-50%, 0)',
}
: {
opacity: '0',
transform: 'scale(0.9) translate(-50%, 0)',
}}
`;
export default DropDownStyle;
...@@ -6,6 +6,7 @@ import numbers from './numbers'; ...@@ -6,6 +6,7 @@ import numbers from './numbers';
import DropDownTailwind from '../TailwindComponents/DropDown'; import DropDownTailwind from '../TailwindComponents/DropDown';
import CallIcon from '@mui/icons-material/Call'; import CallIcon from '@mui/icons-material/Call';
import { toast } from 'react-hot-toast'; import { toast } from 'react-hot-toast';
import DropDown from '../DropDown';
const ModalPhoneNumpad = ({ const ModalPhoneNumpad = ({
phoneModal, phoneModal,
...@@ -140,6 +141,7 @@ const ModalPhoneNumpad = ({ ...@@ -140,6 +141,7 @@ const ModalPhoneNumpad = ({
<ModalPhoneNumpadStyle.ButtonArea> <ModalPhoneNumpadStyle.ButtonArea>
{numbers?.map((mapItem) => ( {numbers?.map((mapItem) => (
<NumberButton <NumberButton
className='nocopy'
key={mapItem.id} key={mapItem.id}
onClick={() => { onClick={() => {
mapItem.type === 'number' && mapItem.type === 'number' &&
...@@ -155,8 +157,13 @@ const ModalPhoneNumpad = ({ ...@@ -155,8 +157,13 @@ const ModalPhoneNumpad = ({
))} ))}
{!modalState.bool ? ( {!modalState.bool ? (
<> <>
<NumberButton style={{ gridColumn: '1/3' }}> <NumberButton style={{ gridColumn: '1/3' }} className='nocopy'>
<DropDownTailwind {/* <DropDownTailwind
selectFunc={onSetDnd}
reasons={reasons}
reason={reason}
/> */}
<DropDown
selectFunc={onSetDnd} selectFunc={onSetDnd}
reasons={reasons} reasons={reasons}
reason={reason} reason={reason}
......
.nocopy {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
\ No newline at end of file
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