mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-23 18:53:36 +02:00
This commit is contained in:
parent
950b16370f
commit
bce18a1614
@ -94,6 +94,12 @@ const EncryptionConfigScreen = (props: Props) => {
|
|||||||
borderColor: theme.dividerColor,
|
borderColor: theme.dividerColor,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const missingPasswordCellStyle = {
|
||||||
|
...theme.textStyle,
|
||||||
|
border: '3px solid',
|
||||||
|
borderColor: theme.colorError,
|
||||||
|
};
|
||||||
|
|
||||||
const password = inputPasswords[mk.id] ? inputPasswords[mk.id] : '';
|
const password = inputPasswords[mk.id] ? inputPasswords[mk.id] : '';
|
||||||
const isActive = props.activeMasterKeyId === mk.id;
|
const isActive = props.activeMasterKeyId === mk.id;
|
||||||
const activeIcon = isActive ? '✔' : '';
|
const activeIcon = isActive ? '✔' : '';
|
||||||
@ -108,8 +114,15 @@ const EncryptionConfigScreen = (props: Props) => {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
<td style={theme.textStyle}>
|
<td style={missingPasswordCellStyle}>
|
||||||
<input type="password" style={passwordStyle} value={password} onChange={event => onInputPasswordChange(mk, event.target.value)} />{' '}
|
<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 })}>
|
<button style={theme.buttonStyle} onClick={() => onSavePasswordClick(mk, { ...props.passwords, ...inputPasswords })}>
|
||||||
{_('Save')}
|
{_('Save')}
|
||||||
</button>
|
</button>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user