fix(jaas) hide support link in invite error for jaas users
This commit is contained in:
parent
aef0287605
commit
3a073d9af4
|
@ -20,7 +20,12 @@ type Props = {
|
|||
/**
|
||||
* Invoked to obtain translated strings.
|
||||
*/
|
||||
t: Function
|
||||
t: Function,
|
||||
|
||||
/**
|
||||
* Indicates whether the support link should be shown in case of an error
|
||||
*/
|
||||
showSupportLink: Boolean,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -33,12 +38,12 @@ class InlineDialogFailure extends Component<Props> {
|
|||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, showSupportLink } = this.props;
|
||||
|
||||
const supportLink = interfaceConfig.SUPPORT_URL;
|
||||
const supportString = t('inlineDialogFailure.supportMsg');
|
||||
const supportLinkElem
|
||||
= supportLink
|
||||
= supportLink && showSupportLink
|
||||
? (
|
||||
<div className = 'inline-dialog-error-text'>
|
||||
<span>{ supportString.padEnd(supportString.length + 1) }
|
||||
|
|
|
@ -70,7 +70,12 @@ type Props = {
|
|||
/**
|
||||
* Indicates if we should focus.
|
||||
*/
|
||||
shouldFocus: boolean
|
||||
shouldFocus: boolean,
|
||||
|
||||
/**
|
||||
* Indicates whether the support link should be shown in case of an error
|
||||
*/
|
||||
showSupportLink: Boolean,
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -263,7 +268,8 @@ class MultiSelectAutocomplete extends Component<Props, State> {
|
|||
const content = (
|
||||
<div className = 'autocomplete-error'>
|
||||
<InlineDialogFailure
|
||||
onRetry = { this._onRetry } />
|
||||
onRetry = { this._onRetry }
|
||||
showSupportLink = { this.props.showSupportLink } />
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import { Icon, IconPhone } from '../../../../base/icons';
|
|||
import { getLocalParticipant } from '../../../../base/participants';
|
||||
import { MultiSelectAutocomplete } from '../../../../base/react';
|
||||
import { connect } from '../../../../base/redux';
|
||||
import { isVpaasMeeting } from '../../../../billing-counter/functions';
|
||||
import { hideAddPeopleDialog } from '../../../actions';
|
||||
import AbstractAddPeopleDialog, {
|
||||
type Props as AbstractProps,
|
||||
|
@ -31,6 +32,11 @@ type Props = AbstractProps & {
|
|||
*/
|
||||
_footerTextEnabled: boolean,
|
||||
|
||||
/**
|
||||
* Whether the meeting belongs to JaaS user
|
||||
*/
|
||||
_isVpaas: boolean,
|
||||
|
||||
/**
|
||||
* The redux {@code dispatch} function.
|
||||
*/
|
||||
|
@ -110,6 +116,7 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
|
|||
const {
|
||||
_addPeopleEnabled,
|
||||
_dialOutEnabled,
|
||||
_isVpaas,
|
||||
t
|
||||
} = this.props;
|
||||
const footerText = this._renderFooterText();
|
||||
|
@ -152,7 +159,8 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
|
|||
ref = { this._setMultiSelectElement }
|
||||
resourceClient = { this._resourceClient }
|
||||
shouldFitContainer = { true }
|
||||
shouldFocus = { true } />
|
||||
shouldFocus = { true }
|
||||
showSupportLink = { !_isVpaas } />
|
||||
{ this._renderFormActions() }
|
||||
</div>
|
||||
);
|
||||
|
@ -516,7 +524,8 @@ function _mapStateToProps(state) {
|
|||
|
||||
return {
|
||||
..._abstractMapStateToProps(state),
|
||||
_footerTextEnabled: footerTextEnabled
|
||||
_footerTextEnabled: footerTextEnabled,
|
||||
_isVpaas: isVpaasMeeting(state)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue