diff --git a/internal/ui/logo/logo.go b/internal/ui/logo/logo.go index fa7aa6f8c1548eb29d7f99352e2f23f31612e90c..dbfca152f339b0024cd1e18931a3785d7d9c52e7 100644 --- a/internal/ui/logo/logo.go +++ b/internal/ui/logo/logo.go @@ -148,10 +148,18 @@ func Render(base lipgloss.Style, version string, compact bool, o Opts) string { // SmallRender renders a smaller version of the Crush logo, suitable for // smaller windows or sidebar usage. -func SmallRender(t *styles.Styles, width int) string { - title := t.Logo.SmallCharm.Render("Charm™") - title = fmt.Sprintf("%s %s", title, styles.ApplyBoldForegroundGrad(t.Logo.GradCanvas, "Crush", t.Logo.SmallGradFromColor, t.Logo.SmallGradToColor)) - remainingWidth := width - lipgloss.Width(title) - 1 // 1 for the space after "Crush" +func SmallRender(t *styles.Styles, width int, o Opts) string { + name := "Crush" + if o.Hyper { + name = "HYPERCRUSH" + } + charm := "Charm™" + if !o.Hyper { + charm = " " + charm + } + title := t.Logo.SmallCharm.Render(charm) + title = fmt.Sprintf("%s %s", title, styles.ApplyBoldForegroundGrad(t.Logo.GradCanvas, name, t.Logo.SmallGradFromColor, t.Logo.SmallGradToColor)) + remainingWidth := width - lipgloss.Width(title) - 1 // 1 for the space after the name if remainingWidth > 0 { lines := strings.Repeat("╱", remainingWidth) title = fmt.Sprintf("%s %s", title, t.Logo.SmallDiagonals.Render(lines)) diff --git a/internal/ui/model/header.go b/internal/ui/model/header.go index 24af9e5ba622c74e3e3d81149197b58460e9fcb2..0859d0774b1928501a26adde6870efd54615d30c 100644 --- a/internal/ui/model/header.go +++ b/internal/ui/model/header.go @@ -45,8 +45,17 @@ func newHeader(com *common.Common) *header { // after the theme changes. func (h *header) refresh() { t := h.com.Styles - h.compactLogo = t.Header.Charm.Render("Charm™") + " " + - styles.ApplyBoldForegroundGrad(t.Header.LogoGradCanvas, "CRUSH", t.Header.LogoGradFromColor, t.Header.LogoGradToColor) + " " + isHyper := h.com.IsHyper() + charm := "Charm™" + if !isHyper { + charm = " " + charm + } + name := "CRUSH" + if isHyper { + name = "HYPERCRUSH" + } + h.compactLogo = t.Header.Charm.Render(charm) + " " + + styles.ApplyBoldForegroundGrad(t.Header.LogoGradCanvas, name, t.Header.LogoGradFromColor, t.Header.LogoGradToColor) + " " // Force drawHeader to re-render the wide logo on the next frame. h.width = 0 h.logo = "" diff --git a/internal/ui/model/sidebar.go b/internal/ui/model/sidebar.go index 7e81531499fb3c73f4778646decdc16877b59614..2f548628f24168bbe5f7d4d8390fc24e472f9559 100644 --- a/internal/ui/model/sidebar.go +++ b/internal/ui/model/sidebar.go @@ -142,7 +142,9 @@ func (m *UI) drawSidebar(scr uv.Screen, area uv.Rectangle) { cwd := common.PrettyPath(t, m.com.Workspace.WorkingDir(), width) sidebarLogo := m.sidebarLogo if height < logoHeightBreakpoint { - sidebarLogo = logo.SmallRender(m.com.Styles, width) + sidebarLogo = logo.SmallRender(m.com.Styles, width, logo.Opts{ + Hyper: m.com.IsHyper(), + }) } blocks := []string{ sidebarLogo,