1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-11 18:24:43 +02:00

Desktop: Resolves #8493: Draw red border around missing encryption key passwords (#8636)

This commit is contained in:
Henry Heino 2023-08-10 02:45:45 -07:00 committed by GitHub
parent 950b16370f
commit bce18a1614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -94,6 +94,12 @@ const EncryptionConfigScreen = (props: Props) => {
borderColor: theme.dividerColor,
};
const missingPasswordCellStyle = {
...theme.textStyle,
border: '3px solid',
borderColor: theme.colorError,
};
const password = inputPasswords[mk.id] ? inputPasswords[mk.id] : '';
const isActive = props.activeMasterKeyId === mk.id;
const activeIcon = isActive ? '✔' : '';
@ -108,8 +114,15 @@ const EncryptionConfigScreen = (props: Props) => {
);
} else {
return (
<td style={theme.textStyle}>
<input type="password" style={passwordStyle} value={password} onChange={event => onInputPasswordChange(mk, event.target.value)} />{' '}
<td style={missingPasswordCellStyle}>
<input
type="password"
placeholder={_('Enter password')}
style={passwordStyle}
value={password}
onChange={event => onInputPasswordChange(mk, event.target.value)}
/>
{' '}
<button style={theme.buttonStyle} onClick={() => onSavePasswordClick(mk, { ...props.passwords, ...inputPasswords })}>
{_('Save')}
</button>