Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement new layout for SecurityPage #26784

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions assets/animations/Safe.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/components/LottieAnimations.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ const PreferencesDJ = require('../../assets/animations/PreferencesDJ.json');
const ReviewingBankInfo = require('../../assets/animations/ReviewingBankInfo.json');
const WorkspacePlanet = require('../../assets/animations/WorkspacePlanet.json');
const SaveTheWorld = require('../../assets/animations/SaveTheWorld.json');
const Safe = require('../../assets/animations/Safe.json');

export {ExpensifyLounge, Fireworks, Hands, PreferencesDJ, ReviewingBankInfo, SaveTheWorld, WorkspacePlanet};
export {ExpensifyLounge, Fireworks, Hands, PreferencesDJ, ReviewingBankInfo, SaveTheWorld, WorkspacePlanet, Safe};
20 changes: 12 additions & 8 deletions src/pages/settings/Security/SecuritySettingsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ import React from 'react';
import {View, ScrollView} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import PropTypes from 'prop-types';
import HeaderWithBackButton from '../../../components/HeaderWithBackButton';
import Navigation from '../../../libs/Navigation/Navigation';
import ROUTES from '../../../ROUTES';
import styles from '../../../styles/styles';
import * as Expensicons from '../../../components/Icon/Expensicons';
import ScreenWrapper from '../../../components/ScreenWrapper';
import themeColors from '../../../styles/themes/default';
import withLocalize, {withLocalizePropTypes} from '../../../components/withLocalize';
import MenuItem from '../../../components/MenuItem';
import compose from '../../../libs/compose';
import ONYXKEYS from '../../../ONYXKEYS';
import IllustratedHeaderPageLayout from '../../../components/IllustratedHeaderPageLayout';
import * as LottieAnimations from '../../../components/LottieAnimations';

const propTypes = {
...withLocalizePropTypes,
Expand Down Expand Up @@ -47,11 +48,14 @@ function SecuritySettingsPage(props) {
];

return (
<ScreenWrapper>
<HeaderWithBackButton
title={props.translate('initialSettingsPage.security')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}
/>
<IllustratedHeaderPageLayout
title={props.translate('initialSettingsPage.security')}
onBackButtonPress={() => Navigation.goBack(ROUTES.SETTINGS)}
shouldShowBackButton
shouldShowCloseButton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this is in the design file but the Close buttons are deprecated with the new navigation framework so I am going to remove this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

illustration={LottieAnimations.Safe}
backgroundColor={themeColors.PAGE_BACKGROUND_COLORS[ROUTES.SETTINGS_SECURITY]}
>
<ScrollView contentContainerStyle={[styles.flexGrow1, styles.flexColumn, styles.justifyContentBetween]}>
<View style={[styles.flex1]}>
{_.map(menuItems, (item) => (
Expand All @@ -66,7 +70,7 @@ function SecuritySettingsPage(props) {
))}
</View>
</ScrollView>
</ScreenWrapper>
</IllustratedHeaderPageLayout>
);
}

Expand Down
1 change: 1 addition & 0 deletions src/styles/colors.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export default {

ice200: '#CCF7FF',
ice400: '#50EEF6',
ice500: '#4ED7DE',
ice700: '#28736D',
ice800: '#134038',

Expand Down
1 change: 1 addition & 0 deletions src/styles/themes/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ darkTheme.PAGE_BACKGROUND_COLORS = {
[SCREENS.SETTINGS.PREFERENCES]: colors.blue500,
[SCREENS.SETTINGS.WORKSPACES]: colors.pink800,
[ROUTES.I_KNOW_A_TEACHER]: colors.orange800,
[ROUTES.SETTINGS_SECURITY]: colors.ice500,
};

const oldTheme = {
Expand Down
Loading