Skip to content

Commit

Permalink
Adding DebugPreferences file.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamMc331 committed Feb 1, 2024
1 parent b43c5ff commit 1937204
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 4 deletions.
1 change: 1 addition & 0 deletions feature/debugmenu/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ kotlin {
implementation(compose.materialIconsExtended)
implementation(compose.runtime)
implementation(libs.koin.core)
implementation(libs.multiplatform.settings)
implementation(libs.slack.circuit)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,96 @@
package com.adammcneilly.pocketleague.feature.debugmenu

import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.LazyListScope
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.CalendarToday
import androidx.compose.material3.Checkbox
import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.OutlinedTextField
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import com.adammcneilly.pocketleague.shared.ui.theme.PocketLeagueTheme

/**
* Renders the debug menu.
*/
@OptIn(ExperimentalMaterial3Api::class)
@Composable
internal fun DebugMenuContent(
modifier: Modifier = Modifier,
) {
Text(
text = "Debug Menu Screen",
modifier = modifier,
)
LazyColumn(
modifier = modifier
.padding(PocketLeagueTheme.sizes.screenPadding),
) {
timeProviderSection()
}
}

private fun LazyListScope.timeProviderSection() {
item {
Text(
text = "TimeProvider",
style = MaterialTheme.typography.titleMedium,
)
}

item {
Row(
horizontalArrangement = Arrangement.spacedBy(PocketLeagueTheme.sizes.textSpacing),
verticalAlignment = Alignment.CenterVertically,
) {
Checkbox(
checked = true,
onCheckedChange = {},
)

Text(
text = "Use System Time",
)
}
}

item {
Row(
horizontalArrangement = Arrangement.spacedBy(PocketLeagueTheme.sizes.textSpacing),
verticalAlignment = Alignment.CenterVertically,
) {
Checkbox(
checked = false,
onCheckedChange = {},
)

Text(
text = "Use Custom Time",
)
}
}

item {
OutlinedTextField(
value = "2023-03-02T16:00:00Z",
onValueChange = {},
trailingIcon = {
Icon(
Icons.Default.CalendarToday,
contentDescription = "Debug Date",
)
},
modifier = Modifier
.padding(
start = (24 + 32).dp,
),
shape = CircleShape,
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package com.adammcneilly.pocketleague.feature.debugmenu

interface DebugPreferences

0 comments on commit 1937204

Please sign in to comment.