From e7b44ddc0a8086734cce8117fd3ec2b0e7f2fd96 Mon Sep 17 00:00:00 2001 From: Abby Wheelis Date: Thu, 28 Dec 2023 12:24:26 -0700 Subject: [PATCH] fix privacy links updated the links with the way @JGreenlee and Nitish found when updating the accessibility In the dev app, all of the links work updated the TSDC link because the previous one did not seem to still be working, when I type it into a search bar I get redirected to the link I updated to --- www/js/onboarding/PrivacyPolicy.tsx | 135 +++++++++++++++------------- 1 file changed, 73 insertions(+), 62 deletions(-) diff --git a/www/js/onboarding/PrivacyPolicy.tsx b/www/js/onboarding/PrivacyPolicy.tsx index bfd884cac..8287595c9 100644 --- a/www/js/onboarding/PrivacyPolicy.tsx +++ b/www/js/onboarding/PrivacyPolicy.tsx @@ -3,10 +3,12 @@ import { StyleSheet, Text } from 'react-native'; import { useTranslation } from 'react-i18next'; import useAppConfig from '../useAppConfig'; import { getTemplateText } from './StudySummary'; +import { useTheme } from 'react-native-paper'; const PrivacyPolicy = () => { const { t, i18n } = useTranslation(); const appConfig = useAppConfig(); + const { colors } = useTheme(); let opCodeText; if (appConfig?.opcode?.autogen) { @@ -66,34 +68,44 @@ const PrivacyPolicy = () => { {'\n'} {t('consent-text.what.demographics')} {'\n'} - {t('consent-text.what.on-nrel-site')} - {/* Linking is broken, look into enabling after migration - - {t('consent-text.what.open-source-data')} - { - Linking.openURL('https://github.com/e-mission/e-mission-data-collection.git'); - }}> - {' '}https://github.com/e-mission/e-mission-data-collection.git{' '} - - {t('consent-text.what.open-source-analysis')} - { - Linking.openURL('https://github.com/e-mission/e-mission-server.git'); - }}> - {' '}https://github.com/e-mission/e-mission-server.git{' '} - - {t('consent-text.what.open-source-dashboard')} - { - Linking.openURL('https://github.com/e-mission/em-public-dashboard.git'); - }}> - {' '}https://github.com/e-mission/em-public-dashboard.git{' '} - - */} + + {t('consent-text.what.open-source-data')} + { + window['cordova'].InAppBrowser.open( + 'https://github.com/e-mission/e-mission-data-collection.git', + '_system', + ); + }}> + {' '} + https://github.com/e-mission/e-mission-data-collection.git{' '} + + {t('consent-text.what.open-source-analysis')} + { + window['cordova'].InAppBrowser.open( + 'https://github.com/e-mission/e-mission-server.git', + '_system', + ); + }}> + {' '} + https://github.com/e-mission/e-mission-server.git{' '} + + {t('consent-text.what.open-source-dashboard')} + { + window['cordova'].InAppBrowser.open( + 'https://github.com/e-mission/em-public-dashboard.git', + '_system', + ); + }}> + {' '} + https://github.com/e-mission/em-public-dashboard.git.{' '} + + {'\n'} {t('consent-text.opcode.header')} @@ -115,31 +127,38 @@ const PrivacyPolicy = () => { {'\n'} {t('consent-text.who-sees.TSDC-info')} - {/* Linking is broken, look into enabling after migration - { - Linking.openURL('https://nrel.gov/tsdc'); - }}> - {t('consent-text.who-sees.on-website')} - - {t('consent-text.who-sees.and-in')} - { - Linking.openURL('https://www.sciencedirect.com/science/article/pii/S2352146515002999'); - }}> - {t('consent-text.who-sees.this-pub')} - - {t('consent-text.who-sees.and')} - { - Linking.openURL('https://www.nrel.gov/docs/fy18osti/70723.pdf'); - }}> - {t('consent-text.who-sees.fact-sheet')} - */} - {t('consent-text.who-sees.on-nrel-site')} + { + window['cordova'].InAppBrowser.open( + 'https://www.nrel.gov/transportation/secure-transportation-data/', + '_system', + ); + }}> + {t('consent-text.who-sees.on-website')} + + {t('consent-text.who-sees.and-in')} + { + window['cordova'].InAppBrowser.open( + 'https://www.sciencedirect.com/science/article/pii/S2352146515002999', + '_system', + ); + }}> + {t('consent-text.who-sees.this-pub')} + + {t('consent-text.who-sees.and')} + { + window['cordova'].InAppBrowser.open( + 'https://www.nrel.gov/docs/fy18osti/70723.pdf', + '_system', + ); + }}> + {t('consent-text.who-sees.fact-sheet') + '.'} + {'\n'} @@ -148,15 +167,7 @@ const PrivacyPolicy = () => { {'\n'} {t('consent-text.rights.destroy-data-pt1')} - {/* Linking is broken, look into enabling after migration - { - Linking.openURL("mailto:k.shankari@nrel.gov"); - }}> - k.shankari@nrel.gov - */} - (k.shankari@nrel.gov) + {'(k.shankari@nrel.gov)'} {t('consent-text.rights.destroy-data-pt2')} {'\n'}