@@ -107,16 +107,23 @@ func (v *WelcomeView) Render() string {
107107 // Version info
108108 version := center .Render (styles .Muted .Render (constants .Version + " • " + constants .Repository ))
109109
110- // Update notification
110+ // Update notification — bordered block with update + hint
111111 var updateNotice string
112112 if v .newVersion != "" {
113- notice := fmt .Sprintf ("Update available: %s (current: %s)" , v .newVersion , constants .Version )
114- updateNotice = center . Render ( styles . Accent . Render ( notice ))
113+ notice := fmt .Sprintf (constants . UpdateNoticeFormat , v .newVersion , constants .Version )
114+ hintRaw := constants . UpdateNoticeHintCopy
115115 if v .copied {
116- updateNotice += "\n " + center .Render (styles .Muted .Render ("Copied to clipboard!" ))
117- } else {
118- updateNotice += "\n " + center .Render (styles .Muted .Render ("Press c to copy update command" ))
116+ hintRaw = constants .UpdateNoticeCopied
119117 }
118+ hint := styles .Muted .Render (hintRaw )
119+ blockWidth := lipgloss .Width (notice )
120+ if w := lipgloss .Width (hintRaw ); w > blockWidth {
121+ blockWidth = w
122+ }
123+ blockWidth += 4 // padding
124+ content := styles .UpdateNoticeText .Render (notice ) + "\n " + hint
125+ block := styles .UpdateNotice .Width (blockWidth ).Render (content )
126+ updateNotice = center .Render (block )
120127 }
121128
122129 // Footer help
@@ -125,7 +132,7 @@ func (v *WelcomeView) Render() string {
125132 {Key : constants .HelpKeyCtrlC , Desc : constants .HelpDescQuit },
126133 }
127134 if v .newVersion != "" {
128- helpItems = append (helpItems , components.HelpItem {Key : "c" , Desc : "copy update cmd" })
135+ helpItems = append (helpItems , components.HelpItem {Key : constants . HelpKeyC , Desc : constants . HelpDescCopyUpdateCmd })
129136 }
130137 footer := components .FooterHelp (helpItems )
131138
@@ -173,7 +180,7 @@ func (v *WelcomeView) GetHelpItems() []components.HelpItem {
173180 {Key : constants .HelpKeyCtrlC , Desc : constants .HelpDescQuit },
174181 }
175182 if v .newVersion != "" {
176- items = append (items , components.HelpItem {Key : "c" , Desc : "copy update cmd" })
183+ items = append (items , components.HelpItem {Key : constants . HelpKeyC , Desc : constants . HelpDescCopyUpdateCmd })
177184 }
178185 return items
179186}
0 commit comments