diff --git a/src/pages/Settings/index.tsx b/src/pages/Settings/index.tsx
index 2d34d4e..38d7b73 100644
--- a/src/pages/Settings/index.tsx
+++ b/src/pages/Settings/index.tsx
@@ -85,6 +85,17 @@ export default function Settings() {
)
}
+ const checkPassword = async () => {
+ if (passwordCheckInput === settingsPass) {
+ setPasswordCheckPassed(true)
+ return
+ }
+ await message('The password you entered is incorrect.', {
+ title: 'Login failed',
+ kind: 'error',
+ })
+ }
+
if (settingsPass && !passwordCheckPassed) {
return (
@@ -92,6 +103,9 @@ export default function Settings() {
placeholder="Enter pin or password"
value={passwordCheckInput}
onChange={(e) => setPasswordCheckInput(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === 'Enter') checkPassword()
+ }}
autoCapitalize="none"
autoComplete="off"
autoCorrect="off"
@@ -111,17 +125,7 @@ export default function Settings() {
}
/>