mirror of
https://github.com/mrusme/neonmodem.git
synced 2025-01-03 14:56:41 -05:00
Adjusted UI
This commit is contained in:
parent
ede460bf79
commit
fc51f619b9
@ -36,7 +36,7 @@ var (
|
|||||||
BorderBottom(false)
|
BorderBottom(false)
|
||||||
|
|
||||||
dialogBoxStyle = lipgloss.NewStyle().
|
dialogBoxStyle = lipgloss.NewStyle().
|
||||||
Border(lipgloss.RoundedBorder()).
|
Border(lipgloss.NormalBorder()).
|
||||||
BorderForeground(lipgloss.Color("#874BFD")).
|
BorderForeground(lipgloss.Color("#874BFD")).
|
||||||
Padding(1, 0).
|
Padding(1, 0).
|
||||||
BorderTop(true).
|
BorderTop(true).
|
||||||
@ -66,8 +66,8 @@ var (
|
|||||||
Padding(0, 1)
|
Padding(0, 1)
|
||||||
|
|
||||||
replyAuthorStyle = lipgloss.NewStyle().
|
replyAuthorStyle = lipgloss.NewStyle().
|
||||||
Foreground(lipgloss.Color("#FFFFFF")).
|
Foreground(lipgloss.Color("#000000")).
|
||||||
Background(lipgloss.Color("#888B7E")).
|
Background(lipgloss.Color("#874BFD")).
|
||||||
Padding(0, 1)
|
Padding(0, 1)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -194,14 +194,14 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
|
|
||||||
var cmd tea.Cmd
|
var cmd tea.Cmd
|
||||||
|
|
||||||
if m.focused == 0 {
|
if m.viewportOpen == false {
|
||||||
listStyle.BorderForeground(lipgloss.Color("#FFFFFF"))
|
// listStyle.BorderForeground(lipgloss.Color("#FFFFFF"))
|
||||||
viewportStyle.BorderForeground(lipgloss.Color("#874BFD"))
|
// viewportStyle.BorderForeground(lipgloss.Color("#874BFD"))
|
||||||
m.list, cmd = m.list.Update(msg)
|
m.list, cmd = m.list.Update(msg)
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
} else if m.focused == 1 {
|
} else if m.viewportOpen == true {
|
||||||
listStyle.BorderForeground(lipgloss.Color("#874BFD"))
|
// listStyle.BorderForeground(lipgloss.Color("#874BFD"))
|
||||||
viewportStyle.BorderForeground(lipgloss.Color("#FFFFFF"))
|
// viewportStyle.BorderForeground(lipgloss.Color("#FFFFFF"))
|
||||||
m.viewport, cmd = m.viewport.Update(msg)
|
m.viewport, cmd = m.viewport.Update(msg)
|
||||||
cmds = append(cmds, cmd)
|
cmds = append(cmds, cmd)
|
||||||
}
|
}
|
||||||
@ -291,11 +291,12 @@ func (m *Model) renderViewport(post *post.Post) string {
|
|||||||
body = reply.Body
|
body = reply.Body
|
||||||
}
|
}
|
||||||
vp = fmt.Sprintf(
|
vp = fmt.Sprintf(
|
||||||
"%s\n\n %s\n%s",
|
"%s\n\n %s %s\n%s",
|
||||||
vp,
|
vp,
|
||||||
replyAuthorStyle.Render(
|
replyAuthorStyle.Render(
|
||||||
fmt.Sprintf("%s writes:", reply.Author.Name),
|
reply.Author.Name,
|
||||||
),
|
),
|
||||||
|
lipgloss.NewStyle().Foreground(lipgloss.Color("#874BFD")).Render("writes:"),
|
||||||
body,
|
body,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user