Skip to content

Commit

Permalink
feat: add support for onclick javascript in ui nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 19, 2021
1 parent 3666421 commit 7cc7efa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/node/attributes.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ type InputAttributes struct {
//
// required: true
Disabled bool `json:"disabled"`

// OnClick may contain javascript which should be executed on click. This is primarily
// used for WebAuthn.
OnClick string `json:"onclick,omitempty"`
}

// ImageAttributes represents the attributes of an image node.
Expand Down
8 changes: 8 additions & 0 deletions ui/node/identifiers.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,11 @@ const (
LookupConfirm = "lookup_secret_confirm"
LookupCodeEnter = "lookup_secret"
)

const (
WebAuthnRegister = "webauthn_register"
WebAuthnIdentifier = "webauthn_identifier"
WebAuthnLogin = "webauthn_login"
WebAuthnRegisterDisplayName = "webauthn_register_displayname"
WebAuthnRemove = "webauthn_remove"
)
1 change: 1 addition & 0 deletions ui/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ const (
VerificationLinkGroup Group = "link"
TOTPGroup Group = "totp"
LookupGroup Group = "lookup_secret"
WebAuthnGroup Group = "webauthn"

Text Type = "text"
Input Type = "input"
Expand Down

0 comments on commit 7cc7efa

Please sign in to comment.