Merge pull request #8823 from jitsi/tavram/hide-support

fix(jaas) hide support link in invite error for jaas users
This commit is contained in:
Avram Tudor 2021-03-17 15:16:32 +02:00 committed by GitHub
commit 4f3058eae2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 7 deletions

View File

@ -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) }

View File

@ -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>
);

View File

@ -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)
};
}