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 {API_PBA_LINUX, API_PBA_WINDOWS} from '../pages/ConfigurePage';
|
||||||
import InfoBox from './InfoBox';
|
import InfoBox from './InfoBox';
|
||||||
import TextBox from './TextBox';
|
import TextBox from './TextBox';
|
||||||
import HideInput from '../ui-components/HideInput';
|
import SensitiveTextInput from '../ui-components/SensitiveTextInput';
|
||||||
|
|
||||||
export default function UiSchema(props) {
|
export default function UiSchema(props) {
|
||||||
const UiSchema = {
|
const UiSchema = {
|
||||||
|
@ -18,7 +18,7 @@ export default function UiSchema(props) {
|
||||||
credentials : {
|
credentials : {
|
||||||
exploit_password_list: {
|
exploit_password_list: {
|
||||||
items: {
|
items: {
|
||||||
'ui:widget': HideInput
|
'ui:widget': SensitiveTextInput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,12 +116,12 @@ export default function UiSchema(props) {
|
||||||
exploits: {
|
exploits: {
|
||||||
exploit_lm_hash_list:{
|
exploit_lm_hash_list:{
|
||||||
items: {
|
items: {
|
||||||
'ui:widget': HideInput
|
'ui:widget': SensitiveTextInput
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
exploit_ntlm_hash_list: {
|
exploit_ntlm_hash_list: {
|
||||||
items: {
|
items: {
|
||||||
'ui:widget': HideInput
|
'ui:widget': SensitiveTextInput
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {InputGroup, FormControl} from 'react-bootstrap';
|
import {InputGroup, FormControl} from 'react-bootstrap';
|
||||||
import '../../styles/components/HideInput.scss'
|
|
||||||
|
|
||||||
class HideInput extends React.PureComponent {
|
class SensitiveTextInput extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
hidden: false
|
hidden: false
|
||||||
};
|
};
|
||||||
this.toggleShow = this.toggleShow.bind(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleShow() {
|
toggleShow = () => {
|
||||||
this.setState({hidden: ! this.state.hidden});
|
this.setState({hidden: ! this.state.hidden});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +22,7 @@ class HideInput extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<InputGroup className='mb-4'>
|
<InputGroup>
|
||||||
<FormControl
|
<FormControl
|
||||||
value={this.props.value || ''}
|
value={this.props.value || ''}
|
||||||
type={this.state.hidden ? 'text' : 'password'}
|
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