11import React from 'react' ;
2- import { Text , StyleSheet , Image , View , ScrollView } from 'react-native' ;
2+ import { Text , Linking , Button , StyleSheet , Image , View , ScrollView } from 'react-native' ;
33import PropTypes from 'prop-types' ;
44
55import SplashScreen from './SplashScreen' ;
66
77const logo = '../assets/icon.png' ;
8+ const githubURL = "https://github.com/p4p1/xss_bomb" ;
9+ const wikiURL = "https://github.com/p4p1/xss_bomb/wiki" ;
10+ const trelloURL = "https://github.com/p4p1/xss_bomb/projects" ;
11+ const meURL = "https://leosmith.xyz" ;
812
913export default class HelpScreen extends React . Component
1014{
@@ -13,6 +17,18 @@ export default class HelpScreen extends React.Component
1317 this . state = {
1418 api_id : undefined ,
1519 } ;
20+
21+ this . openURL = this . openURL . bind ( this ) ;
22+ }
23+
24+ async openURL ( url ) {
25+ const supported = await Linking . canOpenURL ( url )
26+
27+ if ( supported ) {
28+ await Linking . openURL ( url ) ;
29+ } else {
30+ alert ( "This link is not supported by your device" ) ;
31+ }
1632 }
1733
1834 componentDidMount ( ) {
@@ -55,21 +71,39 @@ export default class HelpScreen extends React.Component
5571 receives a request it will send you a notification and you will be able to
5672 inspect it on your mobile device.
5773 </ Text >
74+ < Button title = { "Open wiki" } onPress = { ( ) => this . openURL ( wikiURL ) } />
75+ < View style = { styles . padding } > </ View >
5876 < Text style = { styles . header } > Who built this?</ Text >
5977 < Text style = { styles . para } >
6078 This app was built by me (p4p1) over on github and is provided for free
6179 there if you wish to support me this app will probably be on the store for
6280 $2 ish.
6381 </ Text >
82+ < Button title = { "About author" } onPress = { ( ) => this . openURL ( meURL ) } />
83+ < View style = { styles . padding } > </ View >
6484 < Text style = { styles . header } > Is this open source?</ Text >
6585 < Text style = { styles . para } >
6686 Yes this app is open source and you can contribute over on github.
6787 </ Text >
88+ < Button title = { "View on github" } onPress = { ( ) => this . openURL ( githubURL ) } />
89+ < View style = { styles . padding } > </ View >
6890 < Text style = { styles . header } > Can I host my own instance?</ Text >
6991 < Text style = { styles . para } >
7092 Yes you can host your own instance of this app and it's backend there
7193 is a tutorial on the official wiki of the app over on github.
7294 </ Text >
95+ < Text style = { styles . header } > Updates?</ Text >
96+ < Text style = { styles . para } >
97+ All of the updates are first pushed on github then the rest. If you wish
98+ to see how this app is evolving you can view the project page.
99+ </ Text >
100+ < Button title = { "Open project logs" } onPress = { ( ) => this . openURL ( trelloURL ) } />
101+ < View style = { styles . padding } > </ View >
102+ < Text style = { styles . header } > Bugs or an idea?</ Text >
103+ < Text style = { styles . para } >
104+ If you find a bug or you just have and idea for the app please open
105+ an issue on github so that I can fix it as soon as possible.
106+ </ Text >
73107 </ ScrollView >
74108 </ View >
75109 ) ;
@@ -120,5 +154,8 @@ const styles = StyleSheet.create({
120154 width : '100%' ,
121155 alignItems : 'center' ,
122156 justifyContent : 'center' ,
157+ } ,
158+ padding : {
159+ marginBottom : 20 ,
123160 }
124161} ) ;
0 commit comments