This commit is contained in:
+21
-20
@@ -1,9 +1,3 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
package gitctl
|
||||
|
||||
import "github.com/charmbracelet/lipgloss"
|
||||
@@ -15,14 +9,18 @@ var (
|
||||
colorDim = lipgloss.Color("245")
|
||||
colorAccent = lipgloss.Color("39")
|
||||
|
||||
|
||||
frame = lipgloss.NewStyle().
|
||||
Border(lipgloss.RoundedBorder()).
|
||||
BorderForeground(colorDim).
|
||||
Padding(0, 1)
|
||||
|
||||
titleStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
navigationPaneStyle = lipgloss.NewStyle().
|
||||
Border(lipgloss.NormalBorder(), false, true, false, false).
|
||||
BorderForeground(lipgloss.Color("238")).
|
||||
Padding(1, 1)
|
||||
detailPaneStyle = lipgloss.NewStyle().Padding(1, 2)
|
||||
|
||||
titleStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
|
||||
statusOK = lipgloss.NewStyle().Foreground(colorGreen).Bold(true)
|
||||
statusBad = lipgloss.NewStyle().Foreground(colorRed).Bold(true)
|
||||
@@ -32,7 +30,6 @@ var (
|
||||
selectedStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
hintStyle = lipgloss.NewStyle().Foreground(colorDim)
|
||||
|
||||
|
||||
labelStyle = lipgloss.NewStyle().Foreground(colorDim).Width(12)
|
||||
focusedLabelStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent).Width(12)
|
||||
inputStyle = lipgloss.NewStyle().Foreground(colorYellow)
|
||||
@@ -41,29 +38,33 @@ var (
|
||||
permActiveStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
errStyle = lipgloss.NewStyle().Foreground(colorRed)
|
||||
|
||||
|
||||
resultOKStyle = lipgloss.NewStyle().Foreground(colorGreen).Bold(true)
|
||||
resultInfoStyle = lipgloss.NewStyle().Foreground(colorYellow).Bold(true)
|
||||
resultErrStyle = lipgloss.NewStyle().Foreground(colorRed).Bold(true)
|
||||
warnStyle = lipgloss.NewStyle().Foreground(colorYellow).Bold(true)
|
||||
|
||||
|
||||
tabStyle = lipgloss.NewStyle().Foreground(colorDim)
|
||||
tabActiveStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
|
||||
tabStyle = lipgloss.NewStyle().Foreground(colorDim).Padding(0, 1)
|
||||
tabActiveStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent).
|
||||
Background(lipgloss.Color("235")).Padding(0, 1)
|
||||
|
||||
badgeOK = lipgloss.NewStyle().Foreground(colorGreen).Bold(true)
|
||||
badgeWarn = lipgloss.NewStyle().Foreground(colorYellow)
|
||||
badgeDim = lipgloss.NewStyle().Foreground(colorDim)
|
||||
|
||||
|
||||
detailTitleStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
fieldLabelStyle = lipgloss.NewStyle().Foreground(colorDim)
|
||||
fieldValueStyle = lipgloss.NewStyle()
|
||||
actionKeyStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
|
||||
detailTitleStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
detailEyebrowStyle = lipgloss.NewStyle().Bold(true).Foreground(colorDim)
|
||||
detailNameStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
detailFieldLabelStyle = lipgloss.NewStyle().Foreground(colorDim).Width(14)
|
||||
cloneURLStyle = lipgloss.NewStyle().Foreground(colorGreen)
|
||||
fieldLabelStyle = lipgloss.NewStyle().Foreground(colorDim)
|
||||
fieldValueStyle = lipgloss.NewStyle()
|
||||
actionKeyStyle = lipgloss.NewStyle().Bold(true).Foreground(colorAccent)
|
||||
|
||||
permPillRead = lipgloss.NewStyle().Foreground(colorDim)
|
||||
permPillWrite = lipgloss.NewStyle().Foreground(colorYellow).Bold(true)
|
||||
permPillAdmin = lipgloss.NewStyle().Foreground(colorGreen).Bold(true)
|
||||
)
|
||||
|
||||
func fullScreenFrame(width, height int) lipgloss.Style {
|
||||
return frame.Width(max(width-4, 1)).Height(max(height-4, 1))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user