浏览代码

feat: Changes security dialog button to toggle dialog.

master
damencho 5 年前
父节点
当前提交
0cef706b6a

+ 4
- 4
react/features/security/actions.js 查看文件

@@ -1,16 +1,16 @@
1 1
 // @flow
2 2
 
3
-import { openDialog } from '../base/dialog';
3
+import { toggleDialog } from '../base/dialog';
4 4
 
5 5
 import { SecurityDialog } from './components/security-dialog';
6 6
 
7 7
 /**
8
- * Action that triggers opening the security options dialog.
8
+ * Action that triggers toggle of the security options dialog.
9 9
  *
10 10
  * @returns {Function}
11 11
  */
12
-export function openSecurityDialog() {
12
+export function toggleSecurityDialog() {
13 13
     return function(dispatch: (Object) => Object) {
14
-        dispatch(openDialog(SecurityDialog));
14
+        dispatch(toggleDialog(SecurityDialog));
15 15
     };
16 16
 }

+ 2
- 2
react/features/security/components/security-dialog/SecurityDialogButton.js 查看文件

@@ -5,7 +5,7 @@ import { translate } from '../../../base/i18n';
5 5
 import { IconSecurityOff, IconSecurityOn } from '../../../base/icons';
6 6
 import { connect } from '../../../base/redux';
7 7
 import { AbstractButton, type AbstractButtonProps } from '../../../base/toolbox';
8
-import { openSecurityDialog } from '../../actions';
8
+import { toggleSecurityDialog } from '../../actions';
9 9
 
10 10
 
11 11
 type Props = AbstractButtonProps & {
@@ -77,7 +77,7 @@ function mapStateToProps(state: Object) {
77 77
  * @returns {Props}
78 78
  */
79 79
 const mapDispatchToProps = {
80
-    onClick: () => openSecurityDialog()
80
+    onClick: () => toggleSecurityDialog()
81 81
 };
82 82
 
83 83
 export default translate(connect(mapStateToProps, mapDispatchToProps)(SecurityDialogButton));

正在加载...
取消
保存