Преглед изворни кода

fix(tui): visual tweaks to themes

adamdottv пре 8 месеци
родитељ
комит
9081e17fcc

+ 1 - 1
packages/tui/internal/components/dialog/theme.go

@@ -89,8 +89,8 @@ func (t *themeDialog) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 
 	if item, newIdx := t.list.GetSelectedItem(); newIdx >= 0 && newIdx != prevIdx {
 		theme.SetTheme(item.name)
+		return t, util.CmdHandler(ThemeSelectedMsg{ThemeName: item.name})
 	}
-
 	return t, cmd
 }
 

+ 1 - 1
packages/tui/internal/components/modal/modal.go

@@ -114,7 +114,7 @@ func (m *Modal) Render(contentView string, background string) string {
 		titleLine := m.title + spacer + escText
 		titleLine = titleStyle.Render(titleLine)
 
-		finalContent = strings.Join([]string{titleLine, contentView}, "\n") + "\n"
+		finalContent = strings.Join([]string{titleLine, "", contentView}, "\n")
 	} else {
 		finalContent = contentView
 	}