Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions internal/tui/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@ package tui

import "time"

const (
// --- Panel Names ---
panelZero = "Main"
panelOne = "Status"
panelTwo = "Files"
panelThree = "Branches"
panelFour = "Commits"
panelFive = "Stash"
panelSix = "Logs"
)

const (
// --- Layout Ratios ---
// leftPanelWidthRatio defines the percentage of the total width for the left column.
Expand Down
7 changes: 5 additions & 2 deletions internal/tui/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
zone "github.com/lrstanley/bubblezone"
)


// ansiRegex is used to strip ANSI escape codes from strings.
var ansiRegex = regexp.MustCompile(`\x1b\[[0-9;]*m`)

Expand Down Expand Up @@ -106,10 +107,12 @@ func (m Model) renderMainView() string {
leftpanels := []Panel{StatusPanel, FilesPanel, BranchesPanel, CommitsPanel, StashPanel}
rightpanels := []Panel{MainPanel, SecondaryPanel}


titles := map[Panel]string{
MainPanel: "Main", StatusPanel: "Status", FilesPanel: "Files",
BranchesPanel: "Branches", CommitsPanel: "Commits", StashPanel: "Stash", SecondaryPanel: "Command History",
MainPanel: panelZero, StatusPanel: panelOne, FilesPanel: panelTwo,
BranchesPanel: panelThree, CommitsPanel: panelFive, StashPanel: panelFive, SecondaryPanel: panelSix,
}


leftColumn := m.renderPanelColumn(leftpanels, titles, leftSectionWidth)
rightColumn := m.renderPanelColumn(rightpanels, titles, rightSectionWidth)
Expand Down