Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/ActiveCallButton/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export default function ActiveCallButton(props) {
const buttonClassName = classnames(
styles.button,
props.buttonClassName,
props.active ? styles.buttonActive : null
props.active ? styles.buttonActive : null,
props.disabled ? styles.buttonDisabled : null,
);
return (
<div className={className}>
Expand Down
33 changes: 29 additions & 4 deletions src/components/ActiveCallButton/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,37 @@
margin-bottom: 2px;
}

.buttonActive {
background: $primary-color;
}

.buttonTitle {
@include secondary-font;
font-size: 12px;
padding: 5px 0;
}

.buttonActive {
circle {
fill: $primary-color;
stroke: $primary-color;
}
path {
fill: #ffffff;
}
}

.buttonDisabled {
circle {
fill: $lightgray;
stroke: $gray;
}
path {
fill: $primary-color-highlight-solid;
}
g {
cursor: default;

&:hover {
circle {
stroke: $gray;
}
}
}
}
1 change: 1 addition & 0 deletions src/components/ActiveCallPad/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export default {
mute: 'Mute',
keypad: 'Keypad',
hold: 'Hold',
onHold: 'On Hold',
park: 'Park',
stopRecord: 'Stop',
record: 'Record',
Expand Down
15 changes: 11 additions & 4 deletions src/components/ActiveCallPad/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,25 @@ export default function ActiveCallPad(props) {
<ActiveCallButton
onClick={onHoldClicked}
className={styles.callButton}
title={i18n.getString('hold', props.currentLocale)}
title={
props.isOnHold ?
i18n.getString('onHold', props.currentLocale) :
i18n.getString('hold', props.currentLocale)
}
active={props.isOnHold}
icon={HoldIcon}
/>
</div>
<div className={styles.buttonRow}>
<ActiveCallButton
onClick={() => null}
onClick={props.isOnHold ? () => {} : () => {}}
className={styles.callButton}
title={i18n.getString('park', props.currentLocale)}
icon={ParkIcon}
disabled={props.isOnHold}
/>
<ActiveCallButton
onClick={onRecordClicked}
onClick={props.isOnHold ? () => {} : onRecordClicked}
title={
props.isOnRecord ?
i18n.getString('stopRecord', props.currentLocale) :
Expand All @@ -75,6 +80,7 @@ export default function ActiveCallPad(props) {
active={props.isOnRecord}
className={styles.callButton}
icon={RecordIcon}
disabled={props.isOnHold}
/>
<ActiveCallButton
onClick={props.onAdd}
Expand All @@ -91,10 +97,11 @@ export default function ActiveCallPad(props) {
className={styles.callButton}
/>
<ActiveCallButton
onClick={() => null}
onClick={props.isOnHold ? () => {} : () => {}}
title={i18n.getString('flip', props.currentLocale)}
icon={FlipIcon}
className={styles.callButton}
disabled={props.isOnHold}
/>
</div>
<div className={styles.buttonRow}>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CircleButton/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
cursor: pointer;

&:hover {
.circle {
circle {
stroke: $primary-color-highlight-solid;
}
.noBorder {
Expand Down
1 change: 1 addition & 0 deletions src/components/WebphoneAlert/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export default {
[webphoneErrors.getSipProvisionError]: 'You have no permission to send message.',
[webphoneErrors.toVoiceMailError]: 'Cannot send call to voicemail due to internal error',
[webphoneErrors.muteError]: 'Call cannot be muted at the moment.',
[webphoneErrors.holdError]: 'Call cannot be hold at the moment.',
};
3 changes: 2 additions & 1 deletion src/components/WebphoneAlert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ WebphoneAlert.handleMessage = ({ message }) => (
(message === webphoneErrors.webphoneCountOverLimit) ||
(message === webphoneErrors.notOutboundCallWithoutDL) ||
(message === webphoneErrors.toVoiceMailError) ||
(message === webphoneErrors.muteError)
(message === webphoneErrors.muteError) ||
(message === webphoneErrors.holdError)
);