Skip to content

Commit 0b392be

Browse files
committed
Added password strength indicators to dialogs
1 parent 5083b50 commit 0b392be

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/components/CreatePasswordDialog/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import DialogTitle from '@mui/material/DialogTitle';
66
import DialogActions from '@mui/material/DialogActions';
77
import Button from '@mui/material/Button';
88
import { MainContext } from '../../contexts/MainContextProvider';
9+
import PasswordStrength from '../../utils/PasswordStrength';
10+
import LinearProgressWithLabel from '../LinearProgressWithLabel';
911

1012
const CreatePasswordDialog = ({ open, onCreate, onClose }) => {
1113
const [state] = useContext(MainContext);
@@ -102,6 +104,7 @@ const CreatePasswordDialog = ({ open, onCreate, onClose }) => {
102104
variant="outlined"
103105
fullWidth
104106
/>
107+
<LinearProgressWithLabel value={PasswordStrength(password)} />
105108
</DialogContent>
106109
<DialogActions>
107110
<Button onClick={handleClose}>

src/components/EditPasswordDialog/index.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import DialogTitle from '@mui/material/DialogTitle';
66
import DialogActions from '@mui/material/DialogActions';
77
import Button from '@mui/material/Button';
88
import { MainContext } from '../../contexts/MainContextProvider';
9+
import PasswordStrength from '../../utils/PasswordStrength';
10+
import LinearProgressWithLabel from '../LinearProgressWithLabel';
911

1012
const EditPasswordDialog = ({
1113
data, open, onSave, onClose,
@@ -100,6 +102,7 @@ const EditPasswordDialog = ({
100102
variant="outlined"
101103
fullWidth
102104
/>
105+
<LinearProgressWithLabel value={PasswordStrength(password)} />
103106
</DialogContent>
104107
<DialogActions>
105108
<Button onClick={handleClose}>

0 commit comments

Comments
 (0)