summaryrefslogtreecommitdiff
path: root/gui/qml/LoginDialog.qml
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-09-08 16:51:32 +0200
committerkali kaneko (leap communications) <kali@leap.se>2020-09-08 20:10:17 +0200
commite217f990bcdc687b8c0cdf8f84929aaf5aa8f935 (patch)
treea71583b024a9a0cc5115d472206973cbea555bd1 /gui/qml/LoginDialog.qml
parenta40434d402ceb9cfacff59aeeab12a3d6b13a0ed (diff)
[feat] improve phrasing for login dialog, split into its own file
Diffstat (limited to 'gui/qml/LoginDialog.qml')
-rw-r--r--gui/qml/LoginDialog.qml19
1 files changed, 18 insertions, 1 deletions
diff --git a/gui/qml/LoginDialog.qml b/gui/qml/LoginDialog.qml
index 897081b..44a1d79 100644
--- a/gui/qml/LoginDialog.qml
+++ b/gui/qml/LoginDialog.qml
@@ -5,10 +5,15 @@ import QtQuick.Controls 1.4
Dialog {
standardButtons: StandardButton.Ok
title: qsTr("Login")
+
Column {
anchors.fill: parent
Text {
- text: qsTr("Log in with your library credentials")
+ text: getLoginText()
+ font.bold: true
+ }
+ Text {
+ text: getDetailedText()
}
TextField {
id: username
@@ -25,4 +30,16 @@ Dialog {
visible: false
onAccepted: backend.login(username.text, password.text)
onRejected: backend.quit()
+
+ function getLoginText() {
+ if (allowEmptyPass) {
+ return qsTr("Enter your Patron ID")
+ } else {
+ return qsTr("Log in with your library credentials")
+ }
+ }
+
+ function getDetailedText() {
+ return qsTr("You can check your Patron ID number in the back of your library card")
+ }
}