changed snippet picker opotions to use Buttons

using a sheet thats small by default
This commit is contained in:
neon443
2025-08-04 13:06:18 +01:00
parent 5a377eb8d9
commit 5f0df4f564
2 changed files with 12 additions and 9 deletions

View File

@@ -22,18 +22,19 @@ struct SnippetPicker: View {
.monospaced()
}
ForEach(hostsManager.snippets) { snip in
Text(snip.name)
.onTapGesture {
dismiss()
callback?(snip)
}
Button(snip.name) {
dismiss()
callback?(snip)
}
}
}
.toolbar {
Button() {
dismiss()
} label: {
Image(systemName: "xmark")
ToolbarItem(placement: .topBarLeading) {
Button() {
dismiss()
} label: {
Image(systemName: "xmark")
}
}
}
.listStyle(.grouped)

View File

@@ -87,6 +87,8 @@ struct ShellTabView: View {
SnippetPicker(hostsManager: hostsManager) {
container.sessions[selectedID ?? UUID()]?.handler.writeToChannel($0.content)
}
.presentationDragIndicator(.visible)
.presentationDetents([.fraction(0.4), .large])
}
}
.padding(.horizontal, 10)