fix: disable ENS only setting if user has no ENS name

Fixes #1984
This commit is contained in:
Jonathan Rainville 2021-03-05 12:46:02 -05:00 committed by Iuri Matias
parent 44c9f480c2
commit d361853d0d
1 changed files with 18 additions and 0 deletions

View File

@ -328,9 +328,27 @@ ModalPopup {
id: ensOnlySwitch
anchors.top: privateExplanation.bottom
anchors.topMargin: Style.current.padding
isEnabled: profileModel.profile.ensVerified
text: qsTr("Require ENS username")
isSwitch: true
onClicked: switchChecked = checked
StatusToolTip {
visible: !ensOnlySwitch.isEnabled && ensMouseArea.isHovered
text: qsTr("You can only enable this setting if you have an ENS name")
}
MouseArea {
property bool isHovered: false
id: ensMouseArea
enabled: !ensOnlySwitch.isEnabled
visible: enabled
anchors.fill: parent
hoverEnabled: true
onEntered: isHovered = true
onExited: isHovered = false
}
}
StyledText {