adding assignee for tui

This commit is contained in:
viljarb
2026-03-11 21:23:07 +01:00
parent 7ceb0929c5
commit 0b4e33b28f
15 changed files with 184 additions and 16 deletions

View File

@@ -118,6 +118,22 @@ func RenderChoosePriority(width, height int, issueID string) string {
return lipgloss.Place(width, height, lipgloss.Center, lipgloss.Center, priorityBox)
}
func RenderEditAssignee(width, height int, inputView string) string {
if width < 5 || height < 5 {
return ""
}
editBoxWidth := modalBoxWidth(60, width)
editContent := lipgloss.JoinVertical(lipgloss.Left,
styles.LabelStyle.Render("Edit assignee (Enter to save, Esc to cancel):"),
inputView,
)
editBox := styles.ContainerStyle.
Width(editBoxWidth).
BorderForeground(styles.PrimaryBorder).
Render(editContent)
return lipgloss.Place(width, height, lipgloss.Center, lipgloss.Center, editBox)
}
func RenderChooseType(width, height int, issueID string) string {
if width < 5 || height < 5 {
return ""
@@ -148,6 +164,7 @@ func RenderModals(
choosingStatus bool, statusIssueID string,
choosingPriority bool, priorityIssueID string,
choosingType bool, typeIssueID string,
editingAssignee bool, assigneeInputView string,
mainView string,
) string {
if editingTitle {
@@ -178,6 +195,10 @@ func RenderModals(
return RenderChooseType(width, height, typeIssueID)
}
if editingAssignee {
return RenderEditAssignee(width, height, assigneeInputView)
}
return mainView
}