diff options
author | 2020-05-01 12:49:22 +0200 | |
---|---|---|
committer | 2020-05-01 12:49:22 +0200 | |
commit | b479acc0a7d2aa06d8adc7a030691447a36e9cfb (patch) | |
tree | 9bdc5a9420fc38920b402bb7c8a78d5db0bca6dc /src/containers/auth | |
parent | Restore delete service in sidebar (#692) (diff) | |
download | ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.tar.gz ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.tar.zst ferdium-app-b479acc0a7d2aa06d8adc7a030691447a36e9cfb.zip |
Refactor locking feature (#693)
Diffstat (limited to 'src/containers/auth')
-rw-r--r-- | src/containers/auth/LockedScreen.js | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/containers/auth/LockedScreen.js b/src/containers/auth/LockedScreen.js index aced64a98..8f6ce85c3 100644 --- a/src/containers/auth/LockedScreen.js +++ b/src/containers/auth/LockedScreen.js | |||
@@ -4,13 +4,7 @@ import { inject, observer } from 'mobx-react'; | |||
4 | import Locked from '../../components/auth/Locked'; | 4 | import Locked from '../../components/auth/Locked'; |
5 | import SettingsStore from '../../stores/SettingsStore'; | 5 | import SettingsStore from '../../stores/SettingsStore'; |
6 | 6 | ||
7 | import { globalError as globalErrorPropType } from '../../prop-types'; | ||
8 | |||
9 | export default @inject('stores', 'actions') @observer class LockedScreen extends Component { | 7 | export default @inject('stores', 'actions') @observer class LockedScreen extends Component { |
10 | static propTypes = { | ||
11 | error: globalErrorPropType.isRequired, | ||
12 | }; | ||
13 | |||
14 | state = { | 8 | state = { |
15 | error: false, | 9 | error: false, |
16 | } | 10 | } |
@@ -56,17 +50,23 @@ export default @inject('stores', 'actions') @observer class LockedScreen extends | |||
56 | } | 50 | } |
57 | 51 | ||
58 | render() { | 52 | render() { |
59 | const { stores, error } = this.props; | 53 | const { stores } = this.props; |
60 | const { useTouchIdToUnlock } = this.props.stores.settings.all.app; | 54 | const { useTouchIdToUnlock } = this.props.stores.settings.all.app; |
61 | 55 | ||
62 | return ( | 56 | return ( |
63 | <Locked | 57 | <div className="auth"> |
64 | onSubmit={this.onSubmit} | 58 | <div className="auth__layout"> |
65 | unlock={this.unlock} | 59 | <div className="auth__container"> |
66 | useTouchIdToUnlock={useTouchIdToUnlock} | 60 | <Locked |
67 | isSubmitting={stores.user.loginRequest.isExecuting} | 61 | onSubmit={this.onSubmit} |
68 | error={this.state.error || error} | 62 | unlock={this.unlock} |
69 | /> | 63 | useTouchIdToUnlock={useTouchIdToUnlock} |
64 | isSubmitting={stores.user.loginRequest.isExecuting} | ||
65 | error={this.state.error || {}} | ||
66 | /> | ||
67 | </div> | ||
68 | </div> | ||
69 | </div> | ||
70 | ); | 70 | ); |
71 | } | 71 | } |
72 | } | 72 | } |