Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

feat(authentication/native): hide login button for 8x8.vc (#13881)

Calinteodor32ac2994223c
diff --git a/react/features/authentication/components/native/WaitForOwnerDialog.tsx b/react/features/authentication/components/native/WaitForOwnerDialog.tsx
index 1cfab3d329..b029da7271 100644
--- a/react/features/authentication/components/native/WaitForOwnerDialog.tsx
+++ b/react/features/authentication/components/native/WaitForOwnerDialog.tsx
@@ -17,6 +17,11 @@ interface IProps {
*/
_alternativeCancelText?: boolean;
+ /**
+ * Is confirm button hidden?
+ */
+ _isConfirmHidden?: boolean;
+
/**
* Redux store dispatch function.
*/
@@ -56,11 +61,14 @@ class WaitForOwnerDialog extends Component<IProps> {
* @returns {ReactElement}
*/
render() {
+ const { _isConfirmHidden } = this.props;
+
return (
<ConfirmDialog
cancelLabel = { this.props._alternativeCancelText ? 'dialog.WaitingForHostButton' : 'dialog.Cancel' }
confirmLabel = 'dialog.IamHost'
descriptionKey = 'dialog.WaitForHostMsg'
+ isConfirmHidden = { _isConfirmHidden }
onCancel = { this._onCancel }
onSubmit = { this._onLogin } />
);
@@ -97,9 +105,11 @@ class WaitForOwnerDialog extends Component<IProps> {
*/
function mapStateToProps(state: IReduxState) {
const { membersOnly, lobbyWaitingForHost } = state['features/base/conference'];
+ const { locationURL } = state['features/base/connection'];
return {
- _alternativeCancelText: membersOnly && lobbyWaitingForHost
+ _alternativeCancelText: membersOnly && lobbyWaitingForHost,
+ _isConfirmHidden: locationURL?.hostname?.includes('8x8.vc')
};
}
diff --git a/react/features/base/dialog/components/native/ConfirmDialog.tsx b/react/features/base/dialog/components/native/ConfirmDialog.tsx
index 523f8afb9c..263108f7b3 100644
--- a/react/features/base/dialog/components/native/ConfirmDialog.tsx
+++ b/react/features/base/dialog/components/native/ConfirmDialog.tsx
@@ -41,6 +41,11 @@ interface IProps extends AbstractProps, WithTranslation {
*/
isConfirmDestructive?: Boolean;
+ /**
+ * Whether or not the confirm button is hidden.
+ */
+ isConfirmHidden?: Boolean;
+
/**
* Dialog title.
*/
@@ -60,7 +65,8 @@ class ConfirmDialog extends AbstractDialog<IProps> {
* @static
*/
static defaultProps = {
- isConfirmDestructive: false
+ isConfirmDestructive: false,
+ isConfirmHidden: false
};
/**
@@ -95,6 +101,7 @@ class ConfirmDialog extends AbstractDialog<IProps> {
children,
confirmLabel,
isConfirmDestructive,
+ isConfirmHidden,
t,
title
} = this.props;
@@ -118,10 +125,12 @@ class ConfirmDialog extends AbstractDialog<IProps> {
label = { t(cancelLabel || 'dialog.confirmNo') }
onPress = { this._onCancel }
style = { styles.dialogButton } />
- <Dialog.Button
- label = { t(confirmLabel || 'dialog.confirmYes') }
- onPress = { this._onSubmit }
- style = { dialogButtonStyle } />
+ {
+ !isConfirmHidden && <Dialog.Button
+ label = { t(confirmLabel || 'dialog.confirmYes') }
+ onPress = { this._onSubmit }
+ style = { dialogButtonStyle } />
+ }
</Dialog.Container>
);
}