Michael Terrefortes Rosado 2 vuotta sitten
commit
47ebccf7d8
16 muutettua tiedostoa jossa 28123 lisäystä ja 0 poistoa
  1. 14
    0
      .gitignore
  2. 8
    0
      App.js
  3. 27
    0
      Navigation.js
  4. 33
    0
      app.json
  5. BIN
      assets/adaptive-icon.png
  6. BIN
      assets/favicon.png
  7. BIN
      assets/icon.png
  8. BIN
      assets/splash.png
  9. 6
    0
      babel.config.js
  10. 21144
    0
      package-lock.json
  11. 27
    0
      package.json
  12. 19
    0
      screens/Analisis.js
  13. 20
    0
      screens/Denuncias.js
  14. 66
    0
      screens/Derechos.js
  15. 12
    0
      screens/leyes.json
  16. 6747
    0
      yarn.lock

+ 14
- 0
.gitignore Näytä tiedosto

@@ -0,0 +1,14 @@
1
+node_modules/
2
+.expo/
3
+dist/
4
+npm-debug.*
5
+*.jks
6
+*.p8
7
+*.p12
8
+*.key
9
+*.mobileprovision
10
+*.orig.*
11
+web-build/
12
+
13
+# macOS
14
+.DS_Store

+ 8
- 0
App.js Näytä tiedosto

@@ -0,0 +1,8 @@
1
+import React from 'react';
2
+import Navigation from './Navigation';
3
+
4
+export default function App() {
5
+  return (
6
+    <Navigation />
7
+  );
8
+}

+ 27
- 0
Navigation.js Näytä tiedosto

@@ -0,0 +1,27 @@
1
+import React from "react";
2
+import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
3
+import { NavigationContainer } from "@react-navigation/native";
4
+
5
+import Denuncias from "./screens/Denuncias";
6
+import Derechos from "./screens/Derechos";
7
+import Analisis from "./screens/Analisis";
8
+
9
+const Tab = createBottomTabNavigator();
10
+
11
+function Tabs() {
12
+    return (
13
+        <Tab.Navigator>
14
+            <Tab.Screen name="Denuncias" component={Denuncias} />
15
+            <Tab.Screen name="Derechos" component={Derechos} />
16
+            <Tab.Screen name="Analisis" component={Analisis} />
17
+        </Tab.Navigator>
18
+    );
19
+}
20
+
21
+export default function Navigation(){
22
+    return (
23
+        <NavigationContainer>
24
+            <Tabs />
25
+        </NavigationContainer>
26
+    );
27
+}

+ 33
- 0
app.json Näytä tiedosto

@@ -0,0 +1,33 @@
1
+{
2
+  "expo": {
3
+    "name": "Aco",
4
+    "slug": "Aco",
5
+    "version": "1.0.0",
6
+    "orientation": "portrait",
7
+    "icon": "./assets/icon.png",
8
+    "userInterfaceStyle": "light",
9
+    "splash": {
10
+      "image": "./assets/splash.png",
11
+      "resizeMode": "contain",
12
+      "backgroundColor": "#ffffff"
13
+    },
14
+    "updates": {
15
+      "fallbackToCacheTimeout": 0
16
+    },
17
+    "assetBundlePatterns": [
18
+      "**/*"
19
+    ],
20
+    "ios": {
21
+      "supportsTablet": true
22
+    },
23
+    "android": {
24
+      "adaptiveIcon": {
25
+        "foregroundImage": "./assets/adaptive-icon.png",
26
+        "backgroundColor": "#FFFFFF"
27
+      }
28
+    },
29
+    "web": {
30
+      "favicon": "./assets/favicon.png"
31
+    }
32
+  }
33
+}

BIN
assets/adaptive-icon.png Näytä tiedosto


BIN
assets/favicon.png Näytä tiedosto


BIN
assets/icon.png Näytä tiedosto


BIN
assets/splash.png Näytä tiedosto


+ 6
- 0
babel.config.js Näytä tiedosto

@@ -0,0 +1,6 @@
1
+module.exports = function(api) {
2
+  api.cache(true);
3
+  return {
4
+    presets: ['babel-preset-expo'],
5
+  };
6
+};

+ 21144
- 0
package-lock.json
File diff suppressed because it is too large
Näytä tiedosto


+ 27
- 0
package.json Näytä tiedosto

@@ -0,0 +1,27 @@
1
+{
2
+  "name": "aco",
3
+  "version": "1.0.0",
4
+  "main": "node_modules/expo/AppEntry.js",
5
+  "scripts": {
6
+    "start": "expo start",
7
+    "android": "expo start --android",
8
+    "ios": "expo start --ios",
9
+    "web": "expo start --web"
10
+  },
11
+  "dependencies": {
12
+    "@react-navigation/bottom-tabs": "^6.4.0",
13
+    "@react-navigation/native": "^6.0.13",
14
+    "@react-navigation/native-stack": "^6.9.1",
15
+    "expo": "~47.0.3",
16
+    "expo-status-bar": "~1.4.2",
17
+    "react": "18.1.0",
18
+    "react-native": "0.70.5",
19
+    "react-native-gesture-handler": "~2.8.0",
20
+    "react-native-safe-area-context": "4.4.1",
21
+    "react-native-screens": "~3.18.0"
22
+  },
23
+  "devDependencies": {
24
+    "@babel/core": "^7.12.9"
25
+  },
26
+  "private": true
27
+}

+ 19
- 0
screens/Analisis.js Näytä tiedosto

@@ -0,0 +1,19 @@
1
+import React from "react";
2
+import { View, Text, StyleSheet, TouchableOpacity} from "react-native";
3
+
4
+const Analisis = () => {
5
+    return (
6
+        <View>
7
+            <Text
8
+                style={{
9
+                    fontSize: 30,
10
+                    textAlign: "center",
11
+                    marginTop: "20%"
12
+                }}
13
+            
14
+            >Herramientas de analisis</Text>
15
+        </View>
16
+    )
17
+}
18
+
19
+export default Analisis

+ 20
- 0
screens/Denuncias.js Näytä tiedosto

@@ -0,0 +1,20 @@
1
+import React from "react";
2
+import { View, Text, StyleSheet, TouchableOpacity} from "react-native";
3
+
4
+const Denuncias = () => {
5
+    return (
6
+        <View>
7
+            <Text
8
+                style={{
9
+                    fontSize: 30,
10
+                    textAlign: "center",
11
+                    marginTop: "20%"
12
+                }}
13
+            
14
+            >Llenar formulario y 
15
+            listado de denuncias</Text>
16
+        </View>
17
+    )
18
+}
19
+
20
+export default Denuncias

+ 66
- 0
screens/Derechos.js Näytä tiedosto

@@ -0,0 +1,66 @@
1
+import React from "react";
2
+import { View, Text, StyleSheet, TouchableOpacity,  Linking, Button, Pressable} from "react-native";
3
+import { FlatList, TouchableHighlight } from "react-native-gesture-handler";
4
+import Leyes from "./leyes.json";
5
+
6
+
7
+
8
+const Derechos = () => {
9
+    return (
10
+
11
+        <><View>
12
+
13
+            <Text style={styles.container}>Leyes de la Tierra</Text>
14
+            <View>
15
+                {Leyes.map(ley => {
16
+                    return (
17
+                        <><Pressable style={styles.button}
18
+                        onPress={() => {
19
+                            Linking.openURL(ley.link.toString());
20
+                        }}></Pressable></>
21
+                    );
22
+                })}
23
+            </View>
24
+
25
+        </View>
26
+        
27
+        <View>
28
+                <Text style={styles.container}>Derechos del activista climatico</Text>
29
+            </View>
30
+            
31
+            
32
+            <View>
33
+                <Text style={styles.container}>Leyes de Puerto Rico</Text>
34
+
35
+            </View></>
36
+
37
+
38
+
39
+    );
40
+}
41
+
42
+const styles = StyleSheet.create({
43
+    container: {
44
+        fontSize: 25,
45
+        textAlign: "center",
46
+        marginTop: "10%"
47
+    },
48
+
49
+    laws: {
50
+        fontSize: 15,
51
+        textAlign: "center",
52
+        marginTop: "5%"
53
+    },
54
+    button: {
55
+        alignItems: 'center',
56
+        justifyContent: 'center',
57
+        paddingVertical: 12,
58
+        paddingHorizontal: 0.5,
59
+        borderRadius: 4,
60
+        elevation: 3,
61
+        backgroundColor: 'black',
62
+      }
63
+})
64
+
65
+export default Derechos
66
+

+ 12
- 0
screens/leyes.json Näytä tiedosto

@@ -0,0 +1,12 @@
1
+[
2
+    {
3
+        "id": 1,
4
+        "title": "Apple",
5
+        "link": "https://apple.com"
6
+    },
7
+    {
8
+        "id": 2,
9
+        "title": "Google",
10
+        "link": "https://google.com"
11
+    }
12
+]

+ 6747
- 0
yarn.lock
File diff suppressed because it is too large
Näytä tiedosto