parent
262f0c1ed0
commit
a35a693451
8 changed files with 139 additions and 2 deletions
@ -0,0 +1,64 @@ |
|||||||
|
import React, {Component} from 'react'; |
||||||
|
import {ScrollView, View} from 'react-native'; |
||||||
|
|
||||||
|
import MyText from './mytext.js'; |
||||||
|
import MyLink from './mylink.js'; |
||||||
|
import Section from './section.js'; |
||||||
|
|
||||||
|
export default class About extends Component { |
||||||
|
constructor(props) { |
||||||
|
super(props); |
||||||
|
} |
||||||
|
|
||||||
|
render() { |
||||||
|
return ( |
||||||
|
<ScrollView> |
||||||
|
<View style={{padding: 20}}> |
||||||
|
<Section> |
||||||
|
<MyText style={{textAlign: 'center'}}> |
||||||
|
Exact Resistor Calculator v1.0.0 |
||||||
|
</MyText> |
||||||
|
<MyText style={{textAlign: 'center'}}> |
||||||
|
© 2017 Tanner Collin |
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
<Section> |
||||||
|
<MyText> |
||||||
|
This app was written by <MyLink url="http://tannercollin.com">Tanner Collin</MyLink> and based off a spreadsheet he created in university to help him finish electronics labs faster. |
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
<Section> |
||||||
|
<MyText> |
||||||
|
This app is free and open-source software licensed under the MIT License. |
||||||
|
</MyText> |
||||||
|
<MyText> |
||||||
|
That means you have the right to study, change, and distribute the software and source code to anyone and for any purpose. |
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
<Section> |
||||||
|
<MyText> |
||||||
|
You can find the source code and report bugs here: |
||||||
|
</MyText> |
||||||
|
<MyText> |
||||||
|
<MyLink url="https://github.com/tannercollin/exact-resistor-calculator">https://github.com/tannercollin/exact-resistor-calculator</MyLink>
|
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
<Section> |
||||||
|
<MyText> |
||||||
|
Instead of donating to me, please give to the Electronic Frontier Foundation. |
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
<Section> |
||||||
|
<MyText> |
||||||
|
Thanks to all the devs behind Node.js, React, React Native, and Redux. |
||||||
|
</MyText> |
||||||
|
<MyText> |
||||||
|
Thanks to Jakub Jankiewicz for the circuit image. It and my derivatives are licensed CC BY-SA. |
||||||
|
</MyText> |
||||||
|
</Section> |
||||||
|
</View> |
||||||
|
</ScrollView> |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
@ -0,0 +1,40 @@ |
|||||||
|
import React, {Component} from 'react'; |
||||||
|
import {Linking, Text} from 'react-native'; |
||||||
|
|
||||||
|
const styles = { |
||||||
|
mylink: { |
||||||
|
color: 'cornflowerblue', |
||||||
|
textDecorationLine: 'underline', |
||||||
|
}, |
||||||
|
}; |
||||||
|
|
||||||
|
export default class MyLink extends Component { |
||||||
|
constructor(props) { |
||||||
|
super(props); |
||||||
|
} |
||||||
|
|
||||||
|
handleClick = () => { |
||||||
|
Linking.canOpenURL(this.props.url).then(supported => { |
||||||
|
if (supported) { |
||||||
|
Linking.openURL(this.props.url); |
||||||
|
} else { |
||||||
|
console.log('Don\'t know how to open URI: ' + this.props.url); |
||||||
|
} |
||||||
|
}); |
||||||
|
}; |
||||||
|
|
||||||
|
render() { |
||||||
|
return ( |
||||||
|
<Text |
||||||
|
{...this.props} |
||||||
|
style={[styles.mylink, this.props.style]} |
||||||
|
onPress={this.handleClick} |
||||||
|
> |
||||||
|
{this.props.children} |
||||||
|
</Text> |
||||||
|
); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
|
@ -0,0 +1,16 @@ |
|||||||
|
'use strict'; |
||||||
|
|
||||||
|
import React, {Component} from 'react'; |
||||||
|
import About from '../components/about'; |
||||||
|
|
||||||
|
export default class AboutApp extends Component { |
||||||
|
constructor(props) { |
||||||
|
super(props); |
||||||
|
} |
||||||
|
|
||||||
|
render() { |
||||||
|
return ( |
||||||
|
<About /> |
||||||
|
); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue