Auto-commit after successful build: update app gameplay/UI, improve build setup

Changed files:\napp/build.gradle.kts
app/src/main/java/solutions/tretter/githugandroid/GitHugApp.kt
app/src/main/java/solutions/tretter/githugandroid/TextEditorDialog.kt
This commit is contained in:
Joe Tretter
2026-05-02 22:04:37 -05:00
parent 17f19ca0ba
commit dcd5589d74
3 changed files with 17 additions and 19 deletions

View File

@@ -38,11 +38,10 @@ fun TextEditorDialog(
state: TextEditorState,
onContentChange: (String) -> Unit,
onSaveAsPathChange: (String) -> Unit,
onCancel: () -> Unit,
onClose: () -> Unit,
onSave: () -> Unit,
onSaveAs: () -> Unit,
) {
Dialog(onDismissRequest = onCancel) {
Dialog(onDismissRequest = onClose) {
Surface(
modifier = Modifier
.fillMaxWidth()
@@ -54,13 +53,18 @@ fun TextEditorDialog(
modifier = Modifier.padding(12.dp),
verticalArrangement = Arrangement.spacedBy(10.dp),
) {
Text(
text = "Edit File",
color = TextPrimary,
fontWeight = FontWeight.Bold,
fontSize = 20.sp,
)
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
EditorButton(label = "Cancel", onClick = onCancel)
EditorButton(label = "Save", enabled = state.path.isNotBlank(), onClick = onSave)
EditorButton(label = "Save As", enabled = state.saveAsPath.isNotBlank(), onClick = onSaveAs)
EditorButton(label = "Close", onClick = onClose)
EditorButton(label = "Save", enabled = state.saveAsPath.isNotBlank(), onClick = onSave)
}
Text(
text = "${state.editor} ${state.path.ifBlank { "<new file>" }}",
@@ -72,7 +76,7 @@ fun TextEditorDialog(
onValueChange = onSaveAsPathChange,
modifier = Modifier.fillMaxWidth(),
singleLine = true,
label = { Text("Save As") },
label = { Text("File name") },
)
BasicTextField(
value = state.content,