diff options
author | 2020-03-03 17:53:09 +0100 | |
---|---|---|
committer | 2020-03-03 17:53:09 +0100 | |
commit | e043795a040b8666a6ad253bb6cd37a5d647bbd5 (patch) | |
tree | d14e1237d49687742901d515c95d7d2c5fbe069f /src/containers/auth | |
parent | Add Crowdin contributors to list of contributors (#429) (diff) | |
download | ferdium-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/containers/auth')
-rw-r--r-- | src/containers/auth/LockedScreen.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/containers/auth/LockedScreen.js b/src/containers/auth/LockedScreen.js index 671f2ccaf..aced64a98 100644 --- a/src/containers/auth/LockedScreen.js +++ b/src/containers/auth/LockedScreen.js | |||
@@ -19,6 +19,7 @@ export default @inject('stores', 'actions') @observer class LockedScreen extends | |||
19 | super(props); | 19 | super(props); |
20 | 20 | ||
21 | this.onSubmit = this.onSubmit.bind(this); | 21 | this.onSubmit = this.onSubmit.bind(this); |
22 | this.unlock = this.unlock.bind(this); | ||
22 | } | 23 | } |
23 | 24 | ||
24 | onSubmit(values) { | 25 | onSubmit(values) { |
@@ -45,11 +46,24 @@ export default @inject('stores', 'actions') @observer class LockedScreen extends | |||
45 | } | 46 | } |
46 | } | 47 | } |
47 | 48 | ||
49 | unlock() { | ||
50 | this.props.actions.settings.update({ | ||
51 | type: 'app', | ||
52 | data: { | ||
53 | locked: false, | ||
54 | }, | ||
55 | }); | ||
56 | } | ||
57 | |||
48 | render() { | 58 | render() { |
49 | const { stores, error } = this.props; | 59 | const { stores, error } = this.props; |
60 | const { useTouchIdToUnlock } = this.props.stores.settings.all.app; | ||
61 | |||
50 | return ( | 62 | return ( |
51 | <Locked | 63 | <Locked |
52 | onSubmit={this.onSubmit} | 64 | onSubmit={this.onSubmit} |
65 | unlock={this.unlock} | ||
66 | useTouchIdToUnlock={useTouchIdToUnlock} | ||
53 | isSubmitting={stores.user.loginRequest.isExecuting} | 67 | isSubmitting={stores.user.loginRequest.isExecuting} |
54 | error={this.state.error || error} | 68 | error={this.state.error || error} |
55 | /> | 69 | /> |