diff --git a/jukebox/App.js b/jukebox/App.js index c6eae34..b63ff23 100644 --- a/jukebox/App.js +++ b/jukebox/App.js @@ -2,13 +2,21 @@ import { StatusBar } from "expo-status-bar"; import { StyleSheet, Text, View, Pressable } from "react-native"; import { NavigationContainer } from "@react-navigation/native"; import { createNativeStackNavigator } from "@react-navigation/native-stack"; -import MediaPlayer from "./src/components/MediaPlayer"; -import HomeScreen from "./src/screens/HomeScreen"; import { createContext, useState, useContext } from "react"; + +import MediaPlayer from "./src/components/MediaPlayer"; + +import HomeScreen from "./src/screens/HomeScreen"; import LikedTracksScreen from "./src/screens/LikedTracksScreen"; import AlbumScreen from "./src/screens/AlbumScreen"; +import LoginScreen from "./src/screens/LoginScreen"; +import PasswordResetScreen from "./src/screens/PasswordResetScreen"; +import SettingsScreen from "./src/screens/SettingsScreen"; +import SignUpScreen from "./src/screens/SignUpScreen"; + import { LibraryProvider } from "./src/contexts/LibraryContext"; + const Stack = createNativeStackNavigator(); const playerContext = createContext(null); @@ -40,6 +48,10 @@ function AppNavigator() { + + + + ); diff --git a/jukebox/src/screens/HomeScreen.js b/jukebox/src/screens/HomeScreen.js index 3c3a90d..41f114a 100644 --- a/jukebox/src/screens/HomeScreen.js +++ b/jukebox/src/screens/HomeScreen.js @@ -16,10 +16,6 @@ export default function HomeScreen() { const navigation = useNavigation(); const { albums, likedTracks, toggleLike } = useLibrary(); - // Same behavior as before: show all albums in "Liked albums" section - const likedAlbums = albums; - - // Optional: limit shown liked tracks on Home const homeLikedTracks = useMemo(() => likedTracks.slice(0, 5), [likedTracks]); return ( @@ -29,17 +25,13 @@ export default function HomeScreen() { { - console.log("Login pressed"); - }} + onPress={() => navigation.navigate("Login")} > { - console.log("Settings pressed"); - }} + onPress={() => navigation.navigate("Settings")} > @@ -67,10 +59,10 @@ export default function HomeScreen() { ); })} - Liked albums + Albums item.id} numColumns={2} columnWrapperStyle={styles.albumRow} diff --git a/jukebox/src/screens/LoginScreen.js b/jukebox/src/screens/LoginScreen.js new file mode 100644 index 0000000..7a8206a --- /dev/null +++ b/jukebox/src/screens/LoginScreen.js @@ -0,0 +1,132 @@ +import React, { useState } from "react"; +import { View, Text, StyleSheet, TextInput, Pressable } from "react-native"; + +export default function LoginScreen({ navigation }) { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + const onLogin = () => { + console.log("Login button pressed"); + }; + + const OnPasswordReset = () => { + navigation.navigate("PasswordReset"); + }; + + const OnSignUp = () => { + navigation.navigate("SignUp"); + }; + + return ( + + navigation.goBack()} style={styles.backBtn}> + ← Back + + + Login + + + + + + + Log In + + + + Reset password + + + + Sign Up + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#000", + paddingTop: 24, + paddingHorizontal: 16, + }, + backBtn: { + marginBottom: 10, + alignSelf: "flex-start", + }, + backText: { + color: "#fff", + fontSize: 16, + fontWeight: "600", + }, + title: { + color: "#fff", + fontSize: 30, + fontWeight: "700", + marginBottom: 16, + }, + input: { + backgroundColor: "#1f2937", + color: "#fff", + borderRadius: 10, + paddingHorizontal: 12, + paddingVertical: 12, + fontSize: 16, + marginBottom: 12, + }, + loginBtn: { + backgroundColor: "#dbdbdb", + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 4, + marginBottom: 6, + }, + loginBtnText: { + color: "#000", + fontWeight: "700", + fontSize: 16, + }, + passwordResetBtn: { + backgroundColor: "#e36d6d", + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 4, + marginBottom: 6, + }, + passwordResetBtnText: { + color: "#000", + fontWeight: "700", + fontSize: 16, + }, + + SignupBtn: { + backgroundColor: "#dbdbdb", + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 24, + }, + SignupBtnText: { + color: "#000", + fontWeight: "700", + fontSize: 16, + }, +}); \ No newline at end of file diff --git a/jukebox/src/screens/PasswordResetScreen.js b/jukebox/src/screens/PasswordResetScreen.js new file mode 100644 index 0000000..7612e75 --- /dev/null +++ b/jukebox/src/screens/PasswordResetScreen.js @@ -0,0 +1,80 @@ +import React, { useState } from "react"; +import { View, Text, StyleSheet, TextInput, Pressable } from "react-native"; + +export default function PasswordResetScreen({ navigation }) { + const [email, setEmail] = useState(""); + + const onResetButtonPress = () => { + console.log("Send email button pressed"); + }; + + return ( + + navigation.goBack()} style={styles.backBtn}> + ← Back + + + Reset password + + + + + Send email + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#000", + paddingTop: 24, + paddingHorizontal: 16, + }, + backBtn: { + marginBottom: 10, + alignSelf: "flex-start", + }, + backText: { + color: "#fff", + fontSize: 16, + fontWeight: "600", + }, + title: { + color: "#fff", + fontSize: 30, + fontWeight: "700", + marginBottom: 16, + }, + input: { + backgroundColor: "#1f2937", + color: "#fff", + borderRadius: 10, + paddingHorizontal: 12, + paddingVertical: 12, + fontSize: 16, + marginBottom: 12, + }, + primaryBtn: { + backgroundColor: "#dbdbdb", + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 4, + marginBottom: 6, + }, + primaryBtnText: { + color: "#000", + fontWeight: "700", + fontSize: 16, + }, +}); \ No newline at end of file diff --git a/jukebox/src/screens/SettingsScreen.js b/jukebox/src/screens/SettingsScreen.js new file mode 100644 index 0000000..4ce8ba2 --- /dev/null +++ b/jukebox/src/screens/SettingsScreen.js @@ -0,0 +1,87 @@ +import React, { useState } from "react"; +import { View, Text, StyleSheet, Pressable, Switch } from "react-native"; + +export default function SettingsScreen({ navigation }) { + const [notificationsEnabled, setNotificationsEnabled] = useState(true); + const [highQuality, setHighQuality] = useState(false); + + return ( + + navigation.goBack()} style={styles.backBtn}> + ← Back + + + Settings + + + Enable notifications + + + + + High quality streaming + + + + console.log("Logged out")} + > + Log out + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#000", + paddingTop: 24, + paddingHorizontal: 16, + }, + backBtn: { + marginBottom: 10, + alignSelf: "flex-start", + }, + backText: { + color: "#fff", + fontSize: 16, + fontWeight: "600", + }, + title: { + color: "#fff", + fontSize: 30, + fontWeight: "700", + marginBottom: 16, + }, + row: { + backgroundColor: "#111827", + borderRadius: 10, + paddingHorizontal: 12, + paddingVertical: 14, + marginBottom: 10, + flexDirection: "row", + justifyContent: "space-between", + alignItems: "center", + }, + rowText: { + color: "#fff", + fontSize: 16, + }, + logoutBtn: { + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 16, + backgroundColor: "#e36d6d", + }, + logoutBtnText: { + color: "#000000", + fontWeight: "700", + fontSize: 16, + }, +}); \ No newline at end of file diff --git a/jukebox/src/screens/SignUpScreen.js b/jukebox/src/screens/SignUpScreen.js new file mode 100644 index 0000000..ac1e613 --- /dev/null +++ b/jukebox/src/screens/SignUpScreen.js @@ -0,0 +1,99 @@ +import React, { useState } from "react"; +import { View, Text, StyleSheet, TextInput, Pressable } from "react-native"; + +export default function SignUpScreen({ navigation }) { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + const onSignUp = () => { + console.log("Sign up button pressed"); + }; + + return ( + + navigation.goBack()} style={styles.backBtn}> + ← Back + + + Sign up + + + + + + + + + Sign Up + + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + backgroundColor: "#000", + paddingTop: 24, + paddingHorizontal: 16, + }, + backBtn: { + marginBottom: 10, + alignSelf: "flex-start", + }, + backText: { + color: "#fff", + fontSize: 16, + fontWeight: "600", + }, + title: { + color: "#fff", + fontSize: 30, + fontWeight: "700", + marginBottom: 16, + }, + input: { + backgroundColor: "#1f2937", + color: "#fff", + borderRadius: 10, + paddingHorizontal: 12, + paddingVertical: 12, + fontSize: 16, + marginBottom: 12, + }, + primaryBtn: { + backgroundColor: "#dbdbdb", + borderRadius: 10, + paddingVertical: 12, + alignItems: "center", + marginTop: 4, + marginBottom: 6, + }, + primaryBtnText: { + color: "#000", + fontWeight: "700", + fontSize: 16, + }, +}); \ No newline at end of file diff --git a/jukebox/src/screens/login.js b/jukebox/src/screens/login.js deleted file mode 100644 index e69de29..0000000 diff --git a/jukebox/src/screens/signup.js b/jukebox/src/screens/signup.js deleted file mode 100644 index e69de29..0000000