Disable login button until ID & password entered
This commit is contained in:
parent
c7adb5b02f
commit
28b5fbd267
1
TODO.md
1
TODO.md
|
@ -22,6 +22,7 @@
|
||||||
- Keyboard flicking against top/bottom edge
|
- Keyboard flicking against top/bottom edge
|
||||||
- Don't strip user spacing in html
|
- Don't strip user spacing in html
|
||||||
|
|
||||||
|
- Do something when access token is invalid
|
||||||
- [hr not working](https://bugreports.qt.io/browse/QTBUG-74342)
|
- [hr not working](https://bugreports.qt.io/browse/QTBUG-74342)
|
||||||
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
- Terrible performance using `QT_QPA_PLATFORM=wayland-egl`, must use `xcb`
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ HScalingBox {
|
||||||
function clickEnterButtonTarget() {
|
function clickEnterButtonTarget() {
|
||||||
for (let i = 0; i < buttonModel.length; i++) {
|
for (let i = 0; i < buttonModel.length; i++) {
|
||||||
let btn = interfaceButtonsRepeater.itemAt(i)
|
let btn = interfaceButtonsRepeater.itemAt(i)
|
||||||
if (btn.name === enterButtonTarget) { btn.clicked() }
|
if (btn.enabled && btn.name === enterButtonTarget) btn.clicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,8 @@ import "../Base"
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
property string loginWith: "username"
|
property string loginWith: "username"
|
||||||
|
readonly property bool canLogin: idField.text && passwordField.text
|
||||||
|
|
||||||
onFocusChanged: idField.forceActiveFocus()
|
onFocusChanged: idField.forceActiveFocus()
|
||||||
|
|
||||||
HInterfaceBox {
|
HInterfaceBox {
|
||||||
|
@ -15,7 +17,7 @@ Item {
|
||||||
|
|
||||||
buttonModel: [
|
buttonModel: [
|
||||||
{ name: "register", text: qsTr("Register"), enabled: false },
|
{ name: "register", text: qsTr("Register"), enabled: false },
|
||||||
{ name: "login", text: qsTr("Login"), enabled: true },
|
{ name: "login", text: qsTr("Login"), enabled: canLogin },
|
||||||
{ name: "forgot", text: qsTr("Forgot?"), enabled: false }
|
{ name: "forgot", text: qsTr("Forgot?"), enabled: false }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user