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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"redux-thunk": "^2.2.0",
"ringcentral": "^3.1.2",
"ringcentral-client": "^1.0.0-rc1",
"ringcentral-integration": "^0.7.7",
"ringcentral-integration": "^0.7.9",
"sass-loader": "^6.0.5",
"source-map-loader": "^0.2.1",
"style-loader": "^0.18.2",
Expand Down
7 changes: 6 additions & 1 deletion src/components/ActiveCallPanel/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ $avatar-width: 60px;
}

.backButton {
font-size: $primary-font-size;
color: $lightblack;
i {
font-size: $primary-font-size;
}
span {
font-size: 0.9em;
}
&:hover {
color: $lightblack;
}
Expand Down
1 change: 1 addition & 0 deletions src/components/CallAlert/i18n/en-US.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export default {
[callErrors.networkError]: 'Cannot connect due to network issues. Please try again later.',
[callErrors.noRingoutEnable]: 'Your extension is allowed to make calls with desktop app.\n If you wish to switch to other calling options\n please contact your account administrator for an upgrade.',
areaCode: 'area code',
telus911: 'Emergency dialing is not supported.'
};
15 changes: 14 additions & 1 deletion src/components/CallAlert/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,25 @@ import callErrors from 'ringcentral-integration/modules/Call/callErrors';
import FormattedMessage from '../FormattedMessage';
import i18n from './i18n';

const TELUS_ID = '7310';
export default function CallAlert({
message: {
message,
payload,
},
brand,
onAreaCodeLinkClick,
currentLocale,
}) {
// If brand is Telus and special number is 911,
// show messages of its own version.
if (
brand && brand.id === TELUS_ID &&
message === callErrors.specialNumber &&
payload && payload.phoneNumber === '911'
) {
return (<span>{i18n.getString('telus911', currentLocale)}</span>);
}
if (message === callErrors.noAreaCode) {
const areaCode = i18n.getString('areaCode', currentLocale);
const areaCodeLink = onAreaCodeLinkClick ?
Expand Down Expand Up @@ -40,10 +52,11 @@ CallAlert.propTypes = {
message: PropTypes.shape({
message: PropTypes.string.isRequired,
}).isRequired,
brand: PropTypes.object.isRequired,
currentLocale: PropTypes.string.isRequired,
};
CallAlert.defaultProps = {
onAreaCodeLinkClick: undefined,
onAreaCodeLinkClick: undefined
};

CallAlert.handleMessage = ({ message }) => (
Expand Down
4 changes: 2 additions & 2 deletions src/components/RecentActivityView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default class RecentActivityView extends PureComponent {

onTabChanged = (tabName = this.props.defaultTab) => {
const currentTab = this.getCurrentTab(tabName);
currentTab.getData();
if (currentTab) currentTab.getData();
this.setState({
currentTab: tabName
});
Expand All @@ -40,7 +40,7 @@ export default class RecentActivityView extends PureComponent {
getCurrentTabPanel() {
const currentTabPath = this.state.currentTab;
const currentTab = this.getCurrentTab(currentTabPath);
return currentTab.view || null;
return currentTab ? currentTab.view : null;
}

getCurrentTab(currentTabPath) {
Expand Down
1 change: 1 addition & 0 deletions src/containers/AlertContainer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function getDefaultRenderer({
return props => (
<CallAlert
{...props}
brand={brand}
onAreaCodeLinkClick={onRegionSettingsLinkClick}
/>
);
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6626,9 +6626,9 @@ ringcentral-client@^1.0.0-rc1:
form-data "^2.1.2"
isomorphic-fetch "^2.2.1"

ringcentral-integration@^0.7.7:
version "0.7.7"
resolved "https://registry.yarnpkg.com/ringcentral-integration/-/ringcentral-integration-0.7.7.tgz#6740abefecafb95d2ffc94bb44ac0c1614190530"
ringcentral-integration@^0.7.9:
version "0.7.9"
resolved "https://registry.yarnpkg.com/ringcentral-integration/-/ringcentral-integration-0.7.9.tgz#78a97dc18c7af9572afc9919b919e7b5ffb11913"
dependencies:
file-loader "^0.11.2"
json-mask "^0.3.8"
Expand Down