-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e217e10
commit 4d9dcf5
Showing
20 changed files
with
153 additions
and
147 deletions.
There are no files selected for viewing
Empty file.
118 changes: 0 additions & 118 deletions
118
react/features/invite/components/InviteButton.native.js
This file was deleted.
Oops, something went wrong.
Empty file.
73 changes: 73 additions & 0 deletions
73
react/features/invite/components/add-people-dialog/native/InviteButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// @flow | ||
|
||
import type { Dispatch } from 'redux'; | ||
|
||
import { translate } from '../../../../base/i18n'; | ||
import { connect } from '../../../../base/redux'; | ||
import { AbstractButton } from '../../../../base/toolbox'; | ||
import type { AbstractButtonProps } from '../../../../base/toolbox'; | ||
|
||
import { setAddPeopleDialogVisible } from '../../../actions'; | ||
import { isAddPeopleEnabled, isDialOutEnabled } from '../../../functions'; | ||
|
||
type Props = AbstractButtonProps & { | ||
|
||
/** | ||
* Whether or not the feature to invite people to join the | ||
* conference is available. | ||
*/ | ||
_addPeopleEnabled: boolean, | ||
|
||
/** | ||
* The Redux dispatch function. | ||
*/ | ||
dispatch: Dispatch<any> | ||
}; | ||
|
||
/** | ||
* Implements an {@link AbstractButton} to enter add/invite people to the | ||
* current call/conference/meeting. | ||
*/ | ||
class InviteButton extends AbstractButton<Props, *> { | ||
accessibilityLabel = 'toolbar.accessibilityLabel.shareRoom'; | ||
iconName = 'icon-link'; | ||
label = 'toolbar.shareRoom'; | ||
|
||
/** | ||
* Handles clicking / pressing the button, and opens the appropriate dialog. | ||
* | ||
* @private | ||
* @returns {void} | ||
*/ | ||
_handleClick() { | ||
this.props.dispatch(setAddPeopleDialogVisible(true)); | ||
} | ||
|
||
/** | ||
* Returns true if none of the invite methods are available. | ||
* | ||
* @protected | ||
* @returns {boolean} | ||
*/ | ||
_isDisabled() { | ||
return !this.props._addPeopleEnabled; | ||
} | ||
} | ||
|
||
/** | ||
* Maps (parts of) the redux state to {@link InviteButton}'s React {@code Component} | ||
* props. | ||
* | ||
* @param {Object} state - The redux store/state. | ||
* @private | ||
* @returns {{ | ||
* _addPeopleEnabled: boolean | ||
* }} | ||
*/ | ||
function _mapStateToProps(state) { | ||
return { | ||
_addPeopleEnabled: isAddPeopleEnabled(state) || isDialOutEnabled(state) | ||
}; | ||
} | ||
|
||
export default translate(connect(_mapStateToProps)(InviteButton)); |
1 change: 1 addition & 0 deletions
1
react/features/invite/components/add-people-dialog/native/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// @flow | ||
|
||
export { default as AddPeopleDialog } from './AddPeopleDialog'; | ||
export { default as InviteButton } from './InviteButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export * from './native'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export * from './web'; |
38 changes: 38 additions & 0 deletions
38
react/features/invite/components/info-dialog/native/InfoDialogButton.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// @flow | ||
|
||
import type { Dispatch } from 'redux'; | ||
|
||
import { translate } from '../../../../base/i18n'; | ||
import { connect } from '../../../../base/redux'; | ||
import { AbstractButton } from '../../../../base/toolbox'; | ||
import type { AbstractButtonProps } from '../../../../base/toolbox'; | ||
import { beginShareRoom } from '../../../../share-room'; | ||
|
||
type Props = AbstractButtonProps & { | ||
|
||
/** | ||
* The Redux dispatch function. | ||
*/ | ||
dispatch: Dispatch<any> | ||
}; | ||
|
||
/** | ||
* Implements an {@link AbstractButton} to open the info dialog of the meeting. | ||
*/ | ||
class InfoDialogButton extends AbstractButton<Props, *> { | ||
accessibilityLabel = 'info.accessibilityLabel'; | ||
iconName = 'icon-info'; | ||
label = 'info.label'; | ||
|
||
/** | ||
* Handles clicking / pressing the button, and opens the appropriate dialog. | ||
* | ||
* @private | ||
* @returns {void} | ||
*/ | ||
_handleClick() { | ||
this.props.dispatch(beginShareRoom()); | ||
} | ||
} | ||
|
||
export default translate(connect()(InfoDialogButton)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @flow | ||
|
||
export { default as InfoDialogButton } from './InfoDialogButton'; |
4 changes: 2 additions & 2 deletions
4
...omponents/info-dialog/DialInNumber.web.js → ...omponents/info-dialog/web/DialInNumber.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
.../components/info-dialog/InfoDialog.web.js → .../components/info-dialog/web/InfoDialog.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...omponents/info-dialog/PasswordForm.web.js → ...omponents/info-dialog/web/PasswordForm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @flow | ||
|
||
export { default as InfoDialog } from './InfoDialog'; | ||
export { default as InfoDialogButton } from './InfoDialogButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters