mirror of
				https://github.com/TeaOSLab/EdgeAdmin.git
				synced 2025-11-04 13:10:26 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			25 lines
		
	
	
		
			579 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			579 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package servers
 | 
						|
 | 
						|
import (
 | 
						|
	"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
 | 
						|
	"github.com/iwind/TeaGo/actions"
 | 
						|
)
 | 
						|
 | 
						|
type Helper struct {
 | 
						|
}
 | 
						|
 | 
						|
func NewHelper() *Helper {
 | 
						|
	return &Helper{}
 | 
						|
}
 | 
						|
 | 
						|
func (this *Helper) BeforeAction(action *actions.ActionObject) {
 | 
						|
	action.Data["teaMenu"] = "servers"
 | 
						|
 | 
						|
	selectedTabbar, _ := action.Data["mainTab"]
 | 
						|
 | 
						|
	tabbar := actionutils.NewTabbar()
 | 
						|
	tabbar.Add("服务", "", "/servers", "", selectedTabbar == "server")
 | 
						|
	tabbar.Add("组件", "", "/servers/components", "", selectedTabbar == "component")
 | 
						|
	actionutils.SetTabbar(action, tabbar)
 | 
						|
}
 |