Task rename added. Closes #3

- Moved title of TaskDetail panel to separate component
- Refactored indentation, formatting
- Updated status bar
This commit is contained in:
Anis Ahmad
2020-07-11 07:48:16 +06:00
parent 1508edce6f
commit 533c28f8bc
7 changed files with 116 additions and 23 deletions

View File

@@ -63,7 +63,6 @@ func NewTaskPane(projectRepo repository.ProjectRepository, taskRepo repository.T
case tcell.KeyEsc:
app.SetFocus(pane)
}
})
pane.
@@ -196,6 +195,12 @@ func (pane *TaskPane) ClearCompletedTasks() {
statusBar.showForSeconds(fmt.Sprintf("[yellow]%d tasks cleared!", count), 5)
}
// ReloadCurrentTask Loads the current task - in Task details and listing
func (pane *TaskPane) ReloadCurrentTask() {
pane.list.SetItemText(pane.list.GetCurrentItem(), makeTaskListingTitle(*pane.activeTask), "")
taskDetailPane.SetTask(pane.activeTask)
}
func (pane TaskPane) setHintMessage() {
if len(projectPane.projects) == 0 {
pane.hint.SetText("Welcome to the organized life!\n------------------------------\n Create TaskList/Project at the bottom of Projects pane.\n (Press p,n) \n\nHelp - https://bit.ly/cli-task")