|
@@ -4,7 +4,7 @@ import { createStackNavigator, StackNavigationProp } from "@react-navigation/sta
|
|
|
import { createNativeStackNavigator } from "@react-navigation/native-stack"
|
|
|
import { observer } from "mobx-react"
|
|
|
import React, { useEffect, useState } from "react"
|
|
|
-import { Alert, Dimensions, Image, ScrollView, View } from "react-native"
|
|
|
+import { Alert, Dimensions, Image, ScrollView, View, Linking } from "react-native"
|
|
|
import { Chip } from "react-native-paper"
|
|
|
import { IconButton } from "../components/Buttons"
|
|
|
import IndoorMap from "../components/Map/MainMapComponent/IndoorMap"
|
|
@@ -161,7 +161,7 @@ const MapNavigator: React.FC<MapNavigatorProps> = ({ route }) => {
|
|
|
|
|
|
{/* Filter chips and button*/}
|
|
|
{!mapState.filterVisible && currentRoute == 'Indoor' ?
|
|
|
- <View style={{ width: Dimensions.get("window").width * 0.8, marginLeft: Dimensions.get("window").width * 0.12, borderColor: "red", borderWidth: 0, top: 75, position: 'absolute', flexDirection: "row-reverse", justifyContent: 'flex-end' }}>
|
|
|
+ <View style={{ top: 60, right: 7.5 , position: 'absolute', flexDirection: "row-reverse", justifyContent: 'flex-end' }}>
|
|
|
<IconButton size={16} color={colors.red} style={[mapStyles.filterButtonIndoor]} icon="filter" onPress={() => mapState.toggleFilter(true)} />
|
|
|
<ScrollView horizontal={true} contentContainerStyle={{ alignItems: 'center' }} style={{ marginHorizontal: 10, flexDirection: 'row' }}>
|
|
|
{mapState.onlyOwned ? <Chip avatar={(<FontAwesome name="user" size={20} color='gray' style={{ textAlign: 'center', textAlignVertical: 'center' }} />)} style={{ borderWidth: 1, borderColor: 'lightgray', marginRight: 5, marginLeft: 10 }} onClose={() => mapState.toggleOnlyOwned(false)}>My landmarks</Chip> : null}
|
|
@@ -189,7 +189,29 @@ const MapNavigator: React.FC<MapNavigatorProps> = ({ route }) => {
|
|
|
}
|
|
|
|
|
|
{/* Create Hamburger icon */}
|
|
|
- {currentRoute == 'Indoor' ? <></> :
|
|
|
+ {currentRoute == 'Indoor' ?
|
|
|
+ <View style={{ top: 100, right: 7.5 , position: 'absolute', }}>
|
|
|
+ <Menu
|
|
|
+ visible={visible}
|
|
|
+ anchor={<IconButton size={16} color={colors.red} style={[mapStyles.filterButtonIndoor]} icon="bars" onPress={() => setVisible(true)} />}
|
|
|
+ onRequestClose={() => setVisible(false)}
|
|
|
+ >
|
|
|
+
|
|
|
+ <MenuItem onPress={() => {
|
|
|
+ setVisible(false)
|
|
|
+ navigate("Outdoor")
|
|
|
+ // Alert.alert("Cameron Library")
|
|
|
+ }}>Go back outdoors</MenuItem>
|
|
|
+
|
|
|
+ <MenuItem onPress={() => {
|
|
|
+ setVisible(false)
|
|
|
+ Linking.openURL('https://www.ualberta.ca/facilities-operations/portfolio/emergency-management-office/emergency-procedures/alarms-evacuation.html')
|
|
|
+ // Alert.alert("Cameron Library")
|
|
|
+ }}>Resources</MenuItem>
|
|
|
+
|
|
|
+ </Menu>
|
|
|
+ </View>
|
|
|
+ :
|
|
|
<View style={{ top: 60, right: 20, position: 'absolute', }}>
|
|
|
<Menu
|
|
|
visible={visible}
|
|
@@ -209,7 +231,6 @@ const MapNavigator: React.FC<MapNavigatorProps> = ({ route }) => {
|
|
|
</Menu>
|
|
|
|
|
|
{/* either "bars" or "list" */}
|
|
|
- <ScrollView horizontal={true} contentContainerStyle={{ alignItems: 'center' }} style={{ marginHorizontal: 10, flexDirection: 'row' }}></ScrollView>
|
|
|
</View>
|
|
|
}
|
|
|
|