aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/settings
diff options
context:
space:
mode:
authorLibravatar Bennett <hello@vantezzen.io>2020-03-03 17:53:09 +0100
committerLibravatar GitHub <noreply@github.com>2020-03-03 17:53:09 +0100
commite043795a040b8666a6ad253bb6cd37a5d647bbd5 (patch)
treed14e1237d49687742901d515c95d7d2c5fbe069f /src/components/settings
parentAdd Crowdin contributors to list of contributors (#429) (diff)
downloadferdium-app-e043795a040b8666a6ad253bb6cd37a5d647bbd5.tar.gz
ferdium-app-e043795a040b8666a6ad253bb6cd37a5d647bbd5.tar.zst
ferdium-app-e043795a040b8666a6ad253bb6cd37a5d647bbd5.zip
Add support for unlocking with Touch ID (#423)
* Enhance installation guide in README * Add TouchID unlock for Ferdi Lock * Remove commit 8861014 as it is not related to this feature This reverts commit 88610144b942739772286ec3073b328e829a8b39. * Rename TouchID to "Touch ID" * Improve Touch ID prompt text * Improve unlocking with Touch ID * Fix lint * Add separator after lock-related menu entry Co-authored-by: Amine <amine@mouafik.fr>
Diffstat (limited to 'src/components/settings')
-rw-r--r--src/components/settings/settings/EditSettingsForm.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js
index f41c7db8e..33822ec5d 100644
--- a/src/components/settings/settings/EditSettingsForm.js
+++ b/src/components/settings/settings/EditSettingsForm.js
@@ -14,6 +14,10 @@ import Input from '../../ui/Input';
14import { FRANZ_TRANSLATION } from '../../../config'; 14import { FRANZ_TRANSLATION } from '../../../config';
15import { isMac } from '../../../environment'; 15import { isMac } from '../../../environment';
16 16
17const {
18 systemPreferences,
19} = remote;
20
17function escapeHtml(unsafe) { 21function escapeHtml(unsafe) {
18 return unsafe 22 return unsafe
19 .replace(/&/g, '&amp;') 23 .replace(/&/g, '&amp;')
@@ -355,6 +359,10 @@ export default @observer class EditSettingsForm extends Component {
355 <Toggle field={form.$('lockingFeatureEnabled')} /> 359 <Toggle field={form.$('lockingFeatureEnabled')} />
356 {lockingFeatureEnabled && ( 360 {lockingFeatureEnabled && (
357 <> 361 <>
362 {systemPreferences.canPromptTouchID() && (
363 <Toggle field={form.$('useTouchIdToUnlock')} />
364 )}
365
358 <Input 366 <Input
359 placeholder={intl.formatMessage(messages.lockedPassword)} 367 placeholder={intl.formatMessage(messages.lockedPassword)}
360 onChange={e => this.submit(e)} 368 onChange={e => this.submit(e)}