diff options
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/auth/LockedScreen.js | 14 | ||||
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 10 |
2 files changed, 24 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 | /> |
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 6dd21f961..6b3f8d3d3 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -88,6 +88,10 @@ const messages = defineMessages({ | |||
88 | id: 'settings.app.form.lockPassword', | 88 | id: 'settings.app.form.lockPassword', |
89 | defaultMessage: '!!!Password', | 89 | defaultMessage: '!!!Password', |
90 | }, | 90 | }, |
91 | useTouchIdToUnlock: { | ||
92 | id: 'settings.app.form.useTouchIdToUnlock', | ||
93 | defaultMessage: '!!!Allow using Touch ID to unlock', | ||
94 | }, | ||
91 | inactivityLock: { | 95 | inactivityLock: { |
92 | id: 'settings.app.form.inactivityLock', | 96 | id: 'settings.app.form.inactivityLock', |
93 | defaultMessage: '!!!Lock after inactivity', | 97 | defaultMessage: '!!!Lock after inactivity', |
@@ -202,6 +206,7 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
202 | todoServer: settingsData.todoServer, | 206 | todoServer: settingsData.todoServer, |
203 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, | 207 | lockingFeatureEnabled: settingsData.lockingFeatureEnabled, |
204 | lockedPassword: settingsData.lockedPassword, | 208 | lockedPassword: settingsData.lockedPassword, |
209 | useTouchIdToUnlock: settingsData.useTouchIdToUnlock, | ||
205 | inactivityLock: settingsData.inactivityLock, | 210 | inactivityLock: settingsData.inactivityLock, |
206 | scheduledDNDEnabled: settingsData.scheduledDNDEnabled, | 211 | scheduledDNDEnabled: settingsData.scheduledDNDEnabled, |
207 | scheduledDNDStart: settingsData.scheduledDNDStart, | 212 | scheduledDNDStart: settingsData.scheduledDNDStart, |
@@ -365,6 +370,11 @@ export default @inject('stores', 'actions') @observer class EditSettingsScreen e | |||
365 | default: '', | 370 | default: '', |
366 | type: 'password', | 371 | type: 'password', |
367 | }, | 372 | }, |
373 | useTouchIdToUnlock: { | ||
374 | label: intl.formatMessage(messages.useTouchIdToUnlock), | ||
375 | value: settings.all.app.useTouchIdToUnlock, | ||
376 | default: DEFAULT_APP_SETTINGS.useTouchIdToUnlock, | ||
377 | }, | ||
368 | inactivityLock: { | 378 | inactivityLock: { |
369 | label: intl.formatMessage(messages.inactivityLock), | 379 | label: intl.formatMessage(messages.inactivityLock), |
370 | value: settings.all.app.inactivityLock, | 380 | value: settings.all.app.inactivityLock, |