| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- /**
- * 关于页面
- * @邠心vbe on 2021/4/7
- */
- import React from 'react';
- import { View, Text, Image, StyleSheet } from 'react-native';
- import app from '../../app.json';
- const author = 2021;
- export default About = () => {
- return (
- <View style={styles.container}>
- <Image
- style={styles.logo}
- source={require('../images/about-logo.png')}/>
- <Text style={styles.appName}>{app.displayName}</Text>
- <Text style={styles.versionName}>{app.versionName}</Text>
- <Text style={styles.copyright}>{/*app.versionName + ' Build ' + app.versionCode + */getYearRange()+' EV Charging Technology Pte. Ltd.'}</Text>
- </View>
- );
- }
- const getYearRange = () => {
- const y = new Date().getFullYear();
- var r = '©' + author;
- if (y != author) {
- r += '-' + y
- }
- return r;
- }
- const styles = StyleSheet.create({
- container: {
- flex: 1,
- alignItems: 'center',
- backgroundColor: '#FFF'
- },
- logo: {
- width: 96,
- height: 96,
- marginTop: $vw(25)
- },
- appName: {
- color: '#000',
- fontSize: 20,
- paddingTop: 5,
- textAlign: 'center'
- },
- versionName: {
- color: '#999',
- fontSize: 11,
- paddingTop: 4,
- textAlign: 'center',
- },
- copyright: {
- left: 0,
- right: 0,
- bottom: 16,
- color: '#aaa',
- fontSize: 10,
- lineHeight: 14,
- textAlign: 'center',
- position: 'absolute',
- }
- })
|