Feature: Adds privacy policy

This commit is contained in:
BloodyMarie
2022-06-19 23:24:53 +02:00
parent 5b9d904a02
commit 3b187a5a4e
6 changed files with 95 additions and 31 deletions
+4 -3
View File
@@ -4,7 +4,7 @@ import {
Platform, Platform,
StyleSheet, StyleSheet,
TouchableOpacity, TouchableOpacity,
View View,
} from 'react-native' } from 'react-native'
import AppIcon from '../common/app-icon' import AppIcon from '../common/app-icon'
@@ -21,6 +21,7 @@ const settingsMenuItems = [
{ name: menuItems.settings, component: 'SettingsMenu' }, { name: menuItems.settings, component: 'SettingsMenu' },
{ name: menuItems.about, component: 'About' }, { name: menuItems.about, component: 'About' },
{ name: menuItems.license, component: 'License' }, { name: menuItems.license, component: 'License' },
{ name: menuItems.privacyPolicy, component: 'PrivacyPolicy' },
] ]
export default class HamburgerMenu extends Component { export default class HamburgerMenu extends Component {
@@ -41,12 +42,12 @@ export default class HamburgerMenu extends Component {
<React.Fragment> <React.Fragment>
{!shouldShowMenu && ( {!shouldShowMenu && (
<TouchableOpacity onPress={this.toggleMenu} hitSlop={HIT_SLOP}> <TouchableOpacity onPress={this.toggleMenu} hitSlop={HIT_SLOP}>
<AppIcon name='dots-three-vertical' color={Colors.orange} /> <AppIcon name="dots-three-vertical" color={Colors.orange} />
</TouchableOpacity> </TouchableOpacity>
)} )}
{shouldShowMenu && ( {shouldShowMenu && (
<Modal <Modal
animationType='fade' animationType="fade"
onRequestClose={this.toggleMenu} onRequestClose={this.toggleMenu}
transparent={true} transparent={true}
visible={shouldShowMenu} visible={shouldShowMenu}
+9 -4
View File
@@ -3,8 +3,8 @@ import settingsViews from './settings'
import settingsLabels from '../i18n/en/settings' import settingsLabels from '../i18n/en/settings'
const labels = settingsLabels.menuItems const labels = settingsLabels.menuItems
export const isSettingsView = export const isSettingsView = (page) =>
(page) => Object.keys(settingsViews).includes(page) Object.keys(settingsViews).includes(page)
export const pages = [ export const pages = [
{ {
@@ -70,8 +70,13 @@ export const pages = [
label: 'License', label: 'License',
parent: 'SettingsMenu', parent: 'SettingsMenu',
}, },
{
component: 'PrivacyPolicy',
label: 'PrivacyPolicy',
parent: 'SettingsMenu',
},
{ {
component: 'CycleDay', component: 'CycleDay',
parent: 'Home', parent: 'Home',
} },
] ]
+8 -1
View File
@@ -4,7 +4,14 @@ import DataManagement from './data-management'
import Password from './password' import Password from './password'
import About from './about' import About from './about'
import License from './license' import License from './license'
import PrivacyPolicy from './privacy-policy'
export default { export default {
Reminders, NfpSettings, DataManagement, Password, About, License Reminders,
NfpSettings,
DataManagement,
Password,
About,
License,
PrivacyPolicy,
} }
+38
View File
@@ -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
+35 -23
View File
@@ -3,11 +3,11 @@ const settingsTitles = labels.menuItems
export const home = { export const home = {
unknown: '?', unknown: '?',
phase: n => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`, phase: (n) => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`,
} }
export const chart = { export const chart = {
tutorial: 'You can swipe the chart to view more dates.' tutorial: 'You can swipe the chart to view more dates.',
} }
export const shared = { export const shared = {
@@ -25,12 +25,12 @@ export const shared = {
confirmToProceed: 'Confirm to proceed', confirmToProceed: 'Confirm to proceed',
date: 'Date', date: 'Date',
loading: 'Loading ...', loading: 'Loading ...',
noDataWarning: 'You haven\'t entered any data yet.', noDataWarning: "You haven't entered any data yet.",
noTemperatureWarning: 'You haven\'t entered any temperature data yet.', noTemperatureWarning: "You haven't entered any temperature data yet.",
noDataButtonText: 'Start entering data now', noDataButtonText: 'Start entering data now',
enter: 'Enter', enter: 'Enter',
remove: 'Remove', remove: 'Remove',
learnMore: 'Learn more' learnMore: 'Learn more',
} }
export const headerTitles = { export const headerTitles = {
@@ -45,6 +45,7 @@ export const headerTitles = {
Password: settingsTitles.password.name, Password: settingsTitles.password.name,
About: 'About', About: 'About',
License: 'License', License: 'License',
PrivacyPolicy: 'Privacy Policy',
bleeding: 'Bleeding', bleeding: 'Bleeding',
temperature: 'Temperature', temperature: 'Temperature',
mucus: 'Cervical Mucus', mucus: 'Cervical Mucus',
@@ -53,7 +54,7 @@ export const headerTitles = {
desire: 'Desire', desire: 'Desire',
sex: 'Sex', sex: 'Sex',
pain: 'Pain', pain: 'Pain',
mood: 'Mood' mood: 'Mood',
} }
export const stats = { export const stats = {
@@ -64,48 +65,59 @@ export const stats = {
averageLabel: 'Average cycle', averageLabel: 'Average cycle',
minLabel: `Shortest`, minLabel: `Shortest`,
maxLabel: `Longest`, maxLabel: `Longest`,
stdLabel: `Standard\ndeviation` stdLabel: `Standard\ndeviation`,
} }
export const bleedingPrediction = { export const bleedingPrediction = {
predictionInFuture: (startDays, endDays) => `Your next period is likely to start in ${startDays} to ${endDays} days.`, predictionInFuture: (startDays, endDays) =>
predictionStartedXDaysLeft: (numberOfDays) => `Your period is likely to start today or within the next ${numberOfDays} days.`, `Your next period is likely to start in ${startDays} to ${endDays} days.`,
predictionStarted1DayLeft: 'Your period is likely to start today or tomorrow.', predictionStartedXDaysLeft: (numberOfDays) =>
`Your period is likely to start today or within the next ${numberOfDays} days.`,
predictionStarted1DayLeft:
'Your period is likely to start today or tomorrow.',
predictionStartedNoDaysLeft: 'Your period is likely to start today.', predictionStartedNoDaysLeft: 'Your period is likely to start today.',
predictionInPast: (startDate, endDate) => `Based on your documented data, your period was likely to start between ${startDate} and ${endDate}.` predictionInPast: (startDate, endDate) =>
`Based on your documented data, your period was likely to start between ${startDate} and ${endDate}.`,
} }
export const passwordPrompt = { export const passwordPrompt = {
title: 'Unlock app', title: 'Unlock app',
enterPassword: 'Enter password here', enterPassword: 'Enter password here',
deleteDatabaseExplainer: "If you've forgotten your password, unfortunately, there is nothing we can do to recover your data, because it is encrypted with the password only you know. You can, however, delete all your encrypted data and start fresh. Once all data has been erased, you can set a new password in the settings, if you like.", deleteDatabaseExplainer:
"If you've forgotten your password, unfortunately, there is nothing we can do to recover your data, because it is encrypted with the password only you know. You can, however, delete all your encrypted data and start fresh. Once all data has been erased, you can set a new password in the settings, if you like.",
forgotPassword: 'Forgot your password?', forgotPassword: 'Forgot your password?',
deleteDatabaseTitle: 'Forgot your password?', deleteDatabaseTitle: 'Forgot your password?',
deleteData: 'Yes, delete all my data', deleteData: 'Yes, delete all my data',
areYouSureTitle: 'Are you sure?', areYouSureTitle: 'Are you sure?',
areYouSure: 'Are you absolutely sure you want to permanently delete all your data?', areYouSure:
reallyDeleteData: 'Yes, I am sure' 'Are you absolutely sure you want to permanently delete all your data?',
reallyDeleteData: 'Yes, I am sure',
} }
export const fertilityStatus = { export const fertilityStatus = {
fertile: 'fertile', fertile: 'fertile',
infertile: 'infertile', infertile: 'infertile',
fertileUntilEvening: 'Fertile phase ends in the evening', fertileUntilEvening: 'Fertile phase ends in the evening',
unknown: "We cannot show any cycle information because no period data has been added.", unknown:
preOvuText: "With NFP rules, you may assume 5 days of infertility at the beginning of your cycle, provided you don't observe any fertile cervical mucus or cervix values.", 'We cannot show any cycle information because no period data has been added.',
periOvuText: "We were not able to detect both a temperature shift and cervical mucus or cervix shift.", preOvuText:
periOvuUntilEveningText: tempRule => { "With NFP rules, you may assume 5 days of infertility at the beginning of your cycle, provided you don't observe any fertile cervical mucus or cervix values.",
periOvuText:
'We were not able to detect both a temperature shift and cervical mucus or cervix shift.',
periOvuUntilEveningText: (tempRule) => {
return ( return (
'We detected a temperature shift (' + ['regular', '1st exception', '2nd exception'][tempRule] + 'We detected a temperature shift (' +
['regular', '1st exception', '2nd exception'][tempRule] +
' temperature rule), as well as a cervical mucus/cervix shift according to NFP rules. In the evening today you may assume infertility, but ' + ' temperature rule), as well as a cervical mucus/cervix shift according to NFP rules. In the evening today you may assume infertility, but ' +
'always remember to double-check for yourself. Make sure the data makes sense to you.' 'always remember to double-check for yourself. Make sure the data makes sense to you.'
) )
}, },
postOvuText: tempRule => { postOvuText: (tempRule) => {
return ( return (
'We detected a temperature shift (' + ['regular', '1st exception', '2nd exception'][tempRule] + 'We detected a temperature shift (' +
['regular', '1st exception', '2nd exception'][tempRule] +
' temperature rule), as well as a cervical mucus/cervix shift according to NFP rules. You may assume infertility, but always remember to ' + ' temperature rule), as well as a cervical mucus/cervix shift according to NFP rules. You may assume infertility, but always remember to ' +
'double-check for yourself. Make sure the data makes sense to you.' 'double-check for yourself. Make sure the data makes sense to you.'
) )
} },
} }
+1
View File
@@ -22,6 +22,7 @@ export default {
about: 'About', about: 'About',
license: 'License', license: 'License',
settings: 'Settings', settings: 'Settings',
privacyPolicy: 'Privacy Policy',
}, },
export: { export: {
errors: { errors: {