Fix Permission-denied: gehaertetes Terminal-Eingabefeld ohne Text-Ersetzung, Banner-Tipp, Doku

This commit is contained in:
x3
2026-09-21 23:38:52 +02:00
parent ebb838b6b1
commit 37a70edbab
4 changed files with 134 additions and 11 deletions
@@ -41,6 +41,10 @@ struct EmbeddedTerminalView: View {
Text(lastMessage)
.font(.caption).foregroundStyle(Dracula.foreground)
.lineLimit(3)
if lastMessage.localizedCaseInsensitiveContains("permission denied") {
Text("Tipp: Passwort im Auge-Modus eingeben, auf Tastaturlayout (z. B. Z/Y) achten, Keychain-Eintrag prüfen.")
.font(.caption).foregroundStyle(Dracula.orange)
}
}
Spacer()
Button("Bericht kopieren") { copyReport() }
@@ -61,16 +65,17 @@ struct EmbeddedTerminalView: View {
// Eingabezeile
HStack(spacing: 6) {
Text("❯").font(.system(.body, design: .monospaced)).foregroundStyle(Dracula.green)
if secureInput {
SecureField("Eingabe (versteckt, z. B. Passwort) …", text: $input, onCommit: submit)
.textFieldStyle(.plain)
.font(.system(.body, design: .monospaced))
.foregroundStyle(Dracula.foreground)
} else {
TextField("Eingabe …", text: $input, onCommit: submit)
.textFieldStyle(.plain)
.font(.system(.body, design: .monospaced))
.foregroundStyle(Dracula.foreground)
// Gehärtetes Feld: keine macOS-Text-Ersetzungen (Passwort-Sonderzeichen!)
ZStack(alignment: .leading) {
if input.isEmpty {
Text(secureInput ? "Eingabe (versteckt, z. B. Passwort) …" : "Eingabe …")
.font(.system(.body, design: .monospaced))
.foregroundStyle(Dracula.comment.opacity(0.7))
.allowsHitTesting(false)
}
TerminalInputField(text: $input, isSecure: secureInput, onSubmit: submit)
.id(secureInput)
.frame(height: 22)
}
Button(action: { secureInput.toggle() }) {
Image(systemName: secureInput ? "eye.slash" : "eye")