repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
c9c12bb
parent
946bdf5
author
Eric Bower
date
2024-05-17 16:15:26 +0000 UTC
styles(tui): update input placeholder
4 files changed,  +5, -0
M tui/common/styles.go
+2, -0
 1@@ -39,6 +39,7 @@ type Styles struct {
 2 	HelpSection,
 3 	HelpDivider,
 4 	App,
 5+	InputPlaceholder,
 6 	RoundedBorder lipgloss.Style
 7 	Renderer *lipgloss.Renderer
 8 }
 9@@ -64,6 +65,7 @@ func DefaultStyles(renderer *lipgloss.Renderer) Styles {
10 	s.Error = renderer.NewStyle().Foreground(Red)
11 	s.Prompt = renderer.NewStyle().MarginRight(1).SetString(">")
12 	s.FocusedPrompt = s.Prompt.Copy().Foreground(Fuschia)
13+	s.InputPlaceholder = renderer.NewStyle().Foreground(Grey)
14 	s.Note = renderer.NewStyle().Foreground(Green)
15 	s.Delete = s.Error.Copy()
16 	s.Label = renderer.NewStyle().Foreground(Fuschia)
M tui/createaccount/create.go
+1, -0
1@@ -59,6 +59,7 @@ func NewModel(shared common.SharedModel) Model {
2 	im := input.New()
3 	im.Cursor.Style = shared.Styles.Cursor
4 	im.Placeholder = "enter username"
5+	im.PlaceholderStyle = shared.Styles.InputPlaceholder
6 	im.Prompt = shared.Styles.FocusedPrompt.String()
7 	im.CharLimit = 50
8 	im.Focus()
M tui/createkey/create.go
+1, -0
1@@ -84,6 +84,7 @@ func (m *Model) indexBackward() {
2 // NewModel returns a new username model in its initial state.
3 func NewModel(shared common.SharedModel) Model {
4 	im := input.New()
5+	im.PlaceholderStyle = shared.Styles.InputPlaceholder
6 	im.Cursor.Style = shared.Styles.Cursor
7 	im.Placeholder = "ssh-ed25519 AAAA..."
8 	im.Prompt = shared.Styles.FocusedPrompt.String()
M tui/createtoken/create.go
+1, -0
1@@ -52,6 +52,7 @@ func NewModel(shared common.SharedModel) Model {
2 	im := input.New()
3 	im.Cursor.Style = shared.Styles.Cursor
4 	im.Placeholder = "A name used for your reference"
5+	im.PlaceholderStyle = shared.Styles.InputPlaceholder
6 	im.Prompt = shared.Styles.FocusedPrompt.String()
7 	im.CharLimit = 256
8 	im.Focus()