Skip to content
Open

Ai #9

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .idea/deploymentTargetSelector.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ dependencies {
debugImplementation(libs.androidx.ui.tooling)
debugImplementation(libs.androidx.ui.test.manifest)


implementation("com.android.volley:volley:1.2.1")
implementation("androidx.navigation:navigation-compose:2.8.9")

// Retrofit
Expand All @@ -79,6 +81,9 @@ dependencies {

implementation("com.google.accompanist:accompanist-systemuicontroller:0.36.0")

implementation("androidx.compose.material:material-icons-extended:1.6.0")


implementation ("com.android.volley:volley:1.2.1")
implementation("androidx.compose.material:material-icons-extended:1.6.0")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ interface UserProfileService {

@GET("api/users/data/{userId}/profile")
suspend fun getUserProfile(@Path("userId") userId: Long): Response<UserProfileData>
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.example.deepsea.data.model

data class RegisterRequest(
val name: String,
val username: String,
val password: String,
val email: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ data class UserProfileData(
val currentLeague: String,
val topFinishes: Int,
val friends: Set<Int?> = setOf(null)

)

This file was deleted.

16 changes: 11 additions & 5 deletions app/src/main/java/com/example/deepsea/ui/DeepSeaApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.remember
import androidx.navigation.compose.rememberNavController
import com.example.deepsea.AI_assistant.VoiceAssistantScreen
import com.example.deepsea.data.model.Language
import com.example.deepsea.AI_assistant.VoiceAssistantScreen
import com.example.deepsea.ui.components.UnitData
import com.example.deepsea.ui.profile.ProfilePage
import com.example.deepsea.ui.screens.DailyGoalSelectionPage
Expand All @@ -62,6 +64,9 @@ import com.example.deepsea.ui.screens.SettingsPage
import com.example.deepsea.ui.screens.SurveySelectionPage
import com.example.deepsea.ui.theme.FeatherGreen
import com.example.deepsea.utils.SessionManager
import androidx.compose.material.icons.filled.Mic



@OptIn(ExperimentalSharedTransitionApi::class)
@Preview
Expand Down Expand Up @@ -130,10 +135,10 @@ fun DeepSeaApp() {
) { backStackEntry ->
SignupPage(
navController = deepSeaNavController,
onSignUpClick = { username, email, password, avatar, name ->
onSignUpClick = { username, email, password, avatar ->
// Updated to handle avatar
Log.d("DeepSeaApp", "Attempting signup with email: $email and avatar: ${avatar != null}")
authViewModel.signup(username, email, password, avatar, name)
authViewModel.signup(username, email, password, avatar.toString())
},
onSignInClick = {
// Navigate to login page
Expand Down Expand Up @@ -201,7 +206,6 @@ fun MainContainer(
"Favorites" -> nestedNavController.navController.navigate("favorites_route")
"Settings" -> nestedNavController.navController.navigate("settings_route")
"Help" -> nestedNavController.navController.navigate("help_route")
"Voice Assistant" -> nestedNavController.navController.navigate("home/voice_assistant")
}
}
)
Expand Down Expand Up @@ -314,10 +318,10 @@ fun MainContainer(
composable("signup") {
SignupPage(
navController = nestedNavController,
onSignUpClick = { username, email, password, avatar, name ->
onSignUpClick = { username, email, password, avatar ->
// Updated to handle avatar
Log.d("MainContainer", "Attempting signup with email: $email and avatar: ${avatar != null}")
authViewModel.signup(username, email, password, avatar)
authViewModel.signup(username, email, password, avatar.toString())
},
onSignInClick = {
nestedNavController.navController.navigate("login")
Expand Down Expand Up @@ -351,6 +355,8 @@ fun MainContainer(
}
}



fun <T> nonSpatialExpressiveSpring() = spring<T>(
dampingRatio = 1f,
stiffness = 1600f
Expand Down
3 changes: 3 additions & 0 deletions app/src/main/java/com/example/deepsea/ui/MainActivity.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.example.deepsea.ui

import android.content.pm.PackageManager
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
Expand All @@ -11,6 +12,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.tooling.preview.Preview
import androidx.core.app.ActivityCompat
import com.example.deepsea.ui.screens.LoginPage
import com.example.deepsea.ui.theme.DeepSeaTheme

Expand All @@ -21,5 +23,6 @@ class MainActivity : ComponentActivity() {
setContent {
DeepSeaApp()
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ fun DeepSeaFAButton(
"Favorites" to Icons.Default.Favorite,
"Settings" to Icons.Default.Settings,
"Help" to Icons.Default.Info

)
} else {
iconOptions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,4 @@ fun StreakCalendar() {
}
}
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ import com.example.deepsea.text.TitleText
import com.example.deepsea.ui.components.TopBar
import com.example.deepsea.ui.components.UnitData
import com.example.deepsea.ui.components.UnitsLazyColumn
import com.example.deepsea.ui.home.DeepSeaBottomBar
import com.example.deepsea.ui.theme.FeatherGreen
import com.example.deepsea.ui.theme.Gray
import com.example.deepsea.ui.theme.Polar
import kotlinx.coroutines.launch




/**
* Extension function to add composable with composition local to NavGraphBuilder
* Provides default transition animation
Expand Down Expand Up @@ -107,6 +111,9 @@ fun HomeScreen(units: List<UnitData> = emptyList(), navController: NavController
units = units,
visibleUnitIndex = visibleHeadingIndex,
)
},
bottomBar = {
DeepSeaBottomBar(navController=navController)
}
) {
// Content area with scrolling units
Expand Down
Loading