forked from p15670423/monkey
UI: Rename HideInput to SensitiveTextInput. Resolve spacing
This commit is contained in:
parent
a8cc0e6781
commit
24009797ab
|
@ -3,7 +3,7 @@ import PbaInput from './PbaInput';
|
|||
import {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage';
|
||||
import InfoBox from './InfoBox';
|
||||
import TextBox from './TextBox';
|
||||
import HideInput from '../ui-components/HideInput';
|
||||
import SensitiveTextInput from '../ui-components/SensitiveTextInput';
|
||||
|
||||
export default function UiSchema(props) {
|
||||
const UiSchema = {
|
||||
|
@ -18,7 +18,7 @@ export default function UiSchema(props) {
|
|||
credentials : {
|
||||
exploit_password_list: {
|
||||
items: {
|
||||
'ui:widget': HideInput
|
||||
'ui:widget': SensitiveTextInput
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,12 +116,12 @@ export default function UiSchema(props) {
|
|||
exploits: {
|
||||
exploit_lm_hash_list:{
|
||||
items: {
|
||||
'ui:widget': HideInput
|
||||
'ui:widget': SensitiveTextInput
|
||||
}
|
||||
},
|
||||
exploit_ntlm_hash_list: {
|
||||
items: {
|
||||
'ui:widget': HideInput
|
||||
'ui:widget': SensitiveTextInput
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,18 +1,16 @@
|
|||
import React from 'react';
|
||||
import {InputGroup, FormControl} from 'react-bootstrap';
|
||||
import '../../styles/components/HideInput.scss'
|
||||
|
||||
class HideInput extends React.PureComponent {
|
||||
class SensitiveTextInput extends React.PureComponent {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
hidden: false
|
||||
};
|
||||
this.toggleShow = this.toggleShow.bind(this);
|
||||
}
|
||||
|
||||
toggleShow() {
|
||||
toggleShow = () => {
|
||||
this.setState({hidden: ! this.state.hidden});
|
||||
}
|
||||
|
||||
|
@ -24,7 +22,7 @@ class HideInput extends React.PureComponent {
|
|||
render() {
|
||||
return (
|
||||
<div>
|
||||
<InputGroup className='mb-4'>
|
||||
<InputGroup>
|
||||
<FormControl
|
||||
value={this.props.value || ''}
|
||||
type={this.state.hidden ? 'text' : 'password'}
|
||||
|
@ -41,4 +39,4 @@ class HideInput extends React.PureComponent {
|
|||
}
|
||||
}
|
||||
|
||||
export default HideInput;
|
||||
export default SensitiveTextInput;
|
|
@ -1,3 +0,0 @@
|
|||
.eye-button{
|
||||
padding: 5px !important;
|
||||
}
|
Loading…
Reference in New Issue