BlueWallet/screen/settings/about.js

137 lines
3.9 KiB
JavaScript
Raw Normal View History

2018-03-31 15:43:08 +02:00
import React, { Component } from 'react';
2018-07-18 00:43:23 +02:00
import { Constants } from 'expo';
2018-05-12 22:27:34 +02:00
import { ScrollView, Linking, Dimensions } from 'react-native';
2018-07-18 00:43:23 +02:00
import {
BlueTextCentered,
BlueLoading,
BlueSpacing20,
BlueButton,
SafeBlueArea,
BlueCard,
BlueText,
BlueNavigationStyle,
} from '../../BlueComponents';
2018-03-31 15:43:08 +02:00
import PropTypes from 'prop-types';
/** @type {AppStorage} */
let BlueApp = require('../../BlueApp');
2018-07-18 00:43:23 +02:00
const { width, height } = Dimensions.get('window');
2018-10-31 03:23:48 +01:00
const loc = require('../../loc/');
const pkg = require('../../package.json');
const appjson = require('../../app.json');
2018-03-31 15:43:08 +02:00
export default class About extends Component {
static navigationOptions = () => ({
...BlueNavigationStyle(),
title: loc.settings.about,
});
2018-03-31 15:43:08 +02:00
constructor(props) {
super(props);
this.state = {
isLoading: true,
};
}
async componentDidMount() {
this.setState({
isLoading: false,
});
}
render() {
if (this.state.isLoading) {
return <BlueLoading />;
}
return (
<SafeBlueArea forceInset={{ horizontal: 'always' }} style={{ flex: 1 }}>
<ScrollView>
<BlueCard>
2018-10-31 03:23:48 +01:00
<BlueText h4>BlueWallet is a free and open source Bitcoin wallet. Licensed MIT.</BlueText>
<BlueSpacing20 />
2018-05-12 22:27:34 +02:00
2018-03-31 15:43:08 +02:00
<BlueButton
2018-06-25 00:22:46 +02:00
icon={{
name: 'mark-github',
type: 'octicon',
color: BlueApp.settings.buttonTextColor,
}}
2018-03-31 15:43:08 +02:00
onPress={() => {
2018-10-03 15:17:30 +02:00
Linking.openURL('https://github.com/BlueWallet/BlueWallet');
2018-03-31 15:43:08 +02:00
}}
2018-10-03 15:17:30 +02:00
title="github.com/BlueWallet/BlueWallet"
2018-03-31 15:43:08 +02:00
/>
<BlueSpacing20 />
2018-03-31 15:43:08 +02:00
2018-06-12 14:50:14 +02:00
<BlueButton
2018-06-25 00:22:46 +02:00
icon={{
name: 'twitter',
type: 'font-awesome',
color: BlueApp.settings.buttonTextColor,
}}
2018-06-12 14:50:14 +02:00
onPress={() => {
Linking.openURL('https://twitter.com/bluewalletio');
}}
title="Follow us on Twitter"
/>
<BlueSpacing20 />
2018-06-12 14:50:14 +02:00
<BlueButton
2018-06-25 00:22:46 +02:00
icon={{
name: 'thumbsup',
type: 'octicon',
color: BlueApp.settings.buttonTextColor,
}}
2018-06-12 14:50:14 +02:00
onPress={() => {
Linking.openURL('https://itunes.apple.com/us/app/bluewallet-bitcoin-wallet/id1376878040?l=ru&ls=1&mt=8');
2018-06-12 14:50:14 +02:00
}}
title="Leave us a review on Appstore"
/>
2018-03-31 15:43:08 +02:00
<BlueSpacing20 />
<BlueText h3>Built with awesome:</BlueText>
<BlueSpacing20 />
<BlueText h4>* React Native</BlueText>
<BlueText h4>* Bitcoinjs-lib</BlueText>
<BlueText h4>* blockcypher.com API</BlueText>
<BlueText h4>* Nodejs</BlueText>
<BlueText h4>* Expo</BlueText>
<BlueText h4>* react-native-elements</BlueText>
<BlueText h4>* rn-nodeify</BlueText>
<BlueText h4>* bignumber.js</BlueText>
<BlueText h4>* https://github.com/StefanoBalocco/isaac.js</BlueText>
<BlueSpacing20 />
2018-03-31 15:43:08 +02:00
<BlueButton
onPress={() => {
this.props.navigation.navigate('Selftest');
}}
title="Run self test"
/>
2018-07-18 00:43:23 +02:00
<BlueTextCentered />
<BlueTextCentered>
w, h = {width}, {height}
</BlueTextCentered>
<BlueTextCentered>
{Constants.platform.ios.model} ({Constants.platform.ios.platform})
</BlueTextCentered>
2018-10-31 03:23:48 +01:00
<BlueSpacing20 />
<BlueTextCentered>
{pkg.name} v{pkg.version} (build {appjson.expo.ios.buildNumber})
</BlueTextCentered>
</BlueCard>
</ScrollView>
2018-03-31 15:43:08 +02:00
</SafeBlueArea>
);
}
}
About.propTypes = {
navigation: PropTypes.shape({
navigate: PropTypes.func,
goBack: PropTypes.func,
}),
};