Browse Source

Merge branch 'main' of https://github.com/IGSD-UoW/WPD-MobileApp into main

master
analuizaff 3 years ago
parent
commit
879f560386
  1. 24
      src/app/components/LoadingMarkersModal.js
  2. 46
      src/app/components/MapModal.js

24
src/app/components/LoadingMarkersModal.js

@ -1,10 +1,11 @@
import React from "react";
import React, { useState } from "react";
import { import {
Modal, Modal,
StyleSheet, StyleSheet,
Text, Text,
TouchableHighlight, TouchableHighlight,
View, View,
TouchableOpacity,
} from "react-native"; } from "react-native";
import { MaterialCommunityIcons } from "@expo/vector-icons"; import { MaterialCommunityIcons } from "@expo/vector-icons";
@ -12,10 +13,27 @@ import colors from "../config/colors";
import { dimensions, screen_height } from "../config/dimensions"; import { dimensions, screen_height } from "../config/dimensions";
export default function LoadingMarkersModal({ show }) { export default function LoadingMarkersModal({ show }) {
if (show) {
const [closed, setClosed] = useState(false);
if (show && !closed) {
return ( return (
// NOTE:
// 267 = (tabBar height = 49) + (data menu btn height = 48) + (this modal = 170/2) // 267 = (tabBar height = 49) + (data menu btn height = 48) + (this modal = 170/2)
<View style={[styles.container, { bottom: (screen_height - 267) / 2 }]}> <View style={[styles.container, { bottom: (screen_height - 267) / 2 }]}>
<View
style={{
justifyContent: "flex-start",
alignSelf: "flex-end",
}}
>
<TouchableOpacity onPress={() => setClosed(true)}>
<MaterialCommunityIcons
name="close"
size={20}
color={colors.primary}
alignItems="center"
/>
</TouchableOpacity>
</View>
<MaterialCommunityIcons <MaterialCommunityIcons
name="sync" name="sync"
size={48} size={48}
@ -37,7 +55,7 @@ const styles = StyleSheet.create({
position: "absolute", position: "absolute",
width: "80%", width: "80%",
height: 170, height: 170,
justifyContent: "center",
// justifyContent: "center",
alignSelf: "center", alignSelf: "center",
backgroundColor: colors.lightestGray, backgroundColor: colors.lightestGray,
borderColor: colors.primary, borderColor: colors.primary,

46
src/app/components/MapModal.js

@ -43,29 +43,29 @@ function topBar(props, setShowModal, setCurrentMarker) {
</View> </View>
<View style={{ flexDirection: "row", alignSelf: "flex-end" }}> <View style={{ flexDirection: "row", alignSelf: "flex-end" }}>
<TouchableOpacity
style={styles.topBarIcon}
onPress={() => notImplemented()}
>
<MaterialCommunityIcons
name="pencil"
size={20}
color={colors.white}
alignItems="center"
/>
</TouchableOpacity>
<TouchableOpacity
style={styles.topBarIcon}
onPress={() => notImplemented()}
>
<MaterialCommunityIcons
name="trash-can"
size={20}
color={colors.white}
alignItems="center"
/>
</TouchableOpacity>
{/* <TouchableOpacity */}
{/* style={styles.topBarIcon} */}
{/* onPress={() => notImplemented()} */}
{/* > */}
{/* <MaterialCommunityIcons */}
{/* name="pencil" */}
{/* size={20} */}
{/* color={colors.white} */}
{/* alignItems="center" */}
{/* /> */}
{/* </TouchableOpacity> */}
{/* <TouchableOpacity */}
{/* style={styles.topBarIcon} */}
{/* onPress={() => notImplemented()} */}
{/* > */}
{/* <MaterialCommunityIcons */}
{/* name="trash-can" */}
{/* size={20} */}
{/* color={colors.white} */}
{/* alignItems="center" */}
{/* /> */}
{/* </TouchableOpacity> */}
<TouchableOpacity <TouchableOpacity
style={styles.topBarIcon} style={styles.topBarIcon}

Loading…
Cancel
Save