From 27b4a454ec17bd75db95202b7ed7ae1fd58e60b4 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:15:03 +0100 Subject: [PATCH 01/10] Improve linking and link more things --- components/helpers/replace-url-with-text.js | 6 +++ components/link.js | 13 ----- components/settings/about.js | 6 ++- components/settings/nfp-settings/index.js | 11 ++--- i18n/en/settings.js | 23 +++++++-- package-lock.json | 55 +++++++++++++++------ package.json | 1 + 7 files changed, 76 insertions(+), 39 deletions(-) create mode 100644 components/helpers/replace-url-with-text.js delete mode 100644 components/link.js diff --git a/components/helpers/replace-url-with-text.js b/components/helpers/replace-url-with-text.js new file mode 100644 index 0000000..a490333 --- /dev/null +++ b/components/helpers/replace-url-with-text.js @@ -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 +} \ No newline at end of file diff --git a/components/link.js b/components/link.js deleted file mode 100644 index f5d2c10..0000000 --- a/components/link.js +++ /dev/null @@ -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 ( - Linking.openURL(props.href)} - >{props.text} - ) -} \ No newline at end of file diff --git a/components/settings/about.js b/components/settings/about.js index 49f5843..d1ec5cc 100644 --- a/components/settings/about.js +++ b/components/settings/about.js @@ -1,16 +1,20 @@ 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 replace from '../helpers/replace-url-with-text' export default class AboutSection extends Component { render() { return ( - {`${labels.aboutSection.segmentExplainer} `} + + {`${labels.aboutSection.segmentExplainer} `} + {`${labels.credits.note}`} diff --git a/components/settings/nfp-settings/index.js b/components/settings/nfp-settings/index.js index e975dc7..c4810bc 100644 --- a/components/settings/nfp-settings/index.js +++ b/components/settings/nfp-settings/index.js @@ -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 { {`${labels.preOvu.title} `} - - {labels.preOvu.note1} - - {labels.preOvu.note2} - + + {labels.preOvu.note} + ) diff --git a/i18n/en/settings.js b/i18n/en/settings.js index d3565d3..6eaa1a2 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -1,4 +1,19 @@ +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' + } +} + export default { menuTitles: { reminders: 'Reminders', @@ -93,16 +108,14 @@ 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/).', + 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}`, }, 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' } -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 9ae02fc..266c37a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -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": { diff --git a/package.json b/package.json index f50ced9..1fc1f70 100644 --- a/package.json +++ b/package.json @@ -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", From 4671a2e337cd33e78ca4e81ac70fa7e0f611b81a Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:36:39 +0100 Subject: [PATCH 02/10] Add license text --- components/settings/index.js | 3 ++- components/settings/license.js | 22 ++++++++++++++++++++++ components/settings/settings-menu.js | 3 ++- i18n/en/labels.js | 1 + i18n/en/settings.js | 14 +++++++++++++- 5 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 components/settings/license.js 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.` From 0126a70d6406b3d4b2bc0e873263d6b38a2787f1 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:38:25 +0100 Subject: [PATCH 03/10] Clean up --- components/cycle-day/symptoms/action-button-footer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/cycle-day/symptoms/action-button-footer.js b/components/cycle-day/symptoms/action-button-footer.js index 9da25e2..5f666e9 100644 --- a/components/cycle-day/symptoms/action-button-footer.js +++ b/components/cycle-day/symptoms/action-button-footer.js @@ -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( From f2cbccde9be4d3a4f47e536af3b5931ba73d7f53 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:40:15 +0100 Subject: [PATCH 04/10] Update GPL link --- i18n/en/settings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 9d3d40d..5b0efd5 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -118,7 +118,7 @@ export default { 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/ +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.` }, From 1e9894393193e8789cb9c3bb5980a597ea99267c Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:45:08 +0100 Subject: [PATCH 05/10] Add version number --- i18n/en/settings.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 5b0efd5..2f60abb 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -122,6 +122,9 @@ GNU General Public License for more details: https://www.gnu.org/licenses/gpl-3. You can contact us by email at bloodyhealth@mailbox.com.` }, + version: { + title: 'Version' + }, 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.` From b5240e32b04ea0fc9a5f2aa9545a5bc1ef443945 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 18:48:25 +0100 Subject: [PATCH 06/10] Add website --- components/settings/about.js | 14 ++++++++++++-- i18n/en/settings.js | 6 ++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/components/settings/about.js b/components/settings/about.js index d1ec5cc..e0a99da 100644 --- a/components/settings/about.js +++ b/components/settings/about.js @@ -1,10 +1,10 @@ import React, { Component } from 'react' -import { ScrollView } from 'react-native' +import { View, 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 { @@ -19,6 +19,16 @@ export default class AboutSection extends Component { {`${labels.credits.note}`} + + + {`${labels.website.title} `} + {links.website.url} + + + + {`${labels.version.title} `} + {require('../../package.json').version} + ) } diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 2f60abb..8332179 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -11,6 +11,9 @@ export const links = { wiki: { url: 'https://gitlab.com/bloodyhealth/drip/wikis/home', text: 'wiki' + }, + website: { + url: 'https://bloodyhealth.gitlab.io/' } } @@ -125,6 +128,9 @@ You can contact us by email at bloodyhealth@mailbox.com.` version: { title: 'Version' }, + website: { + title: 'Website' + }, 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.` From 6a79f35e9005677755f7c114fe0e567a07b63da4 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Sun, 23 Dec 2018 19:04:11 +0100 Subject: [PATCH 07/10] Think for yourself text --- components/settings/about.js | 10 ++++++++++ i18n/en/settings.js | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/components/settings/about.js b/components/settings/about.js index e0a99da..0732edc 100644 --- a/components/settings/about.js +++ b/components/settings/about.js @@ -16,6 +16,16 @@ export default class AboutSection extends Component { {`${labels.aboutSection.segmentExplainer} `} + + {`${labels.philosophy.title} `} + {labels.philosophy.text} + + + + {`${labels.aboutSection.title} `} + {labels.aboutSection.text} + + {`${labels.credits.note}`} diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 8332179..120efdf 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -112,7 +112,11 @@ 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 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}`, + text: `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}`, + }, + 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!`, }, license: { title: 'drip is an open-source cycle tracking app', From 5af16e28ca009e300cae76a5b89f49960c935c5d Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Wed, 2 Jan 2019 15:14:49 +0100 Subject: [PATCH 08/10] Improve wording --- i18n/en/settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/en/settings.js b/i18n/en/settings.js index 120efdf..52bc075 100644 --- a/i18n/en/settings.js +++ b/i18n/en/settings.js @@ -112,11 +112,11 @@ export default { }, aboutSection: { title: 'About', - text: `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}`, + 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!`, + 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', From e87f439ff28b4aaadfeb4bff6104f3fd6fa5e613 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Tue, 8 Jan 2019 09:00:10 +0100 Subject: [PATCH 09/10] Update about.js with settingsSegment and give it last prop --- components/settings/about.js | 29 +++++++------------- components/settings/data-management/index.js | 2 +- components/settings/settings-segment.js | 4 ++- 3 files changed, 14 insertions(+), 21 deletions(-) diff --git a/components/settings/about.js b/components/settings/about.js index 0732edc..6ee5451 100644 --- a/components/settings/about.js +++ b/components/settings/about.js @@ -1,5 +1,5 @@ import React, { Component } from 'react' -import { View, ScrollView } from 'react-native' +import { ScrollView } from 'react-native' import Hyperlink from 'react-native-hyperlink' import AppText from '../app-text' import SettingsSegment from './settings-segment' @@ -11,34 +11,25 @@ export default class AboutSection extends Component { render() { return ( - + - {`${labels.aboutSection.segmentExplainer} `} + {`${labels.aboutSection.text} `} - - {`${labels.philosophy.title} `} + {labels.philosophy.text} - - - - {`${labels.aboutSection.title} `} - {labels.aboutSection.text} - - - + + {`${labels.credits.note}`} - + - {`${labels.website.title} `} {links.website.url} - - - {`${labels.version.title} `} + + {require('../../package.json').version} - + ) } diff --git a/components/settings/data-management/index.js b/components/settings/data-management/index.js index 4199760..04d4628 100644 --- a/components/settings/data-management/index.js +++ b/components/settings/data-management/index.js @@ -26,7 +26,7 @@ const DataManagement = () => { {labels.deleteSegment.explainer} diff --git a/components/settings/settings-segment.js b/components/settings/settings-segment.js index 0a87719..f29f7c5 100644 --- a/components/settings/settings-segment.js +++ b/components/settings/settings-segment.js @@ -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 ( - + {props.title} {children} From dace057b3c0cfbb6b2e10018802415bb9623f4e2 Mon Sep 17 00:00:00 2001 From: Julia Friesel Date: Tue, 8 Jan 2019 09:02:05 +0100 Subject: [PATCH 10/10] Remove unused import --- components/settings/data-management/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/components/settings/data-management/index.js b/components/settings/data-management/index.js index 04d4628..93887b8 100644 --- a/components/settings/data-management/index.js +++ b/components/settings/data-management/index.js @@ -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 (