refactor(interaction): reduce cognitive complexity and centralize color constants
SonarQube Scan / SonarQube Trigger (push) Successful in 3m49s

This commit is contained in:
2026-01-27 13:43:18 +07:00
parent 7f4f448b47
commit d167508a55
4 changed files with 335 additions and 241 deletions
+19
View File
@@ -42,6 +42,25 @@ type model struct {
height int
}
const (
ColorPrimary = "#7D56F4"
ColorSecondary = "#04B575"
ColorGray = "#888888"
ColorDarkGray = "#666666"
ColorWhite = "#FAFAFA"
ColorError = "#FF0000"
ColorErrorBg = "#3D0000"
ColorWarning = "#FFA500"
ColorWarningBg = "#3D2000"
)
const (
BreakpointTiny = 50
BreakpointSmall = 60
BreakpointMedium = 70
BreakpointLarge = 85
)
func (m *model) getTunnelURL() string {
if m.tunnelType == types.TunnelTypeHTTP {
return buildURL(m.protocol, m.interaction.slug.String(), m.domain)