26 lines
407 B
Go
26 lines
407 B
Go
package gui
|
|
|
|
import tea "github.com/charmbracelet/bubbletea"
|
|
|
|
func (m *model) updateCreate(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|
switch msg := msg.(type) {
|
|
|
|
// Is it a key press?
|
|
case tea.KeyMsg:
|
|
switch msg.String() {
|
|
case "ctrl+c", "q":
|
|
return m, tea.Quit
|
|
case "esc":
|
|
m.switchMode(Select)
|
|
}
|
|
}
|
|
|
|
return m, nil
|
|
}
|
|
|
|
func (m *model) viewCreate() string {
|
|
s := "Create a card:\n\n"
|
|
|
|
return s
|
|
}
|