Skip to content

Commit

Permalink
Add fields for password managers [#31]
Browse files Browse the repository at this point in the history
  • Loading branch information
davidje13 committed Aug 26, 2023
1 parent 9600348 commit ec4ed21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/frontend/src/components/common/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export default memo(({
type,
value,
selected,
autoComplete = 'off',
checked,
onChange,
...rest
Expand All @@ -60,7 +61,7 @@ export default memo(({
value={value}
checked={type === 'radio' ? (selected === value) : checked}
onChange={changeHandler}
autoComplete="off"
autoComplete={autoComplete}
{...rest}
/>
);
Expand Down
6 changes: 6 additions & 0 deletions src/frontend/src/components/password/PasswordPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,18 @@ export default ({
title={`Password for ${slug}`}
/>
<form onSubmit={handleSubmit}>
{/* 'username' is included for password managers to distinguish between retros */}
<input type="hidden" name="username" value={retroId} autoComplete="username" />
{/* 'name' is a friendly name for password managers (but can be changed) */}
<input type="hidden" name="name" value={slug} autoComplete="name" />
<Input
type="password"
placeholder="password"
value={password}
onChange={setPassword}
disabled={sending}
autoComplete="current-password"
required
/>
{ sending ? (<div className="checking">&hellip;</div>) : (
<button type="submit" title="Go" disabled={password === ''}>
Expand Down

0 comments on commit ec4ed21

Please sign in to comment.