Commit 6a801d55 authored by Andrea Scarpino's avatar Andrea Scarpino

Handle password focus propertly

parent d3ab2e7a
......@@ -79,14 +79,12 @@ Page {
TextField {
id: username
width: parent.width
focus: text.length === 0
placeholderText: qsTr("Username")
}
TextField {
id: password
width: parent.width
focus: username.text.length > 0 && text.length === 0
placeholderText: qsTr("Password")
echoMode: TextInput.Password
}
......@@ -162,6 +160,11 @@ Page {
Component.onCompleted: {
username.text = manager.getUsername();
if (username.text.length > 0) {
password.forceActiveFocus();
}
var isAuth = manager.isAuthenticated();
isAuthenticated(isAuth);
......
......@@ -119,7 +119,7 @@
<context>
<name>Settings</name>
<message>
<location filename="../qml/pages/Settings.qml" line="178"/>
<location filename="../qml/pages/Settings.qml" line="181"/>
<source>Logged</source>
<translation>Connesso</translation>
</message>
......@@ -129,7 +129,7 @@
<translation>Esci</translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="112"/>
<location filename="../qml/pages/Settings.qml" line="110"/>
<source>Login failed</source>
<translation>Login fallito</translation>
</message>
......@@ -139,38 +139,38 @@
<translation>Impostazioni</translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="83"/>
<location filename="../qml/pages/Settings.qml" line="82"/>
<source>Username</source>
<translation>Username</translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="90"/>
<location filename="../qml/pages/Settings.qml" line="88"/>
<source>Password</source>
<translation>Password</translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="96"/>
<location filename="../qml/pages/Settings.qml" line="180"/>
<location filename="../qml/pages/Settings.qml" line="94"/>
<location filename="../qml/pages/Settings.qml" line="183"/>
<source>Login</source>
<translation>Entra</translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="129"/>
<location filename="../qml/pages/Settings.qml" line="127"/>
<source>User details</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="135"/>
<location filename="../qml/pages/Settings.qml" line="133"/>
<source>created</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="141"/>
<location filename="../qml/pages/Settings.qml" line="139"/>
<source>karma</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="147"/>
<location filename="../qml/pages/Settings.qml" line="145"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
......
......@@ -119,7 +119,7 @@
<context>
<name>Settings</name>
<message>
<location filename="../qml/pages/Settings.qml" line="178"/>
<location filename="../qml/pages/Settings.qml" line="181"/>
<source>Logged</source>
<translation type="unfinished"></translation>
</message>
......@@ -129,7 +129,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="112"/>
<location filename="../qml/pages/Settings.qml" line="110"/>
<source>Login failed</source>
<translation type="unfinished"></translation>
</message>
......@@ -139,38 +139,38 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="83"/>
<location filename="../qml/pages/Settings.qml" line="82"/>
<source>Username</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="90"/>
<location filename="../qml/pages/Settings.qml" line="88"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="96"/>
<location filename="../qml/pages/Settings.qml" line="180"/>
<location filename="../qml/pages/Settings.qml" line="94"/>
<location filename="../qml/pages/Settings.qml" line="183"/>
<source>Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="129"/>
<location filename="../qml/pages/Settings.qml" line="127"/>
<source>User details</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="135"/>
<location filename="../qml/pages/Settings.qml" line="133"/>
<source>created</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="141"/>
<location filename="../qml/pages/Settings.qml" line="139"/>
<source>karma</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="147"/>
<location filename="../qml/pages/Settings.qml" line="145"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
......
......@@ -119,7 +119,7 @@
<context>
<name>Settings</name>
<message>
<location filename="../qml/pages/Settings.qml" line="178"/>
<location filename="../qml/pages/Settings.qml" line="181"/>
<source>Logged</source>
<translation type="unfinished"></translation>
</message>
......@@ -129,7 +129,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="112"/>
<location filename="../qml/pages/Settings.qml" line="110"/>
<source>Login failed</source>
<translation type="unfinished"></translation>
</message>
......@@ -139,38 +139,38 @@
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="83"/>
<location filename="../qml/pages/Settings.qml" line="82"/>
<source>Username</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="90"/>
<location filename="../qml/pages/Settings.qml" line="88"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="96"/>
<location filename="../qml/pages/Settings.qml" line="180"/>
<location filename="../qml/pages/Settings.qml" line="94"/>
<location filename="../qml/pages/Settings.qml" line="183"/>
<source>Login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="129"/>
<location filename="../qml/pages/Settings.qml" line="127"/>
<source>User details</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="135"/>
<location filename="../qml/pages/Settings.qml" line="133"/>
<source>created</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="141"/>
<location filename="../qml/pages/Settings.qml" line="139"/>
<source>karma</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../qml/pages/Settings.qml" line="147"/>
<location filename="../qml/pages/Settings.qml" line="145"/>
<source>About</source>
<translation type="unfinished"></translation>
</message>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment