diff --git a/app/assets/LICENSE.json b/app/assets/LICENSE.json new file mode 100644 index 0000000000..9a11c739bb --- /dev/null +++ b/app/assets/LICENSE.json @@ -0,0 +1,6 @@ +{ + "licenses": [{ + "name": "Private Kit", + "text": "MIT License\n\nCopyright (c) 2020 TripleBlind, Inc\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." + }, ] +} \ No newline at end of file diff --git a/app/views/Licenses.js b/app/views/Licenses.js index 3bb0545206..e28e994dce 100644 --- a/app/views/Licenses.js +++ b/app/views/Licenses.js @@ -4,15 +4,19 @@ import { StyleSheet, View, Text, + Platform, Image, Dimensions, TouchableOpacity, BackHandler, } from 'react-native'; +import { WebView } from 'react-native-webview'; +import packageJson from '../../package.json'; import colors from '../constants/colors'; import backArrow from './../assets/images/backArrow.png'; import languages from './../locales/languages'; +import licenses from './../assets/LICENSE.json'; const width = Dimensions.get('window').width; @@ -38,6 +42,24 @@ class LicensesScreen extends Component { BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress); } + getLicenses() { + var result = ''; + result += + ''; + result += ''; + + for (var i = 0; i < licenses.licenses.length; i++) { + var element = licenses.licenses[i]; + + result += '' + element.name + '

'; + result += element.text.replace(/\n/g, '
'); + result += '


'; + } + result += ''; + + return result; + } + render() { return ( @@ -51,10 +73,40 @@ class LicensesScreen extends Component { - - {/* This screen is a placeholder for complete license content, or a link */} - {languages.t('label.license_placeholder')} + + {languages.t('label.private_kit')} + + + Version: + {packageJson.version} + + + OS: + + {Platform.OS + ' v' + Platform.Version} + + + + + Screen Resolution: + + {' '} + {Math.trunc(Dimensions.get('screen').width) + + ' x ' + + Math.trunc(Dimensions.get('screen').height)} + + + + + + ); @@ -69,12 +121,6 @@ const styles = StyleSheet.create({ color: colors.PRIMARY_TEXT, backgroundColor: colors.WHITE, }, - subHeaderTitle: { - textAlign: 'center', - fontWeight: 'bold', - fontSize: 22, - padding: 5, - }, main: { flex: 1, flexDirection: 'column', @@ -84,6 +130,21 @@ const styles = StyleSheet.create({ width: '96%', alignSelf: 'center', }, + row: { + flex: 1, + flexDirection: 'row', + color: colors.PRIMARY_TEXT, + backgroundColor: colors.WHITE, + }, + valueName: { + fontSize: 20, + fontWeight: '800', + }, + value: { + fontSize: 20, + fontWeight: '200', + }, + buttonTouchable: { borderRadius: 12, backgroundColor: '#665eff', @@ -140,6 +201,7 @@ const styles = StyleSheet.create({ fontSize: 16, lineHeight: 24, marginTop: 12, + overflow: 'scroll', fontFamily: 'OpenSans-Regular', }, });