changes to todo

This commit is contained in:
ivic00
2024-09-05 19:27:44 +02:00
parent ee72c9c56a
commit f08b6ea997
14 changed files with 458 additions and 35 deletions

View File

@ -6,7 +6,7 @@ import {
DrawerItem,
DrawerItemList,
} from "@react-navigation/drawer";
import { Button, View, Text } from "react-native-ui-lib";
import { Button, View, Text, ButtonSize } from "react-native-ui-lib";
import { StyleSheet } from "react-native";
import Feather from "@expo/vector-icons/Feather";
import DrawerButton from "@/components/shared/DrawerButton";
@ -14,6 +14,7 @@ import {
AntDesign,
FontAwesome6,
MaterialCommunityIcons,
Octicons,
} from "@expo/vector-icons";
export default function TabLayout() {
@ -24,15 +25,24 @@ export default function TabLayout() {
initialRouteName={"index"}
screenOptions={{
headerShown: true,
drawerStyle: { width: "90%", backgroundColor: "#f9f8f7" },
drawerStyle: {
width: "90%",
backgroundColor: "#f9f8f7",
height: "100%",
},
}}
drawerContent={(props) => {
return (
<DrawerContentScrollView {...props}>
<DrawerContentScrollView {...props} style={{ height: "100%" }}>
<View centerH centerV margin-30>
<Text text50>Welcome to Kali</Text>
</View>
<View style={{ flexDirection: "row", paddingHorizontal: 30 }}>
<View
style={{
flexDirection: "row",
paddingHorizontal: 30,
}}
>
<View style={{ flex: 1, paddingRight: 5 }}>
<DrawerButton
title={"Calendar"}
@ -47,13 +57,6 @@ export default function TabLayout() {
/>
}
/>
<DrawerButton
color="#e0ca03"
title={"Brain Dump"}
bgColor={"#fffacb"}
pressFunc={() => props.navigation.navigate("brain_dump")}
icon={<AntDesign name="book" size={30} color="#e0ca03" />}
/>
<DrawerButton
color="#50be0c"
title={"Groceries"}
@ -69,7 +72,7 @@ export default function TabLayout() {
/>
</View>
<View style={{ flex: 1 }}>
<DrawerButton
{/*<DrawerButton
color="#fd1775"
title={"My Reminders"}
bgColor={"#ffe8f2"}
@ -81,7 +84,7 @@ export default function TabLayout() {
color="#fd1775"
/>
}
/>
/>*/}
<DrawerButton
color="#8005eb"
title={"To Dos"}
@ -91,16 +94,53 @@ export default function TabLayout() {
<AntDesign name="checkcircleo" size={30} color="#8005eb" />
}
/>
<DrawerItem label="Logout" onPress={() => signOut()} />
<DrawerButton
color="#e0ca03"
title={"Brain Dump"}
bgColor={"#fffacb"}
pressFunc={() => props.navigation.navigate("brain_dump")}
icon={<AntDesign name="book" size={30} color="#e0ca03" />}
/>
{/*<DrawerItem label="Logout" onPress={() => signOut()} />*/}
</View>
</View>
<Button
label={"Manage Settings"}
iconSource={() => (
<View
backgroundColor='#ededed'
width={60}
height={60}
style={{ borderRadius: 50 }}
marginR-10
centerV
centerH
>
<Octicons name="gear" size={30} color="#6c645b" />
</View>
)}
backgroundColor="white"
color="black"
color="#464039"
paddingV-30
marginH-30
marginB-10
borderRadius={15}
style={{ elevation: 1 }}
/>
<Button
size={ButtonSize.large}
marginH-30
paddingV-15
style={{
marginTop: "47%",
backgroundColor: "transparent",
borderWidth: 2,
borderColor: "#fd1775",
}}
label="Sign out of Kali"
color="#fd1775"
onPress={() => signOut()}
/>
</DrawerContentScrollView>
);
@ -152,10 +192,3 @@ export default function TabLayout() {
</Drawer>
);
}
const styles = StyleSheet.create({
square: {
width: "100%",
aspectRatio: 1, // This ensures the height matches the width, creating a square
},
});

View File

@ -1,20 +1,23 @@
import AddChore from "@/components/pages/todos/AddChore";
import ToDoItem from "@/components/pages/todos/ToDoItem";
import ToDosList from "@/components/pages/todos/ToDosList";
import HeaderTemplate from "@/components/shared/HeaderTemplate";
import { useAuthContext } from "@/contexts/AuthContext";
import { ToDosContextProvider, useToDosContext } from "@/contexts/ToDosContext";
import { AntDesign } from "@expo/vector-icons";
import { ScrollView } from "react-native-gesture-handler";
import { View } from "react-native-ui-lib";
import { Button, ButtonSize, View } from "react-native-ui-lib";
export default function Screen() {
return (
<ToDosContextProvider>
<ScrollView>
<View backgroundColor="white">
<View backgroundColor="#f9f8f7">
<HeaderTemplate message="Here are your To Do's" />
<ToDosList />
</View>
</ScrollView>
<AddChore />
</ToDosContextProvider>
);
}