Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Commit

Permalink
Hide credential values (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
itowlson authored Aug 20, 2019
1 parent a481eb0 commit acf126a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/Installer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export default class Installer extends React.Component<Properties, State, {}> {
<Header sub>Install as</Header>
<Segment>
<Form.Input inline key="installationName" name="installationName" label="Installation name" labelPosition="left" type="text" value={this.state.installationName} error={this.state.installationNameExists} onChange={this.handleNameChange} />

{...this.installationNameValidityPanel()}
</Segment>
</Segment>
Expand Down Expand Up @@ -266,11 +265,12 @@ export default class Installer extends React.Component<Properties, State, {}> {
// TODO: form items should have unique names - unfortunately the change handlers currently
// use the sender name to key into the credentials object so probably better to change them
// to use key or something instead
const inputType = (this.state.credentialValues[credential.name].kind === 'value') ? 'password' : 'text';
const opts = this.credentialSourceKinds.map((v) => ({ text: this.credentialSourceKindText(v), value: v }));
return (
<Form.Group inline>
<Form.Select inline key={credential.name} name={credential.name} options={opts} value={this.state.credentialValues[credential.name].kind} onChange={this.handleCredentialKindChange} />
<Form.Input inline key={credential.name} name={credential.name} label={credential.name} type="text" value={this.state.credentialValues[credential.name].value} onChange={this.handleCredentialValueChange} />
<Form.Input inline key={credential.name} name={credential.name} label={credential.name} type={inputType} value={this.state.credentialValues[credential.name].value} onChange={this.handleCredentialValueChange} />
</Form.Group>);
}

Expand Down

0 comments on commit acf126a

Please sign in to comment.