Documentation
¶
Index ¶
- Constants
- Variables
- func AutoMigrateSession(db *gorm.DB, tablePrefix string) error
- func New(pb *presets.Builder) *login.Builder
- func NewAdvancedLoginPage(...) func(vh *login.ViewHelper, pb *presets.Builder) web.PageFunc
- func ValidateMaxLifetimeHook(maxLifeTime time.Duration) func(next ValidateSessionFunc) ValidateSessionFunc
- func ZxcvbnLogicComponent() HTMLComponent
- type AdvancedLoginPageConfig
- type CustomizeCompoFunc
- type LoginSession
- type Messages
- type OAuthProviderDisplay
- type Profile
- type ProfileBuilder
- func (b *ProfileBuilder) CustomizeButtons(...) *ProfileBuilder
- func (b *ProfileBuilder) DisableNotification(v bool) *ProfileBuilder
- func (b *ProfileBuilder) Install(pb *presets.Builder) error
- func (b *ProfileBuilder) LogoutURL(s string) *ProfileBuilder
- func (b *ProfileBuilder) NewCompo(evCtx *web.EventContext, idSuffix string) h.HTMLComponent
- func (b *ProfileBuilder) PrependCompos(...) *ProfileBuilder
- func (b *ProfileBuilder) SessionBuilder(lsb *SessionBuilder) *ProfileBuilder
- func (b *ProfileBuilder) WrapPrependCompo(w func(in CustomizeCompoFunc) CustomizeCompoFunc) *ProfileBuilder
- func (b *ProfileBuilder) WrapRenameCallback(w func(in RenameCallback) RenameCallback) *ProfileBuilder
- func (b *ProfileBuilder) WrapSubtitleCompo(w func(in CustomizeCompoFunc) CustomizeCompoFunc) *ProfileBuilder
- type ProfileCompo
- func (c *ProfileCompo) CompoID() string
- func (c *ProfileCompo) MarshalHTML(ctx context.Context) ([]byte, error)
- func (c *ProfileCompo) MustGetEventContext(ctx context.Context) (*web.EventContext, *Messages)
- func (c *ProfileCompo) Rename(ctx context.Context, req RenameRequest) (r web.EventResponse, _ error)
- type ProfileField
- type RenameCallback
- type RenameRequest
- type SessionBuilder
- func (b *SessionBuilder) Activity(amb *activity.ModelBuilder) *SessionBuilder
- func (b *SessionBuilder) AutoMigrate() (r *SessionBuilder)
- func (b *SessionBuilder) CreateSession(r *http.Request, uid string) error
- func (b *SessionBuilder) DisableIPCheck(disabled bool) *SessionBuilder
- func (b *SessionBuilder) ExpireAllSessions(uid string) error
- func (b *SessionBuilder) ExpireCurrentSession(r *http.Request, uid string) error
- func (b *SessionBuilder) ExpireOtherSessions(r *http.Request, uid string) error
- func (b *SessionBuilder) ExpireSession(uid, tokenHash string) error
- func (b *SessionBuilder) ExtendSession(r *http.Request, uid string, oldToken, newToken string) error
- func (b *SessionBuilder) GetLoginBuilder() *login.Builder
- func (b *SessionBuilder) Install(pb *presets.Builder) error
- func (b *SessionBuilder) IsPublicUser(f func(user any) bool) *SessionBuilder
- func (b *SessionBuilder) IsSessionValid(r *http.Request, uid string) error
- func (b *SessionBuilder) Middleware(cfgs ...login.MiddlewareConfig) func(next http.Handler) http.Handler
- func (b *SessionBuilder) Mount(mux *http.ServeMux)
- func (b *SessionBuilder) MountAPI(mux *http.ServeMux)
- func (b *SessionBuilder) OpenSessionsDialog() string
- func (b *SessionBuilder) ParseIPFunc(f func(ctx context.Context, lang language.Tag, addr string) (string, error)) *SessionBuilder
- func (b *SessionBuilder) Secret(v string) *SessionBuilder
- func (b *SessionBuilder) TablePrefix(prefix string) *SessionBuilder
- func (b *SessionBuilder) UpdateSessionLastActivedAt(r *http.Request, uid string) error
- func (b *SessionBuilder) WithSessionTableHook(hooks ...hook.Hook[SessionTableFunc]) *SessionBuilder
- func (b *SessionBuilder) WithValidateSessionHook(hooks ...hook.Hook[ValidateSessionFunc]) *SessionBuilder
- type SessionTableFunc
- type SessionTableInput
- type SessionTableOutput
- type ValidateSessionFunc
- type ValidateSessionInput
- type ValidateSessionOutput
- type ViewCommon
- func (*ViewCommon) ErrNotice(msg string) HTMLComponent
- func (*ViewCommon) ErrorBody(msg string) HTMLComponent
- func (*ViewCommon) FormSubmitBtn(label string) *VBtnBuilder
- func (*ViewCommon) InfoNotice(msg string) HTMLComponent
- func (*ViewCommon) InjectRecaptchaAssets(ctx *web.EventContext, formID, tokenFieldID string)
- func (*ViewCommon) InjectZxcvbn(ctx *web.EventContext)
- func (*ViewCommon) Input(id string, placeholder string, val string) *vx.VXFieldBuilder
- func (vc *ViewCommon) Notice(vh *login.ViewHelper, msgr *login.Messages, w http.ResponseWriter, ...) HTMLComponent
- func (vc *ViewCommon) PasswordInput(id string, placeholder string, val string, canReveal bool) *vx.VXFieldBuilder
- func (*ViewCommon) PasswordInputWithStrengthMeter(in *vx.VXFieldBuilder, id, val string) HTMLComponent
- func (*ViewCommon) WarnNotice(msg string) HTMLComponent
Constants ¶
View Source
const ( LoginTokenHashLen = 8 // The hash string length of the token stored in the DB. GracePeriodAfterExtend = 1 * time.Minute )
View Source
const (
I18nAdminLoginKey i18n.ModuleKey = "I18nAdminLoginKey"
)
View Source
const (
OpenChangePasswordDialogEvent = "login_openChangePasswordDialog"
)
Variables ¶
View Source
var DefaultViewCommon = &ViewCommon{
WrapperClass: "d-flex pt-16 flex-column mx-auto",
WrapperStyle: "max-width: 28rem;",
TitleClass: "text-h5 mb-6 font-weight-bold",
LabelClass: "d-block mb-1 grey--text text--darken-2 text-sm-body-2",
}
View Source
var Messages_en_US = &Messages{
SessionTableHeaderTime: "Time",
SessionTableHeaderDevice: "Device",
SessionTableHeaderLocation: "Location",
SessionTableHeaderIPAddress: "IP Address",
SessionTableHeaderStatus: "Status",
SessionTableHeaderLastActivedAt: "Last Active Time",
SessionTableHeaderAction: "Action",
SessionsDialogTitle: "Login Sessions",
SessionStatusExpired: "Expired",
SessionStatusActive: "Active",
SessionStatusCurrent: "Current Session",
HideIPAddressTips: "Invisible due to security concerns",
ExpireOtherSessions: "Sign out all other sessions",
SuccessfullyExpiredOtherSessions: "All other sessions have successfully been signed out.",
SuccessfullyExpiredSessions: "Session has successfully been signed out.",
UnreadMessagesTemplate: "{n} unread notes",
ViewLoginSessions: "View login sessions",
Logout: "Logout",
Available: "Available",
Unavailable: "Unavailable",
SuccessfullyRename: "Successfully renamed",
LocationUnknown: "Unknown",
LoginWelcomeLabel: "Welcome",
LoginTitleLabel: "Qor Admin System",
LoginAccountLabel: "Email",
LoginAccountPlaceholder: "Please enter your email",
LoginPasswordLabel: "Password",
LoginPasswordPlaceholder: "Please enter your password",
LoginSignInButtonLabel: "Sign in",
LoginForgetPasswordLabel: "Forget your password?",
LoginQor5DescriptionLabel: "Enterprise Systems, Startup Speed",
LoginProviderGoogleText: "Sign in with Google",
LoginProviderMicrosoftText: "Sign in with Microsoft",
LoginProviderGithubText: "Sign in with Github",
}
View Source
var Messages_ja_JP = &Messages{
SessionTableHeaderTime: "時間",
SessionTableHeaderDevice: "デバイス",
SessionTableHeaderLocation: "位置",
SessionTableHeaderIPAddress: "IPアドレス",
SessionTableHeaderStatus: "ステータス",
SessionTableHeaderLastActivedAt: "最終アクティブ",
SessionTableHeaderAction: "アクション",
SessionsDialogTitle: "ログインセッション",
SessionStatusExpired: "期限切れ",
SessionStatusActive: "有効",
SessionStatusCurrent: "現在のセッション",
HideIPAddressTips: "セキュリティ保護のため表示できません",
ExpireOtherSessions: "他のすべてのセッションからサインアウトする",
SuccessfullyExpiredOtherSessions: "他のすべてのセッションは正常にサインアウトされました。",
SuccessfullyExpiredSessions: "セッションは正常にサインアウトされました。",
UnreadMessagesTemplate: "{n} 件の未読",
ViewLoginSessions: "ログインセッションを表示",
Logout: "ログアウト",
Available: "利用可能",
Unavailable: "利用不可",
SuccessfullyRename: "名前が変更されました",
LocationUnknown: "不明",
LoginWelcomeLabel: "ようこそ",
LoginTitleLabel: "Qor 管理システム",
LoginAccountLabel: "メールアドレス",
LoginAccountPlaceholder: "メールアドレスを入力してください",
LoginPasswordLabel: "パスワード",
LoginPasswordPlaceholder: "パスワードを入力してください",
LoginSignInButtonLabel: "サインイン",
LoginForgetPasswordLabel: "パスワードをお忘れですか?",
LoginQor5DescriptionLabel: "エンタープライズシステム、スタートアップスピード",
LoginProviderGoogleText: "Google でログイン",
LoginProviderMicrosoftText: "Microsoft でログイン",
LoginProviderGithubText: "Github でログイン",
}
View Source
var Messages_zh_CN = &Messages{
SessionTableHeaderTime: "时间",
SessionTableHeaderDevice: "设备",
SessionTableHeaderLocation: "位置",
SessionTableHeaderIPAddress: "IP地址",
SessionTableHeaderStatus: "状态",
SessionTableHeaderLastActivedAt: "最后活跃时间",
SessionTableHeaderAction: "操作",
SessionsDialogTitle: "登录会话",
SessionStatusExpired: "已过期",
SessionStatusActive: "有效",
SessionStatusCurrent: "当前会话",
HideIPAddressTips: "由于安全原因,隐藏",
ExpireOtherSessions: "登出所有其他会话",
SuccessfullyExpiredOtherSessions: "所有其他会话已成功登出。",
SuccessfullyExpiredSessions: "会话已成功登出。",
UnreadMessagesTemplate: "未读 {n} 条",
ViewLoginSessions: "查看登录会话",
Logout: "登出",
Available: "可用",
Unavailable: "不可用",
SuccessfullyRename: "成功重命名",
LocationUnknown: "未知",
LoginWelcomeLabel: "欢迎",
LoginTitleLabel: "Qor 管理系统",
LoginAccountLabel: "邮箱",
LoginAccountPlaceholder: "请输入您的邮箱",
LoginPasswordLabel: "密码",
LoginPasswordPlaceholder: "请输入您的密码",
LoginSignInButtonLabel: "登录",
LoginForgetPasswordLabel: "忘记密码?",
LoginQor5DescriptionLabel: "企业级系统,创业速度",
LoginProviderGoogleText: "使用 Google 登录",
LoginProviderMicrosoftText: "使用 Microsoft 登录",
LoginProviderGithubText: "使用 Github 登录",
}
View Source
var NopCustomizeCompoFunc = func(ctx context.Context, profileCompo *ProfileCompo, current h.HTMLComponent) (h.HTMLComponent, error) { return current, nil }
Functions ¶
func AutoMigrateSession ¶ added in v3.0.3
func NewAdvancedLoginPage ¶ added in v3.2.0
func NewAdvancedLoginPage(customize func(ctx *web.EventContext, config *AdvancedLoginPageConfig) (*AdvancedLoginPageConfig, error)) func(vh *login.ViewHelper, pb *presets.Builder) web.PageFunc
func ValidateMaxLifetimeHook ¶ added in v3.3.0
func ValidateMaxLifetimeHook(maxLifeTime time.Duration) func(next ValidateSessionFunc) ValidateSessionFunc
func ZxcvbnLogicComponent ¶ added in v3.3.0
func ZxcvbnLogicComponent() HTMLComponent
Types ¶
type AdvancedLoginPageConfig ¶ added in v3.2.0
type AdvancedLoginPageConfig struct {
WelcomeLabel string
TitleLabel string
AccountLabel string
AccountPlaceholder string
PasswordLabel string
PasswordPlaceholder string
SignInButtonLabel string
ForgetPasswordLabel string
OAuthProviderDisplay func(provider *login.Provider) OAuthProviderDisplay
BrandLogo HTMLComponent
LeftImage HTMLComponent
Qor5DescriptionLabel string
RightMaxWidth string
PageTitle string
}
type CustomizeCompoFunc ¶ added in v3.0.4
type CustomizeCompoFunc func(ctx context.Context, profileCompo *ProfileCompo, current h.HTMLComponent) (h.HTMLComponent, error)
type LoginSession ¶ added in v3.0.3
type LoginSession struct {
gorm.Model
UserID string `gorm:"size:36;index;not null"`
Device string `gorm:"size:128;not null"`
IP string `gorm:"size:128;not null"`
TokenHash string `gorm:"size:36;index;not null"`
ExpiredAt time.Time `gorm:"not null"`
ExtendedAt time.Time `gorm:"index"`
LastTokenHash string `gorm:"size:36;default:'';index"`
LastActivedAt time.Time
}
type Messages ¶ added in v3.0.3
type Messages struct {
SessionTableHeaderTime string
SessionTableHeaderDevice string
SessionTableHeaderLocation string
SessionTableHeaderIPAddress string
SessionTableHeaderStatus string
SessionTableHeaderLastActivedAt string
SessionTableHeaderAction string
SessionsDialogTitle string
SessionStatusExpired string
SessionStatusActive string
SessionStatusCurrent string
HideIPAddressTips string
ExpireOtherSessions string
SuccessfullyExpiredOtherSessions string
SuccessfullyExpiredSessions string
UnreadMessagesTemplate string
ViewLoginSessions string
Logout string
Available string
SuccessfullyRename string
LocationUnknown string
LoginWelcomeLabel string
LoginTitleLabel string
LoginAccountLabel string
LoginAccountPlaceholder string
LoginPasswordLabel string
LoginPasswordPlaceholder string
LoginSignInButtonLabel string
LoginForgetPasswordLabel string
LoginQor5DescriptionLabel string
LoginProviderGoogleText string
LoginProviderMicrosoftText string
LoginProviderGithubText string
}
func (*Messages) UnreadMessages ¶ added in v3.0.3
type OAuthProviderDisplay ¶ added in v3.2.0
type OAuthProviderDisplay struct {
Logo HTMLComponent
Text string
}
type Profile ¶ added in v3.0.3
type Profile struct {
ID string
Name string
Avatar string
Roles []string
Status string
Fields []*ProfileField
NotifCounts []*activity.NoteCount
}
func (*Profile) GetFirstRole ¶ added in v3.0.3
type ProfileBuilder ¶ added in v3.0.3
type ProfileBuilder struct {
// contains filtered or unexported fields
}
func NewProfileBuilder ¶ added in v3.0.3
func NewProfileBuilder( currentProfileFunc func(ctx context.Context) (*Profile, error), renameCallback RenameCallback, ) *ProfileBuilder
func (*ProfileBuilder) CustomizeButtons ¶ added in v3.0.3
func (b *ProfileBuilder) CustomizeButtons(v func(ctx context.Context, buttons ...h.HTMLComponent) ([]h.HTMLComponent, error)) *ProfileBuilder
func (*ProfileBuilder) DisableNotification ¶ added in v3.0.3
func (b *ProfileBuilder) DisableNotification(v bool) *ProfileBuilder
func (*ProfileBuilder) Install ¶ added in v3.0.3
func (b *ProfileBuilder) Install(pb *presets.Builder) error
func (*ProfileBuilder) LogoutURL ¶ added in v3.0.3
func (b *ProfileBuilder) LogoutURL(s string) *ProfileBuilder
func (*ProfileBuilder) NewCompo ¶ added in v3.0.3
func (b *ProfileBuilder) NewCompo(evCtx *web.EventContext, idSuffix string) h.HTMLComponent
func (*ProfileBuilder) PrependCompos ¶ added in v3.0.3
func (b *ProfileBuilder) PrependCompos(f func(ctx context.Context, profileCompo *ProfileCompo) ([]h.HTMLComponent, error)) *ProfileBuilder
func (*ProfileBuilder) SessionBuilder ¶ added in v3.0.3
func (b *ProfileBuilder) SessionBuilder(lsb *SessionBuilder) *ProfileBuilder
func (*ProfileBuilder) WrapPrependCompo ¶ added in v3.0.4
func (b *ProfileBuilder) WrapPrependCompo(w func(in CustomizeCompoFunc) CustomizeCompoFunc) *ProfileBuilder
func (*ProfileBuilder) WrapRenameCallback ¶ added in v3.0.4
func (b *ProfileBuilder) WrapRenameCallback(w func(in RenameCallback) RenameCallback) *ProfileBuilder
func (*ProfileBuilder) WrapSubtitleCompo ¶ added in v3.0.4
func (b *ProfileBuilder) WrapSubtitleCompo(w func(in CustomizeCompoFunc) CustomizeCompoFunc) *ProfileBuilder
type ProfileCompo ¶ added in v3.0.3
type ProfileCompo struct {
ID string `json:"id"`
// contains filtered or unexported fields
}
func ProfileCompoFromContext ¶ added in v3.0.3
func ProfileCompoFromContext(ctx context.Context) *ProfileCompo
func ProfileCompoFromEventContext ¶ added in v3.0.3
func ProfileCompoFromEventContext(evCtx *web.EventContext) *ProfileCompo
func (*ProfileCompo) CompoID ¶ added in v3.0.3
func (c *ProfileCompo) CompoID() string
func (*ProfileCompo) MarshalHTML ¶ added in v3.0.3
func (c *ProfileCompo) MarshalHTML(ctx context.Context) ([]byte, error)
func (*ProfileCompo) MustGetEventContext ¶ added in v3.0.3
func (c *ProfileCompo) MustGetEventContext(ctx context.Context) (*web.EventContext, *Messages)
func (*ProfileCompo) Rename ¶ added in v3.0.3
func (c *ProfileCompo) Rename(ctx context.Context, req RenameRequest) (r web.EventResponse, _ error)
type ProfileField ¶ added in v3.0.3
type RenameCallback ¶ added in v3.0.4
type RenameRequest ¶ added in v3.0.3
type RenameRequest struct {
Name string `json:"name"`
}
type SessionBuilder ¶ added in v3.0.3
type SessionBuilder struct {
// contains filtered or unexported fields
}
func NewSessionBuilder ¶ added in v3.0.3
func NewSessionBuilder(lb *login.Builder, db *gorm.DB) *SessionBuilder
func (*SessionBuilder) Activity ¶ added in v3.0.3
func (b *SessionBuilder) Activity(amb *activity.ModelBuilder) *SessionBuilder
func (*SessionBuilder) AutoMigrate ¶ added in v3.0.3
func (b *SessionBuilder) AutoMigrate() (r *SessionBuilder)
func (*SessionBuilder) CreateSession ¶ added in v3.0.3
func (b *SessionBuilder) CreateSession(r *http.Request, uid string) error
func (*SessionBuilder) DisableIPCheck ¶ added in v3.3.0
func (b *SessionBuilder) DisableIPCheck(disabled bool) *SessionBuilder
func (*SessionBuilder) ExpireAllSessions ¶ added in v3.0.3
func (b *SessionBuilder) ExpireAllSessions(uid string) error
func (*SessionBuilder) ExpireCurrentSession ¶ added in v3.0.3
func (b *SessionBuilder) ExpireCurrentSession(r *http.Request, uid string) error
func (*SessionBuilder) ExpireOtherSessions ¶ added in v3.0.3
func (b *SessionBuilder) ExpireOtherSessions(r *http.Request, uid string) error
func (*SessionBuilder) ExpireSession ¶ added in v3.3.0
func (b *SessionBuilder) ExpireSession(uid, tokenHash string) error
func (*SessionBuilder) ExtendSession ¶ added in v3.0.3
func (*SessionBuilder) GetLoginBuilder ¶ added in v3.0.3
func (b *SessionBuilder) GetLoginBuilder() *login.Builder
func (*SessionBuilder) Install ¶ added in v3.0.3
func (b *SessionBuilder) Install(pb *presets.Builder) error
func (*SessionBuilder) IsPublicUser ¶ added in v3.0.3
func (b *SessionBuilder) IsPublicUser(f func(user any) bool) *SessionBuilder
func (*SessionBuilder) IsSessionValid ¶ added in v3.0.3
func (b *SessionBuilder) IsSessionValid(r *http.Request, uid string) error
func (*SessionBuilder) Middleware ¶ added in v3.0.3
func (b *SessionBuilder) Middleware(cfgs ...login.MiddlewareConfig) func(next http.Handler) http.Handler
func (*SessionBuilder) Mount ¶ added in v3.0.3
func (b *SessionBuilder) Mount(mux *http.ServeMux)
func (*SessionBuilder) MountAPI ¶ added in v3.0.3
func (b *SessionBuilder) MountAPI(mux *http.ServeMux)
func (*SessionBuilder) OpenSessionsDialog ¶ added in v3.0.3
func (b *SessionBuilder) OpenSessionsDialog() string
func (*SessionBuilder) ParseIPFunc ¶ added in v3.3.0
func (b *SessionBuilder) ParseIPFunc(f func(ctx context.Context, lang language.Tag, addr string) (string, error)) *SessionBuilder
func (*SessionBuilder) Secret ¶ added in v3.0.3
func (b *SessionBuilder) Secret(v string) *SessionBuilder
func (*SessionBuilder) TablePrefix ¶ added in v3.0.3
func (b *SessionBuilder) TablePrefix(prefix string) *SessionBuilder
func (*SessionBuilder) UpdateSessionLastActivedAt ¶ added in v3.3.0
func (b *SessionBuilder) UpdateSessionLastActivedAt(r *http.Request, uid string) error
func (*SessionBuilder) WithSessionTableHook ¶ added in v3.3.0
func (b *SessionBuilder) WithSessionTableHook(hooks ...hook.Hook[SessionTableFunc]) *SessionBuilder
func (*SessionBuilder) WithValidateSessionHook ¶ added in v3.3.0
func (b *SessionBuilder) WithValidateSessionHook(hooks ...hook.Hook[ValidateSessionFunc]) *SessionBuilder
type SessionTableFunc ¶ added in v3.3.0
type SessionTableFunc func(ctx context.Context, input *SessionTableInput) (*SessionTableOutput, error)
type SessionTableInput ¶ added in v3.3.0
type SessionTableInput struct{}
type SessionTableOutput ¶ added in v3.3.0
type SessionTableOutput struct {
Component h.HTMLComponent
}
type ValidateSessionFunc ¶ added in v3.3.0
type ValidateSessionFunc func(ctx context.Context, input *ValidateSessionInput) (*ValidateSessionOutput, error)
type ValidateSessionInput ¶ added in v3.3.0
type ValidateSessionInput struct {
Session *LoginSession
}
type ValidateSessionOutput ¶ added in v3.3.0
type ValidateSessionOutput struct{}
type ViewCommon ¶
type ViewCommon struct {
WrapperClass string
WrapperStyle string
TitleClass string
LabelClass string
}
func (*ViewCommon) ErrNotice ¶
func (*ViewCommon) ErrNotice(msg string) HTMLComponent
func (*ViewCommon) ErrorBody ¶
func (*ViewCommon) ErrorBody(msg string) HTMLComponent
func (*ViewCommon) FormSubmitBtn ¶
func (*ViewCommon) FormSubmitBtn( label string, ) *VBtnBuilder
func (*ViewCommon) InfoNotice ¶
func (*ViewCommon) InfoNotice(msg string) HTMLComponent
func (*ViewCommon) InjectRecaptchaAssets ¶
func (*ViewCommon) InjectRecaptchaAssets(ctx *web.EventContext, formID, tokenFieldID string)
requirements: - submit button
- add class `g-recaptcha`
- add attr `data-sitekey=<key>`
- add attr `data-callback=onSubmit`
- add token field like `Input("token").Id("token").Type("hidden")`
func (*ViewCommon) InjectZxcvbn ¶
func (*ViewCommon) InjectZxcvbn(ctx *web.EventContext)
func (*ViewCommon) Input ¶
func (*ViewCommon) Input( id string, placeholder string, val string, ) *vx.VXFieldBuilder
func (*ViewCommon) Notice ¶
func (vc *ViewCommon) Notice(vh *login.ViewHelper, msgr *login.Messages, w http.ResponseWriter, r *http.Request) HTMLComponent
func (*ViewCommon) PasswordInput ¶
func (vc *ViewCommon) PasswordInput( id string, placeholder string, val string, canReveal bool, ) *vx.VXFieldBuilder
func (*ViewCommon) PasswordInputWithStrengthMeter ¶
func (*ViewCommon) PasswordInputWithStrengthMeter(in *vx.VXFieldBuilder, id, val string) HTMLComponent
need to import zxcvbn.js
func (*ViewCommon) WarnNotice ¶
func (*ViewCommon) WarnNotice(msg string) HTMLComponent
Source Files
¶
Click to show internal directories.
Click to hide internal directories.