feat: move a card between statuses #3
4 changed files with 19 additions and 16 deletions
|
@ -45,7 +45,6 @@ func Open(path string) (Board, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return board, nil
|
return board, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,16 @@ func (u *UI) newColumn(statusID int, statusName string) column {
|
||||||
cards.SetWrapAround(false)
|
cards.SetWrapAround(false)
|
||||||
|
|
||||||
cards.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
cards.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
||||||
if event.Rune() == 'h' || event.Key() == tcell.KeyLeft {
|
switch event.Rune() {
|
||||||
|
case 'q':
|
||||||
|
u.pages.ShowPage(quitPageName)
|
||||||
|
u.SetFocus(u.quit)
|
||||||
|
case 'a':
|
||||||
|
u.pages.ShowPage(addPageName)
|
||||||
|
u.SetFocus(u.add)
|
||||||
|
case 'h':
|
||||||
u.shiftColumnFocus(shiftLeft)
|
u.shiftColumnFocus(shiftLeft)
|
||||||
} else if event.Rune() == 'l' || event.Key() == tcell.KeyRight {
|
case 'l':
|
||||||
u.shiftColumnFocus(shiftRight)
|
u.shiftColumnFocus(shiftRight)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,14 +65,11 @@ func (u *UI) init() {
|
||||||
u.pages.AddPage(addPageName, u.add, false, false)
|
u.pages.AddPage(addPageName, u.add, false, false)
|
||||||
|
|
||||||
u.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
u.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
|
||||||
if event.Rune() == 'q' {
|
switch event.Rune() {
|
||||||
u.pages.ShowPage(quitPageName)
|
case 'o':
|
||||||
u.SetFocus(u.quit)
|
if u.flex.HasFocus() && len(u.columns) == 0 {
|
||||||
} else if event.Rune() == 'o' {
|
|
||||||
u.openBoard("")
|
u.openBoard("")
|
||||||
} else if event.Rune() == 'a' {
|
}
|
||||||
u.pages.ShowPage(addPageName)
|
|
||||||
u.SetFocus(u.add)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return event
|
return event
|
||||||
|
|
Loading…
Reference in a new issue