feat: delete cards #6

Closed
dananglin wants to merge 35 commits from delete-cards into main
4 changed files with 19 additions and 16 deletions
Showing only changes of commit 283da856ff - Show all commits

View file

@ -45,7 +45,6 @@ func Open(path string) (Board, error) {
}
}
return board, nil
}

View file

@ -22,9 +22,16 @@ func (u *UI) newColumn(statusID int, statusName string) column {
cards.SetWrapAround(false)
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)
} else if event.Rune() == 'l' || event.Key() == tcell.KeyRight {
case 'l':
u.shiftColumnFocus(shiftRight)
}

View file

@ -65,14 +65,11 @@ func (u *UI) init() {
u.pages.AddPage(addPageName, u.add, false, false)
u.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
if event.Rune() == 'q' {
u.pages.ShowPage(quitPageName)
u.SetFocus(u.quit)
} else if event.Rune() == 'o' {
switch event.Rune() {
case 'o':
if u.flex.HasFocus() && len(u.columns) == 0 {
u.openBoard("")
} else if event.Rune() == 'a' {
u.pages.ShowPage(addPageName)
u.SetFocus(u.add)
}
}
return event