Initial commit (code only without large binaries)

This commit is contained in:
robin
2026-02-15 18:58:44 +08:00
commit 35df75498f
9442 changed files with 1495866 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
package settingutils
import (
"github.com/TeaOSLab/EdgeUser/internal/web/actions/actionutils"
"github.com/iwind/TeaGo/actions"
)
type Helper struct {
tab string
}
func NewHelper(tab string) *Helper {
return &Helper{
tab: tab,
}
}
func (this *Helper) BeforeAction(actionPtr actions.ActionWrapper) (goNext bool) {
goNext = true
var action = actionPtr.Object()
// 左侧菜单
action.Data["teaMenu"] = "settings"
// 标签栏
tabbar := actionutils.NewTabbar()
tabbar.Add("个人资料", "", "/settings/profile", "", this.tab == "profile")
tabbar.Add("实名认证", "", "/settings/identity", "", this.tab == "identity")
tabbar.Add("多因子认证", "", "/settings/mfa", "", this.tab == "mfa")
tabbar.Add("登录设置", "", "/settings/login", "", this.tab == "login")
actionutils.SetTabbar(actionPtr, tabbar)
return
}