Compare commits

...

2 Commits
0.5.0 ... 1.0.0

Author SHA1 Message Date
96759e402d 1.0.0 - 1.0 baybeeeee 2025-08-22 16:19:25 -06:00
ed76fb2fb2 Remove outdated comment 2025-08-22 10:56:43 -06:00
9 changed files with 76 additions and 29 deletions

View File

@@ -817,6 +817,19 @@
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="36" />
<option name="brand" value="google" />
<option name="codename" value="tokay" />
<option name="default" value="true" />
<option name="id" value="tokay" />
<option name="labId" value="google" />
<option name="manufacturer" value="Google" />
<option name="name" value="Pixel 9" />
<option name="screenDensity" value="420" />
<option name="screenX" value="1080" />
<option name="screenY" value="2424" />
</PersistentDeviceSelectionData>
<PersistentDeviceSelectionData>
<option name="api" value="34" />
<option name="brand" value="samsung" />

View File

@@ -14,8 +14,8 @@ android {
applicationId = "com.atridad.openclimb"
minSdk = 31
targetSdk = 36
versionCode = 13
versionName = "0.5.0"
versionCode = 14
versionName = "1.0.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
@@ -37,7 +37,6 @@ android {
jvmTarget = "17"
}
// Ensure consistent JVM toolchain across all tasks
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
@@ -82,9 +81,6 @@ dependencies {
// Image Loading
implementation(libs.coil.compose)
// Charts - Placeholder for future implementation
// Charts will be implemented with a stable library in future versions
// Testing
testImplementation(libs.junit)
testImplementation(libs.mockk)

View File

@@ -27,7 +27,7 @@
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.OpenClimb">
android:theme="@style/Theme.OpenClimb.Splash">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@@ -13,6 +13,7 @@ import com.atridad.openclimb.ui.theme.OpenClimbTheme
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setTheme(R.style.Theme_OpenClimb)
enableEdgeToEdge()
setContent {
OpenClimbTheme {

View File

@@ -152,7 +152,10 @@ fun OpenClimbApp() {
SessionDetailScreen(
sessionId = args.sessionId,
viewModel = viewModel,
onNavigateBack = { navController.popBackStack() }
onNavigateBack = { navController.popBackStack() },
onNavigateToProblemDetail = { problemId ->
navController.navigate(Screen.ProblemDetail(problemId))
}
)
}
@@ -178,6 +181,12 @@ fun OpenClimbApp() {
onNavigateBack = { navController.popBackStack() },
onNavigateToEdit = { gymId ->
navController.navigate(Screen.AddEditGym(gymId = gymId))
},
onNavigateToSessionDetail = { sessionId ->
navController.navigate(Screen.SessionDetail(sessionId))
},
onNavigateToProblemDetail = { problemId ->
navController.navigate(Screen.ProblemDetail(problemId))
}
)
}

View File

@@ -210,7 +210,12 @@ fun EditAttemptDialog(
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun SessionDetailScreen(sessionId: String, viewModel: ClimbViewModel, onNavigateBack: () -> Unit) {
fun SessionDetailScreen(
sessionId: String,
viewModel: ClimbViewModel,
onNavigateBack: () -> Unit,
onNavigateToProblemDetail: (String) -> Unit = {}
) {
val context = LocalContext.current
val attempts by viewModel.getAttemptsBySession(sessionId).collectAsState(initial = emptyList())
val sessions by viewModel.sessions.collectAsState()
@@ -520,7 +525,8 @@ fun SessionDetailScreen(sessionId: String, viewModel: ClimbViewModel, onNavigate
onEditAttempt = { attemptToEdit -> showEditAttemptDialog = attemptToEdit },
onDeleteAttempt = { attemptToDelete ->
viewModel.deleteAttempt(attemptToDelete)
}
},
onAttemptClick = { onNavigateToProblemDetail(problem.id) }
)
}
}
@@ -904,7 +910,9 @@ fun GymDetailScreen(
gymId: String,
viewModel: ClimbViewModel,
onNavigateBack: () -> Unit,
onNavigateToEdit: (String) -> Unit
onNavigateToEdit: (String) -> Unit,
onNavigateToSessionDetail: (String) -> Unit = {},
onNavigateToProblemDetail: (String) -> Unit = {}
) {
val gyms by viewModel.gyms.collectAsState()
val gym = gyms.find { it.id == gymId }
@@ -1135,14 +1143,16 @@ fun GymDetailScreen(
Card(
modifier =
Modifier.fillMaxWidth().padding(vertical = 4.dp),
Modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
.clickable { onNavigateToProblemDetail(problem.id) },
colors =
CardDefaults.cardColors(
containerColor =
MaterialTheme.colorScheme.surfaceVariant
.copy(alpha = 0.3f)
containerColor = MaterialTheme.colorScheme.surface
),
shape = RoundedCornerShape(12.dp)
shape = RoundedCornerShape(12.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp)
) {
ListItem(
headlineContent = {
@@ -1208,14 +1218,16 @@ fun GymDetailScreen(
Card(
modifier =
Modifier.fillMaxWidth().padding(vertical = 4.dp),
Modifier
.fillMaxWidth()
.padding(vertical = 4.dp)
.clickable { onNavigateToSessionDetail(session.id) },
colors =
CardDefaults.cardColors(
containerColor =
MaterialTheme.colorScheme.surfaceVariant
.copy(alpha = 0.3f)
containerColor = MaterialTheme.colorScheme.surface
),
shape = RoundedCornerShape(12.dp)
shape = RoundedCornerShape(12.dp),
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp)
) {
ListItem(
headlineContent = {
@@ -1456,11 +1468,17 @@ fun SessionAttemptCard(
attempt: Attempt,
problem: Problem,
onEditAttempt: (Attempt) -> Unit = {},
onDeleteAttempt: (Attempt) -> Unit = {}
onDeleteAttempt: (Attempt) -> Unit = {},
onAttemptClick: () -> Unit = {}
) {
var showDeleteDialog by remember { mutableStateOf(false) }
Card(modifier = Modifier.fillMaxWidth()) {
Card(
modifier = Modifier
.fillMaxWidth()
.clickable { onAttemptClick() },
elevation = CardDefaults.cardElevation(defaultElevation = 2.dp)
) {
Column(modifier = Modifier.padding(16.dp)) {
Row(
modifier = Modifier.fillMaxWidth(),
@@ -1511,11 +1529,7 @@ fun SessionAttemptCard(
// Delete button
IconButton(
onClick = { showDeleteDialog = true },
modifier = Modifier.size(32.dp),
colors =
IconButtonDefaults.iconButtonColors(
contentColor = MaterialTheme.colorScheme.error
)
modifier = Modifier.size(32.dp)
) {
Icon(
Icons.Default.Delete,

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Splash background (dark) -->
<color name="splash_background">#FF121212</color>
</resources>

View File

@@ -7,4 +7,7 @@
<color name="teal_700">#FF018786</color>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
<!-- Splash background (light) -->
<color name="splash_background">#FFFFFFFF</color>
</resources>

View File

@@ -1,5 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.OpenClimb" parent="android:Theme.Material.Light.NoActionBar" />
<style name="Theme.OpenClimb.Splash" parent="Theme.OpenClimb">
<item name="android:windowSplashScreenBackground">@color/splash_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_mountains</item>
<item name="android:windowSplashScreenAnimationDuration">200</item>
</style>
</resources>