@@ -7,6 +7,8 @@ import 'rc-tooltip/assets/bootstrap_white.css';
77import ForwardForm from '../ForwardForm' ;
88import ReplyWithMessage from '../ReplyWithMessage' ;
99import ActiveCallButton from '../ActiveCallButton' ;
10+ import MultiCallAnswerButton from '../MultiCallAnswerButton' ;
11+
1012import MessageIcon from '../../assets/images/MessageFill.svg' ;
1113import ForwardIcon from '../../assets/images/Forward.svg' ;
1214import IgnoreIcon from '../../assets/images/Ignore.svg' ;
@@ -59,7 +61,59 @@ export default class IncomingCallPad extends Component {
5961 forwardingNumbers,
6062 formatPhone,
6163 className,
64+ hasOtherActiveCall,
65+ answerAndEnd,
66+ answerAndHold,
6267 } = this . props ;
68+ // const isMultiCall = true;
69+ const multiCallButtons = (
70+ < div className = { classnames ( styles . buttonRow , styles . multiCallsButtonGroup ) } >
71+ < MultiCallAnswerButton
72+ onClick = { answerAndEnd }
73+ title = { i18n . getString ( 'answerAndEnd' , currentLocale ) }
74+ className = { styles . callButton }
75+ isEndOtherCall
76+ />
77+ < ActiveCallButton
78+ onClick = { toVoiceMail }
79+ title = { i18n . getString ( 'toVoicemail' , currentLocale ) }
80+ buttonClassName = { styles . rejectButton }
81+ icon = { VoicemailIcon }
82+ iconWidth = { 274 }
83+ iconX = { 116 }
84+ showBorder = { false }
85+ className = { styles . callButton }
86+ />
87+ < MultiCallAnswerButton
88+ onClick = { answerAndHold }
89+ title = { i18n . getString ( 'answerAndHold' , currentLocale ) }
90+ className = { styles . callButton }
91+ isEndOtherCall = { false }
92+ />
93+ </ div >
94+ ) ;
95+ const singleCallButtons = (
96+ < div className = { classnames ( styles . buttonRow , styles . answerButtonGroup ) } >
97+ < ActiveCallButton
98+ onClick = { toVoiceMail }
99+ title = { i18n . getString ( 'toVoicemail' , currentLocale ) }
100+ buttonClassName = { styles . rejectButton }
101+ icon = { VoicemailIcon }
102+ iconWidth = { 274 }
103+ iconX = { 116 }
104+ showBorder = { false }
105+ className = { styles . bigCallButton }
106+ />
107+ < ActiveCallButton
108+ onClick = { answer }
109+ title = { i18n . getString ( 'answer' , currentLocale ) }
110+ buttonClassName = { styles . answerButton }
111+ icon = { AnswerIcon }
112+ showBorder = { false }
113+ className = { styles . bigCallButton }
114+ />
115+ </ div >
116+ ) ;
63117 return (
64118 < div className = { classnames ( styles . root , className ) } >
65119 < div
@@ -97,6 +151,8 @@ export default class IncomingCallPad extends Component {
97151 >
98152 < ActiveCallButton
99153 icon = { ForwardIcon }
154+ iconWidth = { 250 }
155+ iconX = { 125 }
100156 onClick = { ( ) => null }
101157 title = { i18n . getString ( 'forward' , currentLocale ) }
102158 className = { styles . callButton }
@@ -134,24 +190,7 @@ export default class IncomingCallPad extends Component {
134190 className = { styles . callButton }
135191 />
136192 </ div >
137- < div className = { classnames ( styles . buttonRow , styles . answerButtonGroup ) } >
138- < ActiveCallButton
139- onClick = { toVoiceMail }
140- title = { i18n . getString ( 'toVoicemail' , currentLocale ) }
141- buttonClassName = { styles . rejectButton }
142- icon = { VoicemailIcon }
143- showBorder = { false }
144- className = { styles . bigCallButton }
145- />
146- < ActiveCallButton
147- onClick = { answer }
148- title = { i18n . getString ( 'answer' , currentLocale ) }
149- buttonClassName = { styles . answerButton }
150- icon = { AnswerIcon }
151- showBorder = { false }
152- className = { styles . bigCallButton }
153- />
154- </ div >
193+ { hasOtherActiveCall ? multiCallButtons : singleCallButtons }
155194 </ div >
156195 ) ;
157196 }
@@ -166,10 +205,16 @@ IncomingCallPad.propTypes = {
166205 formatPhone : PropTypes . func ,
167206 onForward : PropTypes . func . isRequired ,
168207 replyWithMessage : PropTypes . func . isRequired ,
169- className : PropTypes . string
208+ className : PropTypes . string ,
209+ answerAndEnd : PropTypes . func ,
210+ answerAndHold : PropTypes . func ,
211+ hasOtherActiveCall : PropTypes . bool ,
170212} ;
171213
172214IncomingCallPad . defaultProps = {
173215 formatPhone : phone => phone ,
174216 className : null ,
217+ answerAndEnd : ( ) => null ,
218+ answerAndHold : ( ) => null ,
219+ hasOtherActiveCall : false ,
175220} ;
0 commit comments