feat: move a card between statuses #3
1 changed files with 6 additions and 6 deletions
|
@ -21,7 +21,6 @@ const (
|
|||
addPageName string = "add"
|
||||
)
|
||||
|
||||
// UI does some magical stuff.
|
||||
type UI struct {
|
||||
*tview.Application
|
||||
|
||||
|
@ -50,12 +49,12 @@ func NewUI() UI {
|
|||
return u
|
||||
}
|
||||
|
||||
// closeBoard closes the BoltDB database.
|
||||
// closeBoard closes the board.
|
||||
func (u *UI) closeBoard() {
|
||||
_ = u.board.Close()
|
||||
}
|
||||
|
||||
// init the UI.
|
||||
// init initialises the UI.
|
||||
func (u *UI) init() {
|
||||
u.pages.AddPage(mainPageName, u.flex, true, true)
|
||||
|
||||
|
@ -82,6 +81,7 @@ func (u *UI) init() {
|
|||
u.SetRoot(u.pages, true)
|
||||
}
|
||||
|
||||
// initAddInputModal initialises the add input modal.
|
||||
func (u *UI) initAddInputModal() {
|
||||
doneFunc := func(text string, success bool) {
|
||||
if success {
|
||||
|
@ -111,7 +111,7 @@ func (u *UI) initQuitModal() {
|
|||
SetDoneFunc(quitDoneFunc)
|
||||
}
|
||||
|
||||
// newCard creates a new card and saves it to the database.
|
||||
// newCard creates and saves a new card to the database.
|
||||
func (u *UI) newCard(title, content string) error {
|
||||
args := board.CardArgs{
|
||||
NewTitle: title,
|
||||
|
@ -127,7 +127,7 @@ func (u *UI) newCard(title, content string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// openBoard opens the kanban project.
|
||||
// openBoard opens the kanban board.
|
||||
func (u *UI) openBoard(path string) error {
|
||||
b, err := board.Open(path)
|
||||
if err != nil {
|
||||
|
@ -143,7 +143,7 @@ func (u *UI) openBoard(path string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// refresh the UI.
|
||||
// refresh refreshes the UI.
|
||||
func (u *UI) refresh() error {
|
||||
statusList, err := u.board.StatusList()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue