mirror of
https://github.com/henrywhitaker3/Speedtest-Tracker.git
synced 2025-12-24 06:28:27 +01:00
Try to stop chrome form autofilling
This commit is contained in:
@@ -279,11 +279,13 @@ export default class SettingsIndex extends Component {
|
||||
},
|
||||
{
|
||||
obj: data.influx_db_username,
|
||||
type: 'text'
|
||||
type: 'text',
|
||||
autoComplete: false,
|
||||
},
|
||||
{
|
||||
obj: data.influx_db_password,
|
||||
type: 'password'
|
||||
type: 'password',
|
||||
autoComplete: false,
|
||||
}
|
||||
],
|
||||
};
|
||||
|
||||
@@ -24,6 +24,7 @@ export default class SettingsInput extends Component {
|
||||
inline: this.props.inline ? 'd-inline-block' : 'd-block',
|
||||
btnType: this.props.btnType,
|
||||
earlyReturn: this.props.earlyReturn ? true : false,
|
||||
autoComplete: String(this.props.autoComplete ? true : Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 7)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +73,8 @@ export default class SettingsInput extends Component {
|
||||
disabled={disabled}
|
||||
min={this.state.min}
|
||||
max={this.state.max}
|
||||
onInput={this.handleInput} />
|
||||
onInput={this.handleInput}
|
||||
autoComplete={this.state.autoComplete} />
|
||||
}
|
||||
|
||||
generateSelectInput(disabled) {
|
||||
@@ -109,7 +111,8 @@ export default class SettingsInput extends Component {
|
||||
type={this.state.type}
|
||||
defaultValue={this.state.value}
|
||||
disabled={disabled}
|
||||
onInput={this.handleInput} />
|
||||
onInput={this.handleInput}
|
||||
autoComplete={this.state.autoComplete} />
|
||||
}
|
||||
|
||||
generatePasswordInput(disabled) {
|
||||
@@ -118,7 +121,8 @@ export default class SettingsInput extends Component {
|
||||
type={this.state.type}
|
||||
defaultValue={this.state.value}
|
||||
disabled={disabled}
|
||||
onInput={this.handleInput} />
|
||||
onInput={this.handleInput}
|
||||
autoComplete={this.state.autoComplete} />
|
||||
}
|
||||
|
||||
generateButtonGetInput() {
|
||||
|
||||
@@ -107,6 +107,7 @@ export default class SettingsTabs extends Component {
|
||||
url={setting.url}
|
||||
earlyReturn={setting.earlyReturn ? true : false}
|
||||
classes={setting.classes ? setting.classes : ''}
|
||||
autoComplete={setting.autoComplete ? true : false}
|
||||
/>
|
||||
})
|
||||
}
|
||||
|
||||
@@ -32,7 +32,11 @@ export default class InfluxDBSettings extends Component {
|
||||
|
||||
return (
|
||||
<Tab.Content>
|
||||
{settings}
|
||||
<form onSubmit={(e) => { e.preventDefault() }} autoComplete="off">
|
||||
<input type="text" autoComplete="username" style={{ display: 'none' }} />
|
||||
<input type="password" name="password" autoComplete="passoword" style={{ display: 'none' }} />
|
||||
{settings}
|
||||
</form>
|
||||
<div className="mt-3">
|
||||
<button className="btn btn-primary" onClick={() => { this.props.save(this.state.data, 'healthchecks.io') }}>Save</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user