Skip to content

Commit

Permalink
updating app
Browse files Browse the repository at this point in the history
  • Loading branch information
p4p1 committed Sep 19, 2021
1 parent 4e05d1b commit c9390bc
Show file tree
Hide file tree
Showing 15 changed files with 17,524 additions and 12,372 deletions.
5 changes: 3 additions & 2 deletions app/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"expo": {
"name": "xss_bomb",
"slug": "xss_bomb",
"version": "1.0.0",
"version": "1.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
"backgroundColor": "#000000"
},
"updates": {
"fallbackToCacheTimeout": 0
Expand All @@ -23,6 +23,7 @@
"favicon": "./assets/favicon.png"
},
"android": {
"versionCode": 2,
"package": "com.p4p1.xss_bomb",
"googleServicesFile": "./google-services.json",
"permissions":[
Expand Down
5 changes: 5 additions & 0 deletions app/components/FavNotif.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const styles = StyleSheet.create({
marginTop: 10,
},
header_OTHER: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'purple',
Expand All @@ -75,6 +76,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_GET: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'green',
Expand All @@ -83,6 +85,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_DELETE: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'red',
Expand All @@ -91,6 +94,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_PUT: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'cyan',
Expand All @@ -99,6 +103,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_POST: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'yellow',
Expand Down
12 changes: 12 additions & 0 deletions app/components/Inspect.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export default class Inspect extends React.Component
<ScrollView style={{marginTop: 40}}>
<View style={styles.title}>
{method}
</View>
<View style={styles.title}>
<Text style={styles.header}>{this.props.selected.link}</Text>
</View>
<Text style={styles.para_norm}>
Expand Down Expand Up @@ -107,6 +109,8 @@ const styles = StyleSheet.create({
justifyContent: 'center',
},
header_OTHER: {
width: '100%',
textAlign: 'center',
fontSize: 25,
fontWeight: 'bold',
color: 'purple',
Expand All @@ -115,6 +119,8 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_GET: {
width: '100%',
textAlign: 'center',
fontSize: 25,
fontWeight: 'bold',
color: 'green',
Expand All @@ -123,6 +129,8 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_DELETE: {
width: '100%',
textAlign: 'center',
fontSize: 25,
fontWeight: 'bold',
color: 'red',
Expand All @@ -131,6 +139,8 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_PUT: {
width: '100%',
textAlign: 'center',
fontSize: 25,
fontWeight: 'bold',
color: 'cyan',
Expand All @@ -139,6 +149,8 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_POST: {
width: '100%',
textAlign: 'center',
fontSize: 25,
fontWeight: 'bold',
color: 'yellow',
Expand Down
5 changes: 5 additions & 0 deletions app/components/Notif.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_OTHER: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'purple',
Expand All @@ -96,6 +97,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_GET: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'green',
Expand All @@ -104,6 +106,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_DELETE: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'red',
Expand All @@ -112,6 +115,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_PUT: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'cyan',
Expand All @@ -120,6 +124,7 @@ const styles = StyleSheet.create({
marginBottom: 15,
},
header_POST: {
width: '25%',
fontSize: 25,
fontWeight: 'bold',
color: 'yellow',
Expand Down
102 changes: 102 additions & 0 deletions app/navigation/BottomTabBar.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
import React from 'react';
import { TouchableOpacity, StyleSheet, View } from 'react-native';
import PropTypes from 'prop-types';

import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';
import { faEdit, faBell, faUserCircle } from '@fortawesome/free-solid-svg-icons'

const iconSize = 25;

export default class BottomTabBar extends React.Component
{
constructor(props) {
super(props);
this.state = {
selected: 0
};

this.navigateNotifications = this.navigateNotifications.bind(this);
this.navigateCode = this.navigateCode.bind(this);
this.navigateProfile = this.navigateProfile.bind(this);
}

navigateNotifications() {
this.props.navigation.navigate('Notifications');
this.setState({selected: 0});
}
navigateCode() {
this.props.navigation.navigate('Code');
this.setState({selected: 1});
}
navigateProfile() {
this.props.navigation.navigate('Account');
this.setState({selected: 2});
}

render () {
return (
<View style={styles.container}>
<View style={styles.button_container}>
<TouchableOpacity onPress={this.navigateNotifications} style={(this.state.selected == 0) ? styles.btn_container_selected : styles.btn_container}>
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faBell }/>
</TouchableOpacity>
<TouchableOpacity onPress={this.navigateCode} style={(this.state.selected == 1) ? styles.btn_container_selected : styles.btn_container}>
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faEdit }/>
</TouchableOpacity>
<TouchableOpacity onPress={this.navigateProfile} style={(this.state.selected == 2) ? styles.btn_container_selected : styles.btn_container}>
<FontAwesomeIcon size={iconSize} style={styles.icons} icon={ faUserCircle }/>
</TouchableOpacity>
</View>
</View>
);
}
}
BottomTabBar.propTypes = {
navigation: PropTypes.object,
};

const styles = StyleSheet.create({
container: {
height: '10%',
width: '100%',
justifyContent: 'space-around',
flexDirection: 'row',
backgroundColor: '#444333',
},
button_container: {
backgroundColor: '#000',
width: '50%',
height: '70%',
justifyContent: 'space-around',
alignItems: 'center',
flexDirection: 'row',
borderRadius: 20,
},
text: {
fontFamily: 'Roboto',
fontWeight: "200",
fontSize: 10,
color: '#fff',
},
icons: {
color: "#24FF1F",
},
btn_container: {
justifyContent: 'center',
alignItems: 'center',
paddingTop: 5,
paddingBottom: 5,
paddingRight: 5,
paddingLeft: 5,
},
btn_container_selected: {
justifyContent: 'center',
alignItems: 'center',
backgroundColor: "#555555",
paddingTop: 5,
paddingBottom: 5,
paddingRight: 5,
paddingLeft: 5,
borderRadius: 15,
}
});
42 changes: 18 additions & 24 deletions app/navigation/MainNavigator.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import React from 'react';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import PropTypes from 'prop-types';

import BottomTabBar from './BottomTabBar.js';


import EditUserNavigation from './EditUserNavigation.js';
import FavoritesScreen from '../screens/FavoritesScreen.js';
import NotifNavigator from './NotifNavigator.js';
import CodeScreen from '../screens/CodeScreen.js';
import NotificationScreen from '../screens/NotificationScreen.js';
import HelpScreen from '../screens/HelpScreen.js';

const Drawer = createDrawerNavigator();
const Tab = createBottomTabNavigator();

export default class MainNavigator extends React.Component
{
Expand All @@ -18,33 +20,25 @@ export default class MainNavigator extends React.Component

render() {
return (
<Drawer.Navigator initialRouteName="Notifications" drawerContentOptions={{
activeTintColor:'#24FF1F',
inactiveTintColor:'#fff',
}} drawerStyle={{
backgroundColor: '#222222',
}}>
<Drawer.Screen name="Notifications">
{props => <NotificationScreen {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Drawer.Screen>
<Drawer.Screen name="Favorites">
{props => <FavoritesScreen {...props} logout={() => this.props.logout()}
<Tab.Navigator initialRouteName="Notifications"
tabBar={(props) => <BottomTabBar {...props} />}>
<Tab.Screen name="Notifications">
{props => <NotifNavigator{...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Drawer.Screen>
<Drawer.Screen name="Code">
</Tab.Screen>
<Tab.Screen name="Code">
{props => <CodeScreen {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Drawer.Screen>
<Drawer.Screen name="Account">
</Tab.Screen>
<Tab.Screen name="Account">
{props => <EditUserNavigation {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Drawer.Screen>
<Drawer.Screen name="Help">
</Tab.Screen>
<Tab.Screen name="Help">
{props => <HelpScreen {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Drawer.Screen>
</Drawer.Navigator>
</Tab.Screen>
</Tab.Navigator>
);
}
}
Expand Down
40 changes: 40 additions & 0 deletions app/navigation/NotifNavigator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import React from 'react';
import PropTypes from 'prop-types';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';


import TopTabBar from './TopTabBar.js';

import FavoritesScreen from '../screens/Notifications/FavoritesScreen.js';
import NotificationScreen from '../screens/Notifications/NotificationScreen.js';

const Tab = createMaterialTopTabNavigator();

export default class NotifNavigator extends React.Component
{
constructor(props) {
super(props);
}

render() {
return (
<Tab.Navigator initialRouteName="Main" swipeEnabled={false} screenOptions={{swipeEnabled: false}}
tabBar={(props) => <TopTabBar {...props} />}>
<Tab.Screen name="Main">
{props => <NotificationScreen {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Tab.Screen>
<Tab.Screen name="Favorites">
{props => <FavoritesScreen {...props} logout={() => this.props.logout()}
token={this.props.token} url={this.props.url} />}
</Tab.Screen>
</Tab.Navigator>
);
}
}

NotifNavigator.propTypes = {
url: PropTypes.String,
token: PropTypes.string,
logout: PropTypes.function,
}
Loading

0 comments on commit c9390bc

Please sign in to comment.