|
@@ -16,6 +16,9 @@ import (
|
|
|
"github.com/charmbracelet/lipgloss"
|
|
"github.com/charmbracelet/lipgloss"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+// Type and Style definitions -------------------------------------------------
|
|
|
|
|
+// ----------------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
// [lipgloss] style definitions, stores the currently displayed "widget"
|
|
// [lipgloss] style definitions, stores the currently displayed "widget"
|
|
|
var (
|
|
var (
|
|
|
titleStyle = lipgloss.NewStyle().
|
|
titleStyle = lipgloss.NewStyle().
|
|
@@ -62,6 +65,9 @@ type Model struct {
|
|
|
// viewport viewport.Model
|
|
// viewport viewport.Model
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// Main model definitions -----------------------------------------------------
|
|
|
|
|
+// ----------------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
// The bubbletea init function
|
|
// The bubbletea init function
|
|
|
func (m Model) Init() tea.Cmd { return m.load }
|
|
func (m Model) Init() tea.Cmd { return m.load }
|
|
|
|
|
|
|
@@ -150,6 +156,9 @@ func (m Model) View() string {
|
|
|
return output
|
|
return output
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// Create widget definitions --------------------------------------------------
|
|
|
|
|
+// ----------------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
type issueCreate struct {
|
|
type issueCreate struct {
|
|
|
focusedField int
|
|
focusedField int
|
|
|
inputs []textinput.Model
|
|
inputs []textinput.Model
|
|
@@ -195,6 +204,9 @@ func (c issueCreate) update(msg tea.Msg) (issueCreate, tea.Cmd) {
|
|
|
|
|
|
|
|
func (c issueCreate) view() tea.Msg { return "testing" }
|
|
func (c issueCreate) view() tea.Msg { return "testing" }
|
|
|
|
|
|
|
|
|
|
+// tea.Cmd definitions --------------------------------------------------------
|
|
|
|
|
+// ----------------------------------------------------------------------------
|
|
|
|
|
+
|
|
|
// Handles load logic
|
|
// Handles load logic
|
|
|
func (m Model) load() tea.Msg {
|
|
func (m Model) load() tea.Msg {
|
|
|
if IsIssue(m.Path) {
|
|
if IsIssue(m.Path) {
|