diff options
Diffstat (limited to 'src/containers/auth/LockedScreen.tsx')
-rw-r--r-- | src/containers/auth/LockedScreen.tsx | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/containers/auth/LockedScreen.tsx b/src/containers/auth/LockedScreen.tsx index 500bff0d6..8e3c1ec49 100644 --- a/src/containers/auth/LockedScreen.tsx +++ b/src/containers/auth/LockedScreen.tsx | |||
@@ -1,34 +1,23 @@ | |||
1 | import { Component, ReactElement } from 'react'; | 1 | import { Component, ReactElement } from 'react'; |
2 | import { inject, observer } from 'mobx-react'; | 2 | import { inject, observer } from 'mobx-react'; |
3 | import { SettingsStore } from 'src/stores.types'; | 3 | import { DefaultProps } from 'src/@types/ferdium-components.types'; |
4 | import Locked from '../../components/auth/Locked'; | 4 | import Locked from '../../components/auth/Locked'; |
5 | 5 | ||
6 | import { hash } from '../../helpers/password-helpers'; | 6 | import { hash } from '../../helpers/password-helpers'; |
7 | import UserStore from '../../stores/UserStore'; | ||
8 | 7 | ||
9 | interface IProps { | 8 | class LockedScreen extends Component<DefaultProps> { |
10 | actions: { | ||
11 | settings: SettingsStore; | ||
12 | }; | ||
13 | stores: { | ||
14 | settings: SettingsStore; | ||
15 | user: UserStore; | ||
16 | }; | ||
17 | } | ||
18 | |||
19 | class LockedScreen extends Component<IProps> { | ||
20 | state = { | 9 | state = { |
21 | error: false, | 10 | error: false, |
22 | }; | 11 | }; |
23 | 12 | ||
24 | constructor(props) { | 13 | constructor(props: DefaultProps) { |
25 | super(props); | 14 | super(props); |
26 | 15 | ||
27 | this.onSubmit = this.onSubmit.bind(this); | 16 | this.onSubmit = this.onSubmit.bind(this); |
28 | this.unlock = this.unlock.bind(this); | 17 | this.unlock = this.unlock.bind(this); |
29 | } | 18 | } |
30 | 19 | ||
31 | onSubmit(values): void { | 20 | onSubmit(values: any): void { |
32 | const { password } = values; | 21 | const { password } = values; |
33 | 22 | ||
34 | let correctPassword = this.props.stores.settings.all.app.lockedPassword; | 23 | let correctPassword = this.props.stores.settings.all.app.lockedPassword; |