Skip to content

Commit

Permalink
feat: added auth toggle to app settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Nov 23, 2024
1 parent 9734a1e commit 2bc41cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/AppSettingsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ const AppSettingsMenu = () => {
AppSettings.VibrateNotification
)

const [authLocal, setAuthLocal] = useMMKVBoolean(AppSettings.LocallyAuthenticateUser)

return (
<ScrollView style={styles.mainContainer}>
<Stack.Screen options={{ title: 'App Settings' }} />
Expand Down Expand Up @@ -232,6 +234,15 @@ const AppSettingsMenu = () => {
}}>
<Text style={styles.buttonText}>Import Database</Text>
</TouchableOpacity>

<SectionTitle>Security</SectionTitle>
<SwitchWithDescription
title="Lock App"
value={authLocal}
onValueChange={setAuthLocal}
description="Requires user authentication to open the app. This will not work if you have no device locks enabled."
/>

<View style={{ paddingVertical: 60 }} />
</ScrollView>
)
Expand Down

0 comments on commit 2bc41cf

Please sign in to comment.