Feature: Adds privacy policy
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
Platform,
|
||||
StyleSheet,
|
||||
TouchableOpacity,
|
||||
View
|
||||
View,
|
||||
} from 'react-native'
|
||||
|
||||
import AppIcon from '../common/app-icon'
|
||||
@@ -21,6 +21,7 @@ const settingsMenuItems = [
|
||||
{ name: menuItems.settings, component: 'SettingsMenu' },
|
||||
{ name: menuItems.about, component: 'About' },
|
||||
{ name: menuItems.license, component: 'License' },
|
||||
{ name: menuItems.privacyPolicy, component: 'PrivacyPolicy' },
|
||||
]
|
||||
|
||||
export default class HamburgerMenu extends Component {
|
||||
@@ -41,12 +42,12 @@ export default class HamburgerMenu extends Component {
|
||||
<React.Fragment>
|
||||
{!shouldShowMenu && (
|
||||
<TouchableOpacity onPress={this.toggleMenu} hitSlop={HIT_SLOP}>
|
||||
<AppIcon name='dots-three-vertical' color={Colors.orange} />
|
||||
<AppIcon name="dots-three-vertical" color={Colors.orange} />
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
{shouldShowMenu && (
|
||||
<Modal
|
||||
animationType='fade'
|
||||
animationType="fade"
|
||||
onRequestClose={this.toggleMenu}
|
||||
transparent={true}
|
||||
visible={shouldShowMenu}
|
||||
|
||||
+9
-4
@@ -3,8 +3,8 @@ import settingsViews from './settings'
|
||||
import settingsLabels from '../i18n/en/settings'
|
||||
const labels = settingsLabels.menuItems
|
||||
|
||||
export const isSettingsView =
|
||||
(page) => Object.keys(settingsViews).includes(page)
|
||||
export const isSettingsView = (page) =>
|
||||
Object.keys(settingsViews).includes(page)
|
||||
|
||||
export const pages = [
|
||||
{
|
||||
@@ -70,8 +70,13 @@ export const pages = [
|
||||
label: 'License',
|
||||
parent: 'SettingsMenu',
|
||||
},
|
||||
{
|
||||
component: 'PrivacyPolicy',
|
||||
label: 'PrivacyPolicy',
|
||||
parent: 'SettingsMenu',
|
||||
},
|
||||
{
|
||||
component: 'CycleDay',
|
||||
parent: 'Home',
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
|
||||
@@ -4,7 +4,14 @@ import DataManagement from './data-management'
|
||||
import Password from './password'
|
||||
import About from './about'
|
||||
import License from './license'
|
||||
import PrivacyPolicy from './privacy-policy'
|
||||
|
||||
export default {
|
||||
Reminders, NfpSettings, DataManagement, Password, About, License
|
||||
Reminders,
|
||||
NfpSettings,
|
||||
DataManagement,
|
||||
Password,
|
||||
About,
|
||||
License,
|
||||
PrivacyPolicy,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet } from 'react-native'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import AppPage from '../common/app-page'
|
||||
import AppText from '../common/app-text'
|
||||
import Segment from '../common/segment'
|
||||
|
||||
import { Colors, Sizes } from '../../styles'
|
||||
|
||||
const PrivacyPolicy = () => {
|
||||
const { t } = useTranslation()
|
||||
const sections = ['intro', 'dataUse', 'permissions', 'transparency']
|
||||
|
||||
return (
|
||||
<AppPage title={t('settings.privacyPolicy.title')}>
|
||||
{sections.map((sectionItem) => {
|
||||
return (
|
||||
<Segment last>
|
||||
<AppText style={styles.title}>
|
||||
{t(`settings.privacyPolicy.${sectionItem}.title`)}
|
||||
</AppText>
|
||||
<AppText>{t(`settings.privacyPolicy.${sectionItem}.text`)}</AppText>
|
||||
</Segment>
|
||||
)
|
||||
})}
|
||||
</AppPage>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
title: {
|
||||
color: Colors.purple,
|
||||
fontSize: Sizes.subtitle,
|
||||
},
|
||||
})
|
||||
|
||||
export default PrivacyPolicy
|
||||
Reference in New Issue
Block a user