Skip to content

Commit

Permalink
Merge pull request #2449 from kaloudis/lockscreen-pos
Browse files Browse the repository at this point in the history
Lockscreen: include back button when in POS mode
  • Loading branch information
kaloudis authored Oct 2, 2024
2 parents 72d10d9 + bdcce04 commit 247b8b6
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions views/Lockscreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ export default class Lockscreen extends React.Component<
};

render() {
const { navigation, SettingsStore } = this.props;
const { navigation, SettingsStore, route } = this.props;
const { settings } = SettingsStore;
const {
passphrase,
Expand All @@ -404,20 +404,29 @@ export default class Lockscreen extends React.Component<
deleteDuressPin
} = this.state;

const { attemptAdminLogin } = route.params ?? {};

return (
<Screen>
{(!!modifySecurityScreen || deletePin || deleteDuressPin) && (
{(!!modifySecurityScreen ||
deletePin ||
deleteDuressPin ||
attemptAdminLogin) && (
<Header
leftComponent="Back"
centerComponent={{
text: localeString(
'views.Lockscreen.enterPassphrase'
),
style: {
color: themeColor('text'),
fontFamily: 'PPNeueMontreal-Book'
}
}}
centerComponent={
passphrase
? {
text: localeString(
'views.Lockscreen.enterPassphrase'
),
style: {
color: themeColor('text'),
fontFamily: 'PPNeueMontreal-Book'
}
}
: undefined
}
navigation={navigation}
/>
)}
Expand Down

0 comments on commit 247b8b6

Please sign in to comment.