Merge branch 'more-info-in-about-section' into 'master'

More info in about section

Closes #122

See merge request bloodyhealth/drip!145
This commit is contained in:
Julia Friesel
2019-01-08 08:03:12 +00:00
14 changed files with 149 additions and 51 deletions
@@ -45,8 +45,7 @@ export default class ActionButtonFooter extends Component {
title: labels.save,
action: () => {
if(saveDisabled) {
ToastAndroid.show(labels.disabledInfo, ToastAndroid.LONG);
console.log()
ToastAndroid.show(labels.disabledInfo, ToastAndroid.LONG)
} else {
saveAction()
if (autoShowDayView) navigateToOverView()
@@ -62,7 +61,7 @@ export default class ActionButtonFooter extends Component {
{buttons.map(({ title, action, disabledCondition, icon }, i) => {
const textStyle = [styles.menuText]
if (disabledCondition) {
textStyle.push(styles.menuTextInActive);
textStyle.push(styles.menuTextInActive)
}
const iconStyle = disabledCondition ?
Object.assign(
@@ -0,0 +1,6 @@
import {links} from '../../i18n/en/settings'
export default function(url) {
const link = Object.values(links).find(link => link.url === url)
return link ? link.text : url
}
-13
View File
@@ -1,13 +0,0 @@
import React from 'react'
import { Linking } from 'react-native'
import AppText from "./app-text"
import styles from '../styles';
export default function Link(props) {
return (
<AppText
style={styles.link}
onPress={() => Linking.openURL(props.href)}
>{props.text}</AppText>
)
}
+19 -4
View File
@@ -1,20 +1,35 @@
import React, { Component } from 'react'
import { ScrollView } from 'react-native'
import Hyperlink from 'react-native-hyperlink'
import AppText from '../app-text'
import SettingsSegment from './settings-segment'
import styles from '../../styles/index'
import labels from '../../i18n/en/settings'
import labels, { links } from '../../i18n/en/settings'
import replace from '../helpers/replace-url-with-text'
export default class AboutSection extends Component {
render() {
return (
<ScrollView>
<SettingsSegment title={`${labels.aboutSection.title} `}>
<AppText>{`${labels.aboutSection.segmentExplainer} `}</AppText>
<SettingsSegment title={labels.aboutSection.title}>
<Hyperlink linkStyle={styles.link} linkText={replace}>
<AppText>{`${labels.aboutSection.text} `}</AppText>
</Hyperlink>
</SettingsSegment>
<SettingsSegment title={`${labels.credits.title} `} style={styles.settingsSegmentLast}>
<SettingsSegment title={labels.philosophy.title}>
<AppText>{labels.philosophy.text}</AppText>
</SettingsSegment>
<SettingsSegment title={labels.credits.title}>
<AppText>{`${labels.credits.note}`}</AppText>
</SettingsSegment>
<SettingsSegment title={labels.website.title}>
<Hyperlink linkStyle={styles.link}>
<AppText>{links.website.url}</AppText>
</Hyperlink>
</SettingsSegment>
<SettingsSegment title={labels.version.title} last={true}>
<AppText>{require('../../package.json').version}</AppText>
</SettingsSegment>
</ScrollView>
)
}
+1 -2
View File
@@ -7,7 +7,6 @@ import openImportDialogAndImport from './import-dialog'
import openShareDialogAndExport from './export-dialog'
import DeleteData from './delete-data'
import labels from '../../../i18n/en/settings'
import styles from '../../../styles/index'
const DataManagement = () => {
return (
@@ -26,7 +25,7 @@ const DataManagement = () => {
</SettingsSegment>
<SettingsSegment
title={labels.deleteSegment.title}
style={styles.settingsSegmentLast}
last={true}
>
<AppText>{labels.deleteSegment.explainer}</AppText>
<DeleteData />
+2 -1
View File
@@ -3,7 +3,8 @@ import NfpSettings from './nfp-settings'
import DataManagement from './data-management'
import Password from './password'
import About from './about'
import License from './license'
export default {
Reminders, NfpSettings, DataManagement, Password, About
Reminders, NfpSettings, DataManagement, Password, About, License
}
+22
View File
@@ -0,0 +1,22 @@
import React, { Component } from 'react'
import { View, ScrollView } from 'react-native'
import Hyperlink from 'react-native-hyperlink'
import AppText from '../app-text'
import styles from '../../styles/index'
import labels from '../../i18n/en/settings'
import replace from '../helpers/replace-url-with-text'
export default class License extends Component {
render() {
return (
<ScrollView>
<View style={styles.settingsSegment}>
<Hyperlink linkStyle={styles.link} linkText={replace}>
<AppText style={styles.settingsSegmentTitle}>{`${labels.license.title} `}</AppText>
<AppText>{`${labels.license.text} `}</AppText>
</Hyperlink>
</View>
</ScrollView>
)
}
}
+5 -6
View File
@@ -2,13 +2,14 @@ import React, { Component } from 'react'
import {
ScrollView, View
} from 'react-native'
import Hyperlink from 'react-native-hyperlink'
import styles, { iconStyles } from '../../../styles'
import labels from '../../../i18n/en/settings'
import AppText from '../../app-text'
import TempSlider from './temp-slider'
import UseCervixSetting from './use-cervix'
import Icon from 'react-native-vector-icons/Entypo'
import Link from '../../link'
import replaceUrlWithText from '../../helpers/replace-url-with-text'
export default class Settings extends Component {
constructor(props) {
@@ -32,11 +33,9 @@ export default class Settings extends Component {
<Icon name="info-with-circle" style={iconStyles.infoInHeading}/>
<AppText style={styles.settingsSegmentTitle}>{`${labels.preOvu.title} `}</AppText>
</View>
<AppText>
{labels.preOvu.note1}
<Link text={labels.preOvu.link} href="https://gitlab.com/bloodyhealth/drip/wikis/home" />
{labels.preOvu.note2}
</AppText>
<Hyperlink linkStyle={styles.link} linkText={replaceUrlWithText}>
<AppText>{labels.preOvu.note}</AppText>
</Hyperlink>
</View>
</ScrollView>
)
+2 -1
View File
@@ -14,7 +14,8 @@ const menu = [
{title: labels.nfpSettings, component: 'NfpSettings'},
{title: labels.dataManagement, component: 'DataManagement'},
{title: labels.password, component: 'Password'},
{title: labels.about, component: 'About'}
{title: labels.about, component: 'About'},
{title: labels.license, component: 'License'}
]
export default function SettingsMenu(props) {
+3 -1
View File
@@ -6,8 +6,10 @@ import AppText from '../app-text'
import styles from '../../styles'
const SettingsSegment = ({ children, ...props }) => {
const style = [styles.settingsSegment, props.style]
if (props.last) style.push(styles.settingsSegmentLast)
return (
<View style={[styles.settingsSegment, props.style]}>
<View style={style}>
<AppText style={styles.settingsSegmentTitle}>{props.title}</AppText>
{children}
</View>
+1
View File
@@ -30,6 +30,7 @@ export const headerTitles = {
DataManagement: settingsTitles.dataManagement,
Password: settingsTitles.password,
About: settingsTitles.about,
License: settingsTitles.license,
BleedingEditView: 'Bleeding',
TemperatureEditView: 'Temperature',
MucusEditView: 'Mucus',
+44 -6
View File
@@ -1,11 +1,30 @@
export const links = {
gitlab: {
url: 'https://gitlab.com/bloodyhealth/drip',
text: 'GitLab'
},
email: {
url: 'mailto:bl00dyhealth@mailbox.org',
text: 'email'
},
wiki: {
url: 'https://gitlab.com/bloodyhealth/drip/wikis/home',
text: 'wiki'
},
website: {
url: 'https://bloodyhealth.gitlab.io/'
}
}
export default {
menuTitles: {
reminders: 'Reminders',
dataManagement: 'Manage your data',
nfpSettings: 'NFP settings',
password: 'Password',
about: 'About'
about: 'About',
license: 'License'
},
export: {
errors: {
@@ -93,16 +112,35 @@ export default {
},
aboutSection: {
title: 'About',
segmentExplainer: 'Please note that your data is stored locally on your phone and not on a server. We want to ensure that you stay in control of those sensitive information. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don\'t hesitate to contact us via email (bl00dyhealth@mailbox.org). You can also contribute to the code base on GitLab (https://gitlab.com/bloodyhealth/drip/).',
text: `Please note that your data is stored locally on your phone and not on a server. This means your data cannot be read by anyone else unless they have access to your phone. We want to ensure that you stay in control of your own data. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don't hesitate to contact via ${links.email.url}. You can also contribute to the code base on ${links.gitlab.url}`,
},
philosophy: {
title: 'Remember to think for yourself',
text: `Drip makes period predictions for you and helps you apply NFP fertility awareness rules. But please remember that this app is made by humans, and humans make mistakes. Always think for yourself: "Does this make sense?" Remember, you don't need an app to understand your cycle! However, drip wants to support you and make period tracking easier, more transparent and secure.`,
},
license: {
title: 'drip is an open-source cycle tracking app',
text: `Copyright (C) 2019 Bloody Health GbR
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3.0.html
You can contact us by email at bloodyhealth@mailbox.com.`
},
version: {
title: 'Version'
},
website: {
title: 'Website'
},
preOvu: {
title: 'Infertile days at cycle start',
note1: "drip applies NFP's rules for calculating infertile days at the start of the cycle (see the ",
link: 'wiki',
note2: " for more info). However, drip does not currently apply the so called 20-day-rule, which determines infertile days at the cycle start from past cycle lengths in case no past symptothermal info is available."
note: `drip applies NFP's rules for calculating infertile days at the start of the cycle (see the ${links.wiki.url} for more info). However, drip does not currently apply the so called 20-day-rule, which determines infertile days at the cycle start from past cycle lengths in case no past symptothermal info is available.`
},
credits: {
title: 'Credits',
note: 'Thanks and lots of <3 to all of our contributors, as well as, and especially, Susanne Umscheid for the wonderful visual and logo design, and Paula Härtel for the symptom icons'
}
}
}
+41 -14
View File
@@ -806,7 +806,7 @@
},
"ansi-colors": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
"requires": {
"ansi-wrap": "^0.1.0"
@@ -3323,7 +3323,7 @@
},
"event-target-shim": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-1.1.1.tgz",
"resolved": "http://registry.npmjs.org/event-target-shim/-/event-target-shim-1.1.1.tgz",
"integrity": "sha1-qG5e5r2qFgVEddp5fM3fDFVphJE="
},
"eventemitter3": {
@@ -3363,7 +3363,7 @@
},
"expand-range": {
"version": "1.8.2",
"resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"resolved": "http://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz",
"integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=",
"requires": {
"fill-range": "^2.1.0"
@@ -3652,7 +3652,7 @@
},
"fs-extra": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
"resolved": "http://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz",
"integrity": "sha1-zTzl9+fLYUWIP8rjGR6Yd/hYeVA=",
"requires": {
"graceful-fs": "^4.1.2",
@@ -4409,7 +4409,7 @@
},
"http-errors": {
"version": "1.6.3",
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"resolved": "http://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz",
"integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=",
"requires": {
"depd": "~1.1.2",
@@ -4950,7 +4950,7 @@
},
"jsonfile": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"resolved": "http://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz",
"integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=",
"requires": {
"graceful-fs": "^4.1.6"
@@ -4990,7 +4990,7 @@
},
"kind-of": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz",
"integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ="
},
"klaw": {
@@ -5024,6 +5024,14 @@
"type-check": "~0.3.2"
}
},
"linkify-it": {
"version": "1.2.4",
"resolved": "http://registry.npmjs.org/linkify-it/-/linkify-it-1.2.4.tgz",
"integrity": "sha1-B3NSbDF8j9E71TTuHRgP+Iq/iBo=",
"requires": {
"uc.micro": "^1.0.1"
}
},
"load-json-file": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz",
@@ -5137,6 +5145,11 @@
"resolved": "https://registry.npmjs.org/math-random/-/math-random-1.0.1.tgz",
"integrity": "sha1-izqsWIuKZuSXXjzepn97sylgH6w="
},
"mdurl": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4="
},
"mem": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz",
@@ -5285,12 +5298,12 @@
},
"mime-db": {
"version": "1.23.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz",
"resolved": "http://registry.npmjs.org/mime-db/-/mime-db-1.23.0.tgz",
"integrity": "sha1-oxtAcK2uon1zLqMzdApk0OyaZlk="
},
"mime-types": {
"version": "2.1.11",
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz",
"resolved": "http://registry.npmjs.org/mime-types/-/mime-types-2.1.11.tgz",
"integrity": "sha1-wlnEcb2oCKhdbNGTtDCl+uRHOzw=",
"requires": {
"mime-db": "~1.23.0"
@@ -6037,7 +6050,7 @@
},
"opn": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
"resolved": "http://registry.npmjs.org/opn/-/opn-3.0.3.tgz",
"integrity": "sha1-ttmec5n3jWXDuq/+8fsojpuFJDo=",
"requires": {
"object-assign": "^4.0.1"
@@ -6309,7 +6322,7 @@
},
"pretty-format": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
"resolved": "http://registry.npmjs.org/pretty-format/-/pretty-format-4.3.1.tgz",
"integrity": "sha1-UwvlxCs8BbNkFKeipDN6qArNDo0="
},
"private": {
@@ -6566,6 +6579,15 @@
"utf8": "^2.1.1"
}
},
"react-native-hyperlink": {
"version": "0.0.14",
"resolved": "https://registry.npmjs.org/react-native-hyperlink/-/react-native-hyperlink-0.0.14.tgz",
"integrity": "sha1-E4u/5bQQZn0eN/BKK0cTFjqw7YE=",
"requires": {
"linkify-it": "^1.2.0",
"mdurl": "^1.0.0"
}
},
"react-native-modal": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/react-native-modal/-/react-native-modal-3.1.0.tgz",
@@ -7122,7 +7144,7 @@
},
"safe-regex": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
"requires": {
"ret": "~0.1.10"
@@ -7475,7 +7497,7 @@
},
"serialize-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
"resolved": "http://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz",
"integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go="
},
"serve-static": {
@@ -8288,6 +8310,11 @@
"resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.18.tgz",
"integrity": "sha512-LtzwHlVHwFGTptfNSgezHp7WUlwiqb0gA9AALRbKaERfxwJoiX0A73QbTToxteIAuIaFshhgIZfqK8s7clqgnA=="
},
"uc.micro": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz",
"integrity": "sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg=="
},
"uglify-es": {
"version": "3.3.9",
"resolved": "https://registry.npmjs.org/uglify-es/-/uglify-es-3.3.9.tgz",
@@ -8657,7 +8684,7 @@
},
"xmlbuilder": {
"version": "9.0.7",
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz",
"integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0="
},
"xmldoc": {
+1
View File
@@ -33,6 +33,7 @@
"react-native-calendars": "^1.19.3",
"react-native-document-picker": "^2.1.0",
"react-native-fs": "^2.10.14",
"react-native-hyperlink": "0.0.14",
"react-native-modal-datetime-picker-nevo": "^4.11.0",
"react-native-push-notification": "^3.1.1",
"react-native-restart": "0.0.7",