mirror of
https://github.com/Gouryella/drip.git
synced 2026-02-26 22:31:35 +00:00
feat(protocol): Enhanced the heartbeat control mechanism of the frame writer
Added a heartbeatControl channel to support dynamic start/stop of the heartbeat function and optimized related resource management logic, ensuring that the heartbeat ticker can be correctly stopped and rebuilt. Also adjusted the field initialization order to ensure concurrency safety. fix(ui): Improved the tunnel connection status display style Updated the URL line display content, added the "(forwarded link)" prompt text; adjusted the style layout of the local forwarding address and prompt information, making the interface clearer and easier to read.
This commit is contained in:
@@ -57,9 +57,19 @@ func RenderTunnelConnected(status *TunnelStatus) string {
|
||||
lipgloss.NewStyle().MarginLeft(2).Render(typeBadge),
|
||||
)
|
||||
|
||||
urlLine := urlStyle.Copy().Foreground(accent).Render(status.URL)
|
||||
forwardLine := Muted("⇢ ") + valueStyle.Render(status.LocalAddr)
|
||||
hint := mutedStyle.Render("Ctrl+C to stop • reconnects automatically")
|
||||
urlLine := lipgloss.JoinHorizontal(
|
||||
lipgloss.Left,
|
||||
urlStyle.Copy().Foreground(accent).Render(status.URL),
|
||||
lipgloss.NewStyle().MarginLeft(1).Foreground(mutedColor).Render("(forwarded link)"),
|
||||
)
|
||||
|
||||
forwardLine := lipgloss.NewStyle().
|
||||
MarginLeft(2).
|
||||
Render(Muted("⇢ ") + valueStyle.Render(status.LocalAddr))
|
||||
|
||||
hint := lipgloss.NewStyle().
|
||||
Foreground(latencyOrangeColor).
|
||||
Render("Ctrl+C to stop • reconnects automatically")
|
||||
|
||||
content := lipgloss.JoinVertical(
|
||||
lipgloss.Left,
|
||||
|
||||
Reference in New Issue
Block a user