Add terminal input onboarding bubble
This commit is contained in:
@@ -77,6 +77,7 @@ fun GitHugApp() {
|
||||
var gitMessageEditorState by remember { mutableStateOf<GitMessageEditorState?>(null) }
|
||||
var manPageState by remember { mutableStateOf<ManPageState?>(null) }
|
||||
var solvedCelebrationTitle by remember { mutableStateOf<String?>(null) }
|
||||
var showTerminalInputHint by remember { mutableStateOf(true) }
|
||||
val currentLevel = levels[currentLevelIndex]
|
||||
|
||||
LaunchedEffect(solvedCelebrationTitle) {
|
||||
@@ -412,6 +413,7 @@ fun GitHugApp() {
|
||||
val raw = submittedText.trim()
|
||||
if (raw.isBlank()) return
|
||||
|
||||
showTerminalInputHint = false
|
||||
suppressedImeEcho = submittedText
|
||||
clearCommandInput(recreateField = true)
|
||||
|
||||
@@ -509,6 +511,8 @@ fun GitHugApp() {
|
||||
output = output,
|
||||
inputFieldVersion = inputFieldVersion,
|
||||
commandInput = commandInput,
|
||||
showInputHint = showTerminalInputHint,
|
||||
onInputHintDismiss = { showTerminalInputHint = false },
|
||||
onValueChange = {
|
||||
val blockedEcho = suppressedImeEcho
|
||||
if (blockedEcho != null && commandInput.text.isEmpty()) {
|
||||
@@ -518,6 +522,9 @@ fun GitHugApp() {
|
||||
}
|
||||
}
|
||||
suppressedImeEcho = null
|
||||
if (it.text.isNotEmpty()) {
|
||||
showTerminalInputHint = false
|
||||
}
|
||||
commandInput = it
|
||||
},
|
||||
onRun = { runCommand() },
|
||||
|
||||
Reference in New Issue
Block a user