mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 05:19:13 +00:00
changed snippet picker opotions to use Buttons
using a sheet thats small by default
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user