MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / initTabIfNeeded

Method initTabIfNeeded

internal/tui/app.go:303–326  ·  view source on GitHub ↗
(_ int)

Source from the content-addressed store, hash-verified

301}
302
303func (a *App) initTabIfNeeded(_ int) tea.Cmd {
304 if a.initialized[a.activeTab] {
305 return nil
306 }
307 a.initialized[a.activeTab] = true
308 switch a.activeTab {
309 case tabDashboard:
310 return a.dashboard.Init()
311 case tabConfig:
312 return a.config.Init()
313 case tabAuthFiles:
314 return a.auth.Init()
315 case tabAPIKeys:
316 return a.keys.Init()
317 case tabOAuth:
318 return a.oauth.Init()
319 case tabLogs:
320 if !a.logsEnabled {
321 return nil
322 }
323 return a.logs.Init()
324 }
325 return nil
326}
327
328func (a App) View() string {
329 if !a.authenticated {

Callers 1

UpdateMethod · 0.95

Calls 1

InitMethod · 0.45

Tested by

no test coverage detected