diff options
| -rw-r--r-- | internal/client/ui/core/chat/chat.go | 6 | ||||
| -rw-r--r-- | internal/client/ui/viminput/viminput.go | 20 |
2 files changed, 17 insertions, 9 deletions
diff --git a/internal/client/ui/core/chat/chat.go b/internal/client/ui/core/chat/chat.go index d1f0e8b..4e0466e 100644 --- a/internal/client/ui/core/chat/chat.go +++ b/internal/client/ui/core/chat/chat.go @@ -51,13 +51,13 @@ var ( Foreground(colors.LightGray).Padding(0, PaddingCount, 1). AlignHorizontal(lipgloss.Center).AlignVertical(lipgloss.Bottom). SetString("This frequency has no messages, start transmiting!") - NoAccess = NoMessages.SetString("You do not have permissions to see messages in this frequency") + NoAccess = NoMessages.SetString("You do not have permission to see messages in this frequency") SelectedGap = lipgloss.NewStyle().Background(colors.BackgroundDim) SendMessagePlaceholder = "Send a message..." - ReadOnlyPlaceholder = "You do not have permissions to send messages in this frequency" - MutedPlaceholder = "You have been muted by a server adminstrator" + ReadOnlyPlaceholder = "You do not have permission to send messages in this frequency" + MutedPlaceholder = "You have been muted by a network adminstrator" EditedIndicator = lipgloss.NewStyle(). Foreground(colors.LightGray).SetString(" (edited)").String() diff --git a/internal/client/ui/viminput/viminput.go b/internal/client/ui/viminput/viminput.go index 89f0d8d..53ba046 100644 --- a/internal/client/ui/viminput/viminput.go +++ b/internal/client/ui/viminput/viminput.go @@ -116,6 +116,8 @@ func (m Model) View() string { cursorStyle = InactiveCursorStyle } + m.PlaceholderStyle = m.PlaceholderStyle.Width(m.width) + var builder strings.Builder switch m.mode { case NormalMode, InsertMode, OpendingMode: @@ -125,9 +127,11 @@ func (m Model) View() string { } if len(m.lines) == 1 && len(line) == 0 && m.Placeholder != "" { - cursorChar := m.PlaceholderStyle.Render(m.Placeholder[0:1]) + cursorChar := cursorStyle. + Foreground(m.PlaceholderStyle.GetForeground()). + Render(m.Placeholder[0:1]) rest := m.PlaceholderStyle.Render(m.Placeholder[1:]) - builder.WriteString(cursorStyle.Render(cursorChar)) + builder.WriteString(cursorChar) builder.WriteString(rest) builder.WriteByte('\n') continue @@ -155,9 +159,11 @@ func (m Model) View() string { } if len(m.lines) == 1 && len(line) == 0 && m.Placeholder != "" { - cursorChar := m.PlaceholderStyle.Render(m.Placeholder[0:1]) + cursorChar := cursorStyle. + Foreground(m.PlaceholderStyle.GetForeground()). + Render(m.Placeholder[0:1]) rest := m.PlaceholderStyle.Render(m.Placeholder[1:]) - builder.WriteString(cursorStyle.Render(cursorChar)) + builder.WriteString(cursorChar) builder.WriteString(rest) builder.WriteByte('\n') continue @@ -261,9 +267,11 @@ func (m Model) View() string { } if len(m.lines) == 1 && len(line) == 0 && m.Placeholder != "" { - cursorChar := m.PlaceholderStyle.Render(m.Placeholder[0:1]) + cursorChar := cursorStyle. + Foreground(m.PlaceholderStyle.GetForeground()). + Render(m.Placeholder[0:1]) rest := m.PlaceholderStyle.Render(m.Placeholder[1:]) - builder.WriteString(cursorStyle.Render(cursorChar)) + builder.WriteString(cursorChar) builder.WriteString(rest) builder.WriteByte('\n') continue |
