Documentation
¶
Index ¶
- func RenderDescription(textile string, width int) string
- func RunBrowser(issues []models.Issue, serverURL string) error
- func RunSearchBrowser(initialResults []models.SearchResult, initialQuery string, serverURL string, ...) error
- func RunSelector(title string, items []SelectItem) (string, error)
- func TextileToMarkdown(input string) string
- type BrowserModel
- type DetailPane
- type IssueFormData
- type KeyMap
- type SearchBrowserModel
- type SearchFunc
- type SelectItem
- type TimeEntryFormData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDescription ¶ added in v1.12.0
RenderDescription converts textile markup to styled terminal output.
func RunBrowser ¶
RunBrowser starts the interactive issue browser.
func RunSearchBrowser ¶
func RunSearchBrowser(initialResults []models.SearchResult, initialQuery string, serverURL string, searchFn SearchFunc) error
RunSearchBrowser starts the interactive search result browser.
func RunSelector ¶
func RunSelector(title string, items []SelectItem) (string, error)
RunSelector presents a selection list and returns the chosen value.
func TextileToMarkdown ¶ added in v1.12.0
TextileToMarkdown converts common Redmine textile markup to markdown.
Types ¶
type BrowserModel ¶
type BrowserModel struct {
// contains filtered or unexported fields
}
BrowserModel is the bubbletea model for the issue browser.
func NewBrowserModel ¶
func NewBrowserModel(issues []models.Issue, serverURL string) BrowserModel
NewBrowserModel creates a new browser model.
type DetailPane ¶ added in v1.12.0
type DetailPane struct {
// contains filtered or unexported fields
}
DetailPane is a scrollable detail pane with selectable fields.
func NewDetailPane ¶ added in v1.12.0
func NewDetailPane(serverURL string) DetailPane
NewDetailPane creates a new detail pane.
func (*DetailPane) SetIssueContent ¶ added in v1.12.0
func (d *DetailPane) SetIssueContent(issue *models.Issue)
SetIssueContent builds and sets the content for an issue.
func (*DetailPane) SetSearchContent ¶ added in v1.12.0
func (d *DetailPane) SetSearchContent(result *models.SearchResult)
SetSearchContent builds and sets the content for a search result.
func (*DetailPane) SetSize ¶ added in v1.12.0
func (d *DetailPane) SetSize(width, height int)
SetSize updates the pane dimensions and re-renders the description.
func (*DetailPane) Update ¶ added in v1.12.0
Update handles key events for field navigation, scrolling, and clipboard.
func (*DetailPane) ViewFocused ¶ added in v1.12.0
func (d *DetailPane) ViewFocused(focused bool) string
ViewFocused renders the detail pane. Pass focused=true to highlight the border.
type IssueFormData ¶
type IssueFormData struct {
Subject string
Description string
TrackerID string
PriorityID string
AssigneeID string
}
IssueFormData holds data collected from the issue creation form.
func RunIssueForm ¶
func RunIssueForm(trackers, priorities, assignees []SelectItem) (*IssueFormData, error)
RunIssueForm runs an interactive form for creating an issue.
type KeyMap ¶
type KeyMap struct {
Up key.Binding
Down key.Binding
Enter key.Binding
Back key.Binding
Filter key.Binding
Quit key.Binding
Help key.Binding
CopyID key.Binding
CopyURL key.Binding
ToggleFocus key.Binding
PageUp key.Binding
PageDown key.Binding
OpenBrowser key.Binding
}
KeyMap defines key bindings for the TUI.
type SearchBrowserModel ¶
type SearchBrowserModel struct {
// contains filtered or unexported fields
}
SearchBrowserModel is the bubbletea model for the search result browser.
func NewSearchBrowserModel ¶
func NewSearchBrowserModel(initialResults []models.SearchResult, initialQuery string, serverURL string, searchFn SearchFunc) SearchBrowserModel
NewSearchBrowserModel creates a new search browser model.
func (SearchBrowserModel) Init ¶
func (m SearchBrowserModel) Init() tea.Cmd
Init implements tea.Model.
func (SearchBrowserModel) View ¶
func (m SearchBrowserModel) View() string
View implements tea.Model.
type SearchFunc ¶ added in v1.12.0
type SearchFunc func(query string) ([]models.SearchResult, error)
SearchFunc performs a search and returns results.
type SelectItem ¶
SelectItem represents an item for selection.
type TimeEntryFormData ¶
TimeEntryFormData holds data collected from the time entry form.
func RunTimeEntryForm ¶
func RunTimeEntryForm(activities []SelectItem) (*TimeEntryFormData, error)
RunTimeEntryForm runs an interactive form for logging time.