From e217f990bcdc687b8c0cdf8f84929aaf5aa8f935 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Tue, 8 Sep 2020 16:51:32 +0200 Subject: [feat] improve phrasing for login dialog, split into its own file --- gui/qml/LoginDialog.qml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'gui/qml/LoginDialog.qml') 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") + } } -- cgit v1.2.3