Skip to content

Commit cbbb7e0

Browse files
committed
new logging page
1 parent a2f0780 commit cbbb7e0

File tree

7 files changed

+220
-54
lines changed

7 files changed

+220
-54
lines changed

apps/mobile/src/app/(home)/_layout.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ export default function DashboardLayout() {
7878
),
7979
}}
8080
/>
81+
<Stack.Screen
82+
name="log2"
83+
options={{
84+
title: "New Log",
85+
presentation: "modal",
86+
headerRight: () => (
87+
<Button variant="link" size="icon" onPress={() => router.back()}>
88+
<X size={24} />
89+
</Button>
90+
),
91+
}}
92+
/>
8193
</Stack>
8294
);
8395
}

apps/mobile/src/app/(home)/index.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,29 @@ export default function DashboardHome() {
2323
Dashboard
2424
</Text>
2525

26-
<Text className="mb-4">
26+
{/* <Text className="mb-4">
2727
Welcome, {session?.user.name ?? "User"}!
2828
</Text>
2929
3030
<View className="rounded-lg bg-gray-100 p-4 dark:bg-gray-800">
3131
<Text>Your dashboard content goes here</Text>
32-
</View>
32+
</View> */}
3333
</View>
3434
</ScrollView>
3535
<View>
36-
<Button onPress={() => router.push("/(home)/log")}>
37-
<Text>Log something</Text>
36+
<Button
37+
onPress={() => router.push("/(home)/log")}
38+
className="flex flex-row gap-2"
39+
>
40+
<Text>Log</Text>
41+
</Button>
42+
</View>
43+
<View>
44+
<Button
45+
onPress={() => router.push("/(home)/log2")}
46+
className="flex flex-row gap-2"
47+
>
48+
<Text>Log2</Text>
3849
</Button>
3950
</View>
4051
</View>

apps/mobile/src/app/(home)/log2.tsx

Lines changed: 163 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
import React from "react";
2+
import { ScrollView, View } from "react-native";
3+
import { SafeAreaView } from "react-native-safe-area-context";
4+
import {
5+
ArrowsClockwise,
6+
Barcode,
7+
Bed,
8+
Brain,
9+
Camera,
10+
Drop,
11+
Lightning,
12+
MagnifyingGlass,
13+
Microphone,
14+
PersonArmsSpread,
15+
PersonSimpleRun,
16+
Pill,
17+
TextAa,
18+
Virus,
19+
} from "phosphor-react-native";
20+
21+
import { Text } from "~/components/ui/text";
22+
23+
export default function Logger() {
24+
return (
25+
<SafeAreaView className="flex-1" edges={["bottom"]}>
26+
<ScrollView>
27+
<View className="flex w-full flex-col gap-6 p-6">
28+
<View className="border-sand-3 flex flex-col gap-4 border-b-2 pb-4">
29+
<Text type="title" className="-mb-2">
30+
Food and Drink
31+
</Text>
32+
<View className="flex w-full flex-row items-center justify-between gap-2">
33+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
34+
<Camera size={24} weight="bold" />
35+
<Text className="text-sm">Photo</Text>
36+
</View>
37+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
38+
<Microphone size={24} weight="bold" />
39+
<Text className="text-sm">Audio</Text>
40+
</View>
41+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
42+
<TextAa size={24} weight="bold" />
43+
<Text className="text-sm">Text</Text>
44+
</View>
45+
</View>
46+
<View className="flex w-full flex-row items-center justify-between gap-2">
47+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
48+
<Barcode size={24} weight="bold" />
49+
<Text className="text-sm">Scan</Text>
50+
</View>
51+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
52+
<MagnifyingGlass size={24} weight="bold" />
53+
<Text className="text-sm">Search</Text>
54+
</View>
55+
</View>
56+
</View>
57+
58+
{/* <View className="border-sand-3 flex flex-col gap-6 border-b-2 pb-4">
59+
60+
<View className="flex w-full flex-row items-center justify-between gap-2">
61+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-2 rounded-md">
62+
<PersonSimpleRun size={24} weight="bold" />
63+
<Text className="text-sm">Activities</Text>
64+
</View>
65+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-2 rounded-md">
66+
<Brain size={24} weight="bold" />
67+
<Text className="text-sm">Mind</Text>
68+
</View>
69+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-2 rounded-md">
70+
<Bed size={24} weight="bold" />
71+
<Text className="text-sm">Sleep</Text>
72+
</View>
73+
</View>
74+
<View className="flex w-full flex-row items-center justify-between gap-2">
75+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
76+
<Pill size={24} weight="bold" />
77+
<Text className="text-sm">Supplements</Text>
78+
</View>
79+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
80+
<Virus size={24} weight="bold" />
81+
<Text className="text-sm">Symptoms</Text>
82+
</View>
83+
</View>
84+
<View className="flex w-full flex-row items-center justify-between gap-2">
85+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
86+
<ArrowsClockwise size={24} weight="bold" />
87+
<Text className="text-sm">Cycles</Text>
88+
</View>
89+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
90+
<Lightning size={24} weight="bold" />
91+
<Text className="text-sm">Energy</Text>
92+
</View>
93+
</View>
94+
<View className="flex w-full flex-row items-center justify-between gap-2">
95+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
96+
<Drop size={24} weight="bold" />
97+
<Text className="text-sm">Blood</Text>
98+
</View>
99+
<View className="bg-sand-3 flex h-14 w-[48%] flex-row items-center justify-center gap-2 rounded-md">
100+
<PersonArmsSpread size={24} weight="bold" />
101+
<Text className="text-sm">Body</Text>
102+
</View>
103+
</View>
104+
</View> */}
105+
<View className="border-sand-3 flex flex-col gap-6 border-b-2 pb-4">
106+
<Text type="title" className="-mb-4">
107+
Physical
108+
</Text>
109+
<View className="flex w-full flex-row items-center justify-between gap-2">
110+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
111+
<PersonSimpleRun size={24} weight="bold" />
112+
<Text className="text-sm">Activities</Text>
113+
</View>
114+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
115+
<Lightning size={24} weight="bold" />
116+
<Text className="text-sm">Energy</Text>
117+
</View>
118+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
119+
<Bed size={24} weight="bold" />
120+
<Text className="text-sm">Sleep</Text>
121+
</View>
122+
</View>
123+
<Text type="title" className="-mb-4">
124+
Prevention & Monitoring
125+
</Text>
126+
<View className="flex w-full flex-row items-center justify-between gap-2">
127+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
128+
<Pill size={24} weight="bold" />
129+
<Text className="text-sm">Supplements</Text>
130+
</View>
131+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
132+
<ArrowsClockwise size={24} weight="bold" />
133+
<Text className="text-sm">Cycles</Text>
134+
</View>
135+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
136+
<Brain size={24} weight="bold" />
137+
<Text className="text-sm">Mind</Text>
138+
</View>
139+
</View>
140+
<Text type="title" className="-mb-4">
141+
Medical
142+
</Text>
143+
<View className="flex w-full flex-row items-center justify-between gap-2">
144+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
145+
<Virus size={24} weight="bold" />
146+
<Text className="text-sm">Symptoms</Text>
147+
</View>
148+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
149+
<Drop size={24} weight="bold" />
150+
<Text className="text-sm">Blood</Text>
151+
</View>
152+
153+
<View className="bg-sand-3 flex h-28 w-[31%] flex-col items-center justify-center gap-4 rounded-md">
154+
<PersonArmsSpread size={24} weight="bold" />
155+
<Text className="text-sm">Body</Text>
156+
</View>
157+
</View>
158+
</View>
159+
</View>
160+
</ScrollView>
161+
</SafeAreaView>
162+
);
163+
}

apps/mobile/src/app/(updates)/index.tsx

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,22 @@ export default function Updates() {
1717
<SafeAreaView className="flex-1 p-6">
1818
<View className="flex flex-1 flex-col gap-6">
1919
<Text className="text-3xl" type={"title"}>
20-
Latest Updates
20+
Latest{" "}
21+
<Text type="title" className="text-3xl">
22+
1up
23+
</Text>{" "}
24+
Updates
2125
</Text>
2226
<Text className="">Welcome back {session?.user.name}!</Text>
2327
<ScrollView>
24-
<View className="flex flex-col gap-8">
25-
<Text>
26-
Heres whats new in <Text type="title">1up</Text> version 0.0.3
27-
</Text>
28-
<Text>
29-
Heres whats new in <Text type="title">1up</Text> version 0.0.2
30-
</Text>
31-
<Text>
32-
Heres whats new in <Text type="title">1up</Text> version 0.0.1
28+
<View className="flex flex-col gap-4">
29+
<Text className="font-bold">
30+
🚀 Heres whats new in version 0.0.1
3331
</Text>
32+
<Text>- added nutrients and macros to food/drink logging</Text>
33+
<Text>- manual sleep logging</Text>
34+
<Text>- manual activity logging</Text>
35+
<Text>- basic supplement tracking</Text>
3436
</View>
3537
</ScrollView>
3638
<Link href="/(home)" asChild>

packages/consts/src/trackables.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
export enum TRACKABLE_TYPES {
22
consumption = "consumption",
3+
supplement = "supplement",
4+
medication = "medication",
5+
energy = "energy",
6+
blood = "blood",
7+
body = "body",
38
sleep = "sleep",
49
activity = "activity",
510
mind = "mind",
11+
symptom = "symptom",
612
custom = "custom",
713
}
814

915
export const TRACKABLE_TYPES_ARRAY = [
1016
TRACKABLE_TYPES.consumption,
17+
TRACKABLE_TYPES.supplement,
18+
TRACKABLE_TYPES.medication,
19+
TRACKABLE_TYPES.energy,
20+
TRACKABLE_TYPES.blood,
21+
TRACKABLE_TYPES.body,
1122
TRACKABLE_TYPES.sleep,
1223
TRACKABLE_TYPES.activity,
1324
TRACKABLE_TYPES.mind,
25+
TRACKABLE_TYPES.symptom,
1426
TRACKABLE_TYPES.custom,
1527
] as const;
1628

1729
export const trackableTypesToNameMap: { [I in TRACKABLE_TYPES]: string } = {
1830
[TRACKABLE_TYPES.consumption]: "Food and Drink",
31+
[TRACKABLE_TYPES.supplement]: "Supplements",
32+
[TRACKABLE_TYPES.medication]: "Medication",
33+
[TRACKABLE_TYPES.energy]: "Energy",
34+
[TRACKABLE_TYPES.blood]: "Blood",
35+
[TRACKABLE_TYPES.body]: "Body",
1936
[TRACKABLE_TYPES.sleep]: "Sleep",
2037
[TRACKABLE_TYPES.activity]: "Activity",
2138
[TRACKABLE_TYPES.mind]: "Mind",
39+
[TRACKABLE_TYPES.symptom]: "Symptoms",
2240
[TRACKABLE_TYPES.custom]: "Custom",
2341
};

packages/db/src/schema.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./schema/aiLog";
2-
export * from "./schema/air";
32
export * from "./schema/auth";
43
export * from "./schema/consumption";
54
export * from "./schema/integration";

packages/db/src/schema/air.ts

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)