Skip to content

Commit

Permalink
add support to hide input label for password modal and fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
  • Loading branch information
ukane-philemon committed Dec 12, 2023
1 parent 6c35186 commit e7c49e6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/cryptomaterial/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ type Editor struct {
errorLabel Label
LineColor color.NRGBA

// IsRequired if true, displays a required field text at the buttom of the editor.
// IsRequired if true, displays a required field text at the bottom of the
// editor.
IsRequired bool
// IsTitleLabel if true makes the title label visible.
IsTitleLabel bool
Expand Down
4 changes: 4 additions & 0 deletions ui/modal/create_password_modal.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ func (cm *CreatePasswordModal) SetError(err string) {
cm.serverError = values.TranslateErr(err)
}

func (cm *CreatePasswordModal) SetPasswordTitleVisibility(show bool) {
cm.passwordEditor.IsTitleLabel = show
}

func (cm *CreatePasswordModal) UseCustomWidget(layout layout.Widget) *CreatePasswordModal {
cm.customWidget = layout
return cm
Expand Down
1 change: 1 addition & 0 deletions ui/page/dcrdex/dex_onboarding_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -953,6 +953,7 @@ func (pg *DEXOnboarding) HandleUserInteractions() {
pg.connectServerAndPrepareForBonding()
return true
})
dexPasswordModal.SetPasswordTitleVisibility(false)
pg.ParentWindow().ShowModal(dexPasswordModal)
case onboardingPostBond:
// Validate all input fields.
Expand Down

0 comments on commit e7c49e6

Please sign in to comment.