|
@@ -17,6 +17,11 @@ interface IProps {
|
17
|
17
|
*/
|
18
|
18
|
_password?: string;
|
19
|
19
|
|
|
20
|
+ /**
|
|
21
|
+ * Number of digits used in the room-lock password.
|
|
22
|
+ */
|
|
23
|
+ _passwordNumberOfDigits?: number;
|
|
24
|
+
|
20
|
25
|
/**
|
21
|
26
|
* The {@code JitsiConference} which requires a password.
|
22
|
27
|
*
|
|
@@ -88,6 +93,15 @@ class PasswordRequiredPrompt extends Component<IProps, IState> {
|
88
|
93
|
*/
|
89
|
94
|
render() {
|
90
|
95
|
const { password } = this.state;
|
|
96
|
+ const { _passwordNumberOfDigits } = this.props;
|
|
97
|
+ const textInputProps: any = {
|
|
98
|
+ secureTextEntry: true
|
|
99
|
+ };
|
|
100
|
+
|
|
101
|
+ if (_passwordNumberOfDigits) {
|
|
102
|
+ textInputProps.keyboardType = 'numeric';
|
|
103
|
+ textInputProps.maxLength = _passwordNumberOfDigits;
|
|
104
|
+ }
|
91
|
105
|
|
92
|
106
|
return (
|
93
|
107
|
<InputDialog
|
|
@@ -96,9 +110,7 @@ class PasswordRequiredPrompt extends Component<IProps, IState> {
|
96
|
110
|
messageKey = { password ? 'dialog.incorrectRoomLockPassword' : undefined }
|
97
|
111
|
onCancel = { this._onCancel }
|
98
|
112
|
onSubmit = { this._onSubmit }
|
99
|
|
- textInputProps = {{
|
100
|
|
- secureTextEntry: true
|
101
|
|
- }}
|
|
113
|
+ textInputProps = { textInputProps }
|
102
|
114
|
titleKey = 'dialog.password' />
|
103
|
115
|
);
|
104
|
116
|
}
|
|
@@ -142,8 +154,11 @@ class PasswordRequiredPrompt extends Component<IProps, IState> {
|
142
|
154
|
* @returns {IProps}
|
143
|
155
|
*/
|
144
|
156
|
function _mapStateToProps(state: IReduxState) {
|
|
157
|
+ const { roomPasswordNumberOfDigits } = state['features/base/config'];
|
|
158
|
+
|
145
|
159
|
return {
|
146
|
|
- _password: state['features/base/conference'].password
|
|
160
|
+ _password: state['features/base/conference'].password,
|
|
161
|
+ _passwordNumberOfDigits: roomPasswordNumberOfDigits
|
147
|
162
|
};
|
148
|
163
|
}
|
149
|
164
|
|