fix ctrl+c thing
This commit is contained in:
parent
4c37f429a8
commit
93836671c6
@ -360,21 +360,37 @@ func _main() error {
|
||||
|
||||
o := opts{
|
||||
Username: u.Username,
|
||||
Style: darkbg,
|
||||
}
|
||||
|
||||
fmt.Printf("\t\t^_^_^_^_^_^_^ hi ~%s ^_^_^_^_^_^_^\n", o.Username)
|
||||
b, err := banner()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println(o.Style.Render(b))
|
||||
|
||||
fmt.Print(o.Style.Render(fmt.Sprintf("\t\t^_^_^_^_^_^_^ hi ~%s ^_^_^_^_^_^_^\n", o.Username)))
|
||||
fmt.Println()
|
||||
|
||||
var mode string
|
||||
|
||||
huh.NewSelect[string]().Title("whuddyu wanna doo?").
|
||||
Options(
|
||||
huh.NewOption("Get an info dump", "info"),
|
||||
huh.NewOption("RSVP", "rsvp"),
|
||||
huh.NewOption("Submit or propose a work (talk, art, etc)", "submit"),
|
||||
huh.NewOption("Propose a creative jam", "jam"),
|
||||
huh.NewOption("Quit", "quit"),
|
||||
).Value(&mode).Run()
|
||||
// NB: this could be a standalone prompt but when it is, ctrl+c behavior is goofed up.
|
||||
form := huh.NewForm(
|
||||
huh.NewGroup(
|
||||
huh.NewSelect[string]().Title("whadduyu wanna doo?").
|
||||
Options(
|
||||
huh.NewOption("Get an info dump", "info"),
|
||||
huh.NewOption("RSVP", "rsvp"),
|
||||
huh.NewOption("Submit or propose a work (talk, art, etc)", "submit"),
|
||||
huh.NewOption("Propose a creative jam", "jam"),
|
||||
huh.NewOption("Quit", "quit"),
|
||||
).Value(&mode)))
|
||||
|
||||
err = form.Run()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
switch mode {
|
||||
case "info":
|
||||
|
Loading…
x
Reference in New Issue
Block a user