diff --git a/package.json b/package.json index 02cbb32942..9d9d9520c9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/components/ActiveCallPanel/styles.scss b/src/components/ActiveCallPanel/styles.scss index 7d0ccb3c39..7caeded9b6 100644 --- a/src/components/ActiveCallPanel/styles.scss +++ b/src/components/ActiveCallPanel/styles.scss @@ -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; } diff --git a/src/components/CallAlert/i18n/en-US.js b/src/components/CallAlert/i18n/en-US.js index e6a562288d..7674faa4c1 100644 --- a/src/components/CallAlert/i18n/en-US.js +++ b/src/components/CallAlert/i18n/en-US.js @@ -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.' }; diff --git a/src/components/CallAlert/index.js b/src/components/CallAlert/index.js index 51b32417c3..f9d0a6765b 100644 --- a/src/components/CallAlert/index.js +++ b/src/components/CallAlert/index.js @@ -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 ({i18n.getString('telus911', currentLocale)}); + } if (message === callErrors.noAreaCode) { const areaCode = i18n.getString('areaCode', currentLocale); const areaCodeLink = onAreaCodeLinkClick ? @@ -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 }) => ( diff --git a/src/components/RecentActivityView/index.js b/src/components/RecentActivityView/index.js index 2a5b367c08..4ab8545df4 100644 --- a/src/components/RecentActivityView/index.js +++ b/src/components/RecentActivityView/index.js @@ -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 }); @@ -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) { diff --git a/src/containers/AlertContainer/index.js b/src/containers/AlertContainer/index.js index 4c888aee15..5528584bd3 100644 --- a/src/containers/AlertContainer/index.js +++ b/src/containers/AlertContainer/index.js @@ -49,6 +49,7 @@ function getDefaultRenderer({ return props => ( ); diff --git a/yarn.lock b/yarn.lock index 26629730aa..438093ca3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"