diff --git a/components/settings/index.js b/components/settings/index.js index 7bbbdc5..4a8fc25 100644 --- a/components/settings/index.js +++ b/components/settings/index.js @@ -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 } diff --git a/components/settings/license.js b/components/settings/license.js new file mode 100644 index 0000000..342193d --- /dev/null +++ b/components/settings/license.js @@ -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 ( + + + + {`${labels.license.title} `} + {`${labels.license.text} `} + + + + ) + } +} diff --git a/components/settings/settings-menu.js b/components/settings/settings-menu.js index 3d927e0..a26a289 100644 --- a/components/settings/settings-menu.js +++ b/components/settings/settings-menu.js @@ -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) { diff --git a/i18n/en/labels.js b/i18n/en/labels.js index 17e3526..1917917 100644 --- a/i18n/en/labels.js +++ b/i18n/en/labels.js @@ -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', diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 6eaa1a2..9d3d40d 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -20,7 +20,8 @@ export default { dataManagement: 'Manage your data', nfpSettings: 'NFP settings', password: 'Password', - about: 'About' + about: 'About', + license: 'License' }, export: { errors: { @@ -110,6 +111,17 @@ export default { 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 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}`, }, + 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/ + +You can contact us by email at bloodyhealth@mailbox.com.` + }, preOvu: { title: 'Infertile days at cycle start', 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.`