About.js 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /**
  2. * 关于页面
  3. * @邠心vbe on 2021/4/7
  4. */
  5. import React from 'react';
  6. import { View, Text, Image, StyleSheet } from 'react-native';
  7. import app from '../../app.json';
  8. const author = 2022;
  9. export default About = () => {
  10. return (
  11. <View style={styles.container}>
  12. <Image
  13. style={styles.logo}
  14. resizeMode='contain'
  15. source={require('../images/about-logo.png')}/>
  16. {/* <Text style={styles.appName}>{app.displayName}</Text> */}
  17. <Text style={styles.versionName}>{app.versionName}</Text>
  18. <Text style={styles.copyright}>{'Copyright ' + /*app.versionName + ' Build ' + app.versionCode + */getYearRange()+' Strides Pte. Ltd.'}</Text>
  19. </View>
  20. );
  21. }
  22. const getYearRange = () => {
  23. const y = new Date().getFullYear();
  24. var r = '©' + author;
  25. if (y != author) {
  26. r += '-' + y
  27. }
  28. return r;
  29. }
  30. const styles = StyleSheet.create({
  31. container: {
  32. flex: 1,
  33. alignItems: 'center',
  34. backgroundColor: '#FFF'
  35. },
  36. logo: {
  37. width: 238,
  38. height: 75,
  39. marginTop: $vw(25)
  40. },
  41. appName: {
  42. color: '#000',
  43. fontSize: 20,
  44. paddingTop: 5,
  45. textAlign: 'center'
  46. },
  47. versionName: {
  48. color: '#999',
  49. fontSize: 11,
  50. paddingTop: 4,
  51. textAlign: 'center',
  52. },
  53. copyright: {
  54. left: 0,
  55. right: 0,
  56. bottom: 16,
  57. color: '#aaa',
  58. fontSize: 10,
  59. lineHeight: 14,
  60. textAlign: 'center',
  61. position: 'absolute',
  62. }
  63. })