diff --git a/.gitignore b/.gitignore
index 0b37b6e..19cdf1e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
+ios
# dependencies
node_modules/
@@ -38,4 +39,8 @@ yarn-error.*
# The following patterns were generated by expo-cli
expo-env.d.ts
-# @end expo-cli
\ No newline at end of file
+# @end expo-cli
+# Expo
+.expo
+dist/
+web-build/
diff --git a/additional.d.ts b/additional.d.ts
index e69de29..dfb8c15 100644
--- a/additional.d.ts
+++ b/additional.d.ts
@@ -0,0 +1,5 @@
+declare module "*.png";
+declare module "*.jpg";
+declare module "*.jpeg";
+declare module "*.svg";
+declare module "*.gif";
\ No newline at end of file
diff --git a/app.json b/app.json
index 478f0ad..a56c8f1 100644
--- a/app.json
+++ b/app.json
@@ -1,11 +1,11 @@
{
"expo": {
- "name": "freedo",
- "slug": "freedo",
+ "name": "freedu",
+ "slug": "freedu",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/images/test-png-fox.png",
- "scheme": "myapp",
+ "scheme": "com.willybeans.freedu",
"userInterfaceStyle": "automatic",
"assetBundlePatterns": ["**/*"],
"ios": {
@@ -15,15 +15,26 @@
"resizeMode": "contain",
"backgroundColor": "#E3C0FF",
"dark": {
- "image": "./assets/images/splash.png",
+ "image": "./assets/images/test-png-med-fox.png",
"resizeMode": "contain",
"backgroundColor": "#7C2EDB"
}
- }
+ },
+ "infoPlist": {
+ "CFBundleURLTypes": [
+ {
+ "CFBundleURLSchemes": [
+ "com.googleusercontent.apps.877799132108-3kvno9kifo9nh6mtl398btl2ljespudr",
+ "com.googleusercontent.apps.877799132108-s1l5qr0koi0ddqt075130fjhnk5boevh"
+ ]
+ }
+ ]
+ },
+ "bundleIdentifier": "com.willybeans.freedu"
},
"android": {
"adaptiveIcon": {
- "foregroundImage": "./assets/images/adaptive-icon.png",
+ "foregroundImage": "./assets/images/test-png-fox.png",
"backgroundColor": "#ffffff"
},
"splash": {
@@ -35,7 +46,9 @@
"resizeMode": "contain",
"backgroundColor": "#7C2EDB"
}
- }
+ },
+ "permissions": ["android.permission.RECORD_AUDIO"],
+ "package": "com.willybeans.freedu"
},
"web": {
"bundler": "metro",
@@ -49,10 +62,19 @@
"photosPermission": "The app accesses your photos to let you share them with your friends."
}
],
- "expo-router"
+ "expo-router",
+ "@react-native-google-signin/google-signin"
],
"experiments": {
"typedRoutes": true
+ },
+ "extra": {
+ "router": {
+ "origin": false
+ },
+ "eas": {
+ "projectId": "6c5a3f1a-6d04-4c28-870a-1af1f9d13db5"
+ }
}
}
}
diff --git a/app/(app)/(tabs)/_layout.tsx b/app/(app)/(tabs)/_layout.tsx
index 65510f3..dac867c 100644
--- a/app/(app)/(tabs)/_layout.tsx
+++ b/app/(app)/(tabs)/_layout.tsx
@@ -69,7 +69,7 @@ export default function TabLayout() {
)}
diff --git a/app/(app)/(tabs)/chats/_layout.tsx b/app/(app)/(tabs)/chats/_layout.tsx
index d7c8d95..a9f3844 100644
--- a/app/(app)/(tabs)/chats/_layout.tsx
+++ b/app/(app)/(tabs)/chats/_layout.tsx
@@ -4,7 +4,7 @@ import { ChatProvider } from "../../../../context/Chats";
import { useLocalSearchParams } from "expo-router";
import { useWebSocketContext } from "../../../../context/WebSocket";
import { useEffect, useState } from "react";
-import Colors from "../../../../constants/Colors";
+import Colors, { pallatte } from "../../../../constants/Colors";
import { Pressable, useColorScheme } from "react-native";
import { FontAwesome } from "@expo/vector-icons";
@@ -47,7 +47,7 @@ export default function ChatsLayout() {
)}
diff --git a/app/sign-in.tsx b/app/sign-in.tsx
index 6918d28..972afaa 100644
--- a/app/sign-in.tsx
+++ b/app/sign-in.tsx
@@ -1,22 +1,128 @@
-import { router } from "expo-router";
+import { HrefObject, Link, router } from "expo-router";
// import { Text, View } from "react-native";
import { useSession } from "../context/Auth/ctx";
-import { Text, View } from "../components/Themed";
+import { Text, TextInput, View } from "../components/Themed";
+// import GithubLoginComponent from "../components/GithubLogin";
+import { ScrollView, StyleSheet, useColorScheme } from "react-native";
+import { useState } from "react";
+import Colors from "../constants/Colors";
+import { Button } from "../components/Button";
+
+import CuriousFox from "../svgs/curious_fox.svg";
+import GoogleLogin from "../components/GoogleLogin";
+import GithubLoginComponent from "../components/GithubLogin";
+
+type Url = {
+ pathname: string;
+ params?: { id: string };
+};
export default function SignIn() {
+ const [userName, setUserName] = useState("");
+ const [password, setPassword] = useState("");
+ const colorScheme = useColorScheme();
const { signIn } = useSession();
+
+ const handleRegister = () => {
+ router.replace("/register");
+ };
+
+ const handleSignIn = () => {
+ // api stuff here
+ // userName, password
+ //on res:
+ signIn();
+ // Navigate after signing in. You may want to tweak this to ensure sign-in is
+ // successful before navigating.
+ router.replace("/");
+ };
return (
-
- {
- signIn();
- // Navigate after signing in. You may want to tweak this to ensure sign-in is
- // successful before navigating.
- router.replace("/");
- }}
- >
- Sign In
-
-
+
+
+
+
+ Welcome to Freedu!
+ Please login to continue
+
+
+
+
+
+
+
+
+
+
+
+ {/* */}
+
);
}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ headerContainer: {
+ justifyContent: "center",
+ alignItems: "center",
+ marginBottom: 20,
+ },
+ header: {
+ fontFamily: "Helvetica",
+ fontWeight: "700",
+ fontSize: 24,
+ },
+ loginContainer: {
+ width: "100%",
+ justifyContent: "center",
+ alignItems: "center",
+ },
+ inputs: {
+ height: 40,
+ width: "80%",
+ marginBottom: 10,
+ },
+ separator: {
+ marginVertical: 20,
+ height: 1,
+ width: "80%",
+ },
+});
diff --git a/components/GithubLogin.tsx b/components/GithubLogin.tsx
new file mode 100644
index 0000000..ab2cadf
--- /dev/null
+++ b/components/GithubLogin.tsx
@@ -0,0 +1,49 @@
+import * as React from "react";
+import * as WebBrowser from "expo-web-browser";
+import { makeRedirectUri, useAuthRequest } from "expo-auth-session";
+import { Button } from "react-native";
+import * as Linking from "expo-linking";
+
+WebBrowser.maybeCompleteAuthSession();
+const redirectUri = makeRedirectUri();
+
+console.log("#$^%&^*%&^$#%@$!#%^%&^*&$@", redirectUri);
+// console.log(AuthSession.getRedirectUrl())
+
+// Endpoint
+const discovery = {
+ authorizationEndpoint: "https://github.com/login/oauth/authorize",
+ tokenEndpoint: "https://github.com/login/oauth/access_token",
+ revocationEndpoint:
+ "https://github.com/settings/connections/applications/8b9c0875bc67e9e797c2",
+};
+
+export default function GithubLoginComponent() {
+ const [request, response, promptAsync] = useAuthRequest(
+ {
+ clientId: "8b9c0875bc67e9e797c2",
+ scopes: ["identity"], // what is this?
+ // redirectUri,
+ redirectUri: makeRedirectUri({
+ // scheme: "com.willybeans.freedu",
+ }),
+ },
+ discovery
+ );
+
+ React.useEffect(() => {
+ if (response?.type === "success") {
+ const { code } = response.params;
+ }
+ }, [response]);
+
+ return (
+