Cleaning, modified drawer, added back button

This commit is contained in:
whysman 2025-03-31 22:41:49 -04:00
parent 970721b79e
commit a876be705d
6 changed files with 17 additions and 48 deletions

View File

@ -101,16 +101,16 @@ const styles = StyleSheet.create({
},
drawerContainer: {
...StyleSheet.absoluteFillObject,
marginTop: 70,
marginTop: 0,
width: 200,
height: "auto",
//elevation: 4,
//backgroundColor: "rgba(0, 0, 0, 0.5)",
justifyContent: "flex-start",
alignItems: "flex-start",
zIndex: 2, // Ensures the drawer is above everything
zIndex: 5, // Ensures the drawer is above everything
elevation: 5, // Android shadow priority
borderRadius: 10,
//borderRadius: 10,
},
footer: {
padding: 16,

View File

@ -1,9 +1,7 @@
import {Title, useTheme} from "react-native-paper";
import { Title, useTheme } from "react-native-paper";
import { Image, View } from "react-native";
import React from "react";
const Broken = () => {
const theme = useTheme();
return (

View File

@ -1,5 +1,5 @@
import React from "react";
import {Portal, Button, Dialog, useTheme} from "react-native-paper";
import { Portal, Button, Dialog, useTheme } from "react-native-paper";
import About from "@/components/About";
import Privacy from "@/components/Privacy";
import Broken from "@/components/Broken";

View File

@ -1,6 +1,6 @@
import React from "react";
import { View } from "react-native";
import {Drawer, useTheme} from "react-native-paper";
import { Appbar,Drawer, useTheme } from "react-native-paper";
import styles from "@/assets/styles";
interface DrawerMenuProps {
@ -20,44 +20,15 @@ const DrawerMenu: React.FC<DrawerMenuProps> = ({ isMenuActive, onClose, toggleAb
}
return (
<View style={[styles.drawerContainer, { backgroundColor: theme.colors.background }]}>
<Appbar.BackAction onPress={() => onClose()} />
<Drawer.Section>
<Drawer.Item
label="Profile"
onPress={() => {
toggleProfile();
onClose();
}}
/>
<Drawer.Item
label="Location"
onPress={() => {
toggleLocation();
onClose();
}}
/>
<Drawer.Item label="Profile" onPress={() => { toggleProfile(); onClose(); }} />
<Drawer.Item label="Location" onPress={() => { toggleLocation(); onClose(); }} />
</Drawer.Section>
<Drawer.Section>
<Drawer.Item
label="About Us"
onPress={() => {
toggleAbout();
onClose();
}}
/>
<Drawer.Item
label="Privacy Policy"
onPress={() => {
togglePrivacy();
onClose();
}}
/>
<Drawer.Item
label="Report a Bug"
onPress={() => {
toggleBug();
onClose();
}}
/>
<Drawer.Section showDivider={false}>
<Drawer.Item label="About Us" onPress={() => { toggleAbout(); onClose(); }} />
<Drawer.Item label="Privacy Policy" onPress={() => { togglePrivacy(); onClose(); }} />
<Drawer.Item label="Report a Bug" onPress={() => { toggleBug(); onClose(); }} />
</Drawer.Section>
</View>
);

View File

@ -1,8 +1,8 @@
import React, { useEffect, useState, useRef } from "react";
import useWebSocket from "react-use-websocket";
import axios from "axios";
import {Animated, Easing, ImageBackground, ScrollView, useColorScheme, View} from "react-native";
import { Avatar, List, Button, useTheme, } from "react-native-paper";
import { Animated, Easing, ImageBackground, ScrollView, useColorScheme, View } from "react-native";
import { Avatar, List, Button, useTheme } from "react-native-paper";
import themes from "@/assets/themes";
import styles from "@/assets/styles";
import log from "@/util/log"

View File

@ -1,5 +1,5 @@
import {Appbar, useTheme} from "react-native-paper";
import {Image, useColorScheme, View} from "react-native";
import { Appbar, useTheme } from "react-native-paper";
import { Image, useColorScheme, View } from "react-native";
import React from "react";
import styles from "@/assets/styles";