Skip to content

Commit c9390bc

Browse files
committed
updating app
1 parent 4e05d1b commit c9390bc

File tree

15 files changed

+17524
-12372
lines changed

15 files changed

+17524
-12372
lines changed

app/app.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
"expo": {
33
"name": "xss_bomb",
44
"slug": "xss_bomb",
5-
"version": "1.0.0",
5+
"version": "1.0.1",
66
"orientation": "portrait",
77
"icon": "./assets/icon.png",
88
"splash": {
99
"image": "./assets/splash.png",
1010
"resizeMode": "contain",
11-
"backgroundColor": "#ffffff"
11+
"backgroundColor": "#000000"
1212
},
1313
"updates": {
1414
"fallbackToCacheTimeout": 0
@@ -23,6 +23,7 @@
2323
"favicon": "./assets/favicon.png"
2424
},
2525
"android": {
26+
"versionCode": 2,
2627
"package": "com.p4p1.xss_bomb",
2728
"googleServicesFile": "./google-services.json",
2829
"permissions":[

app/components/FavNotif.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ const styles = StyleSheet.create({
6767
marginTop: 10,
6868
},
6969
header_OTHER: {
70+
width: '25%',
7071
fontSize: 25,
7172
fontWeight: 'bold',
7273
color: 'purple',
@@ -75,6 +76,7 @@ const styles = StyleSheet.create({
7576
marginBottom: 15,
7677
},
7778
header_GET: {
79+
width: '25%',
7880
fontSize: 25,
7981
fontWeight: 'bold',
8082
color: 'green',
@@ -83,6 +85,7 @@ const styles = StyleSheet.create({
8385
marginBottom: 15,
8486
},
8587
header_DELETE: {
88+
width: '25%',
8689
fontSize: 25,
8790
fontWeight: 'bold',
8891
color: 'red',
@@ -91,6 +94,7 @@ const styles = StyleSheet.create({
9194
marginBottom: 15,
9295
},
9396
header_PUT: {
97+
width: '25%',
9498
fontSize: 25,
9599
fontWeight: 'bold',
96100
color: 'cyan',
@@ -99,6 +103,7 @@ const styles = StyleSheet.create({
99103
marginBottom: 15,
100104
},
101105
header_POST: {
106+
width: '25%',
102107
fontSize: 25,
103108
fontWeight: 'bold',
104109
color: 'yellow',

app/components/Inspect.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export default class Inspect extends React.Component
3535
<ScrollView style={{marginTop: 40}}>
3636
<View style={styles.title}>
3737
{method}
38+
</View>
39+
<View style={styles.title}>
3840
<Text style={styles.header}>{this.props.selected.link}</Text>
3941
</View>
4042
<Text style={styles.para_norm}>
@@ -107,6 +109,8 @@ const styles = StyleSheet.create({
107109
justifyContent: 'center',
108110
},
109111
header_OTHER: {
112+
width: '100%',
113+
textAlign: 'center',
110114
fontSize: 25,
111115
fontWeight: 'bold',
112116
color: 'purple',
@@ -115,6 +119,8 @@ const styles = StyleSheet.create({
115119
marginBottom: 15,
116120
},
117121
header_GET: {
122+
width: '100%',
123+
textAlign: 'center',
118124
fontSize: 25,
119125
fontWeight: 'bold',
120126
color: 'green',
@@ -123,6 +129,8 @@ const styles = StyleSheet.create({
123129
marginBottom: 15,
124130
},
125131
header_DELETE: {
132+
width: '100%',
133+
textAlign: 'center',
126134
fontSize: 25,
127135
fontWeight: 'bold',
128136
color: 'red',
@@ -131,6 +139,8 @@ const styles = StyleSheet.create({
131139
marginBottom: 15,
132140
},
133141
header_PUT: {
142+
width: '100%',
143+
textAlign: 'center',
134144
fontSize: 25,
135145
fontWeight: 'bold',
136146
color: 'cyan',
@@ -139,6 +149,8 @@ const styles = StyleSheet.create({
139149
marginBottom: 15,
140150
},
141151
header_POST: {
152+
width: '100%',
153+
textAlign: 'center',
142154
fontSize: 25,
143155
fontWeight: 'bold',
144156
color: 'yellow',

app/components/Notif.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ const styles = StyleSheet.create({
8888
marginBottom: 15,
8989
},
9090
header_OTHER: {
91+
width: '25%',
9192
fontSize: 25,
9293
fontWeight: 'bold',
9394
color: 'purple',
@@ -96,6 +97,7 @@ const styles = StyleSheet.create({
9697
marginBottom: 15,
9798
},
9899
header_GET: {
100+
width: '25%',
99101
fontSize: 25,
100102
fontWeight: 'bold',
101103
color: 'green',
@@ -104,6 +106,7 @@ const styles = StyleSheet.create({
104106
marginBottom: 15,
105107
},
106108
header_DELETE: {
109+
width: '25%',
107110
fontSize: 25,
108111
fontWeight: 'bold',
109112
color: 'red',
@@ -112,6 +115,7 @@ const styles = StyleSheet.create({
112115
marginBottom: 15,
113116
},
114117
header_PUT: {
118+
width: '25%',
115119
fontSize: 25,
116120
fontWeight: 'bold',
117121
color: 'cyan',
@@ -120,6 +124,7 @@ const styles = StyleSheet.create({
120124
marginBottom: 15,
121125
},
122126
header_POST: {
127+
width: '25%',
123128
fontSize: 25,
124129
fontWeight: 'bold',
125130
color: 'yellow',

app/navigation/BottomTabBar.js

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import React from 'react';
2+
import { TouchableOpacity, StyleSheet, View } from 'react-native';
3+
import PropTypes from 'prop-types';
4+
5+
import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
6+
import { faEdit, faBell, faUserCircle } from '@fortawesome/free-solid-svg-icons'
7+
8+
const iconSize = 25;
9+
10+
export default class BottomTabBar extends React.Component
11+
{
12+
constructor(props) {
13+
super(props);
14+
this.state = {
15+
selected: 0
16+
};
17+
18+
this.navigateNotifications = this.navigateNotifications.bind(this);
19+
this.navigateCode = this.navigateCode.bind(this);
20+
this.navigateProfile = this.navigateProfile.bind(this);
21+
}
22+
23+
navigateNotifications() {
24+
this.props.navigation.navigate('Notifications');
25+
this.setState({selected: 0});
26+
}
27+
navigateCode() {
28+
this.props.navigation.navigate('Code');
29+
this.setState({selected: 1});
30+
}
31+
navigateProfile() {
32+
this.props.navigation.navigate('Account');
33+
this.setState({selected: 2});
34+
}
35+
36+
render () {
37+
return (
38+
<View style={styles.container}>
39+
<View style={styles.button_container}>
40+
<TouchableOpacity onPress={this.navigateNotifications} style={(this.state.selected == 0) ? styles.btn_container_selected : styles.btn_container}>
41+
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faBell }/>
42+
</TouchableOpacity>
43+
<TouchableOpacity onPress={this.navigateCode} style={(this.state.selected == 1) ? styles.btn_container_selected : styles.btn_container}>
44+
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faEdit }/>
45+
</TouchableOpacity>
46+
<TouchableOpacity onPress={this.navigateProfile} style={(this.state.selected == 2) ? styles.btn_container_selected : styles.btn_container}>
47+
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faUserCircle }/>
48+
</TouchableOpacity>
49+
</View>
50+
</View>
51+
);
52+
}
53+
}
54+
BottomTabBar.propTypes = {
55+
navigation: PropTypes.object,
56+
};
57+
58+
const styles = StyleSheet.create({
59+
container: {
60+
height: '10%',
61+
width: '100%',
62+
justifyContent: 'space-around',
63+
flexDirection: 'row',
64+
backgroundColor: '#444333',
65+
},
66+
button_container: {
67+
backgroundColor: '#000',
68+
width: '50%',
69+
height: '70%',
70+
justifyContent: 'space-around',
71+
alignItems: 'center',
72+
flexDirection: 'row',
73+
borderRadius: 20,
74+
},
75+
text: {
76+
fontFamily: 'Roboto',
77+
fontWeight: "200",
78+
fontSize: 10,
79+
color: '#fff',
80+
},
81+
icons: {
82+
color: "#24FF1F",
83+
},
84+
btn_container: {
85+
justifyContent: 'center',
86+
alignItems: 'center',
87+
paddingTop: 5,
88+
paddingBottom: 5,
89+
paddingRight: 5,
90+
paddingLeft: 5,
91+
},
92+
btn_container_selected: {
93+
justifyContent: 'center',
94+
alignItems: 'center',
95+
backgroundColor: "#555555",
96+
paddingTop: 5,
97+
paddingBottom: 5,
98+
paddingRight: 5,
99+
paddingLeft: 5,
100+
borderRadius: 15,
101+
}
102+
});

app/navigation/MainNavigator.js

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
import React from 'react';
2-
import { createDrawerNavigator } from '@react-navigation/drawer';
2+
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
33
import PropTypes from 'prop-types';
44

5+
import BottomTabBar from './BottomTabBar.js';
6+
7+
58
import EditUserNavigation from './EditUserNavigation.js';
6-
import FavoritesScreen from '../screens/FavoritesScreen.js';
9+
import NotifNavigator from './NotifNavigator.js';
710
import CodeScreen from '../screens/CodeScreen.js';
8-
import NotificationScreen from '../screens/NotificationScreen.js';
911
import HelpScreen from '../screens/HelpScreen.js';
1012

11-
const Drawer = createDrawerNavigator();
13+
const Tab = createBottomTabNavigator();
1214

1315
export default class MainNavigator extends React.Component
1416
{
@@ -18,33 +20,25 @@ export default class MainNavigator extends React.Component
1820

1921
render() {
2022
return (
21-
<Drawer.Navigator initialRouteName="Notifications" drawerContentOptions={{
22-
activeTintColor:'#24FF1F',
23-
inactiveTintColor:'#fff',
24-
}} drawerStyle={{
25-
backgroundColor: '#222222',
26-
}}>
27-
<Drawer.Screen name="Notifications">
28-
{props => <NotificationScreen {...props} logout={() => this.props.logout()}
29-
token={this.props.token} url={this.props.url} />}
30-
</Drawer.Screen>
31-
<Drawer.Screen name="Favorites">
32-
{props => <FavoritesScreen {...props} logout={() => this.props.logout()}
23+
<Tab.Navigator initialRouteName="Notifications"
24+
tabBar={(props) => <BottomTabBar {...props} />}>
25+
<Tab.Screen name="Notifications">
26+
{props => <NotifNavigator{...props} logout={() => this.props.logout()}
3327
token={this.props.token} url={this.props.url} />}
34-
</Drawer.Screen>
35-
<Drawer.Screen name="Code">
28+
</Tab.Screen>
29+
<Tab.Screen name="Code">
3630
{props => <CodeScreen {...props} logout={() => this.props.logout()}
3731
token={this.props.token} url={this.props.url} />}
38-
</Drawer.Screen>
39-
<Drawer.Screen name="Account">
32+
</Tab.Screen>
33+
<Tab.Screen name="Account">
4034
{props => <EditUserNavigation {...props} logout={() => this.props.logout()}
4135
token={this.props.token} url={this.props.url} />}
42-
</Drawer.Screen>
43-
<Drawer.Screen name="Help">
36+
</Tab.Screen>
37+
<Tab.Screen name="Help">
4438
{props => <HelpScreen {...props} logout={() => this.props.logout()}
4539
token={this.props.token} url={this.props.url} />}
46-
</Drawer.Screen>
47-
</Drawer.Navigator>
40+
</Tab.Screen>
41+
</Tab.Navigator>
4842
);
4943
}
5044
}

app/navigation/NotifNavigator.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import React from 'react';
2+
import PropTypes from 'prop-types';
3+
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
4+
5+
6+
import TopTabBar from './TopTabBar.js';
7+
8+
import FavoritesScreen from '../screens/Notifications/FavoritesScreen.js';
9+
import NotificationScreen from '../screens/Notifications/NotificationScreen.js';
10+
11+
const Tab = createMaterialTopTabNavigator();
12+
13+
export default class NotifNavigator extends React.Component
14+
{
15+
constructor(props) {
16+
super(props);
17+
}
18+
19+
render() {
20+
return (
21+
<Tab.Navigator initialRouteName="Main" swipeEnabled={false} screenOptions={{swipeEnabled: false}}
22+
tabBar={(props) => <TopTabBar {...props} />}>
23+
<Tab.Screen name="Main">
24+
{props => <NotificationScreen {...props} logout={() => this.props.logout()}
25+
token={this.props.token} url={this.props.url} />}
26+
</Tab.Screen>
27+
<Tab.Screen name="Favorites">
28+
{props => <FavoritesScreen {...props} logout={() => this.props.logout()}
29+
token={this.props.token} url={this.props.url} />}
30+
</Tab.Screen>
31+
</Tab.Navigator>
32+
);
33+
}
34+
}
35+
36+
NotifNavigator.propTypes = {
37+
url: PropTypes.String,
38+
token: PropTypes.string,
39+
logout: PropTypes.function,
40+
}

0 commit comments

Comments
 (0)