import QtQuick 2.9 import Lomiri.Components import Lomiri.Components.Popups import Lomiri.Components.ListItems as ListItem Item { id: root property var signonRequest: request width: units.gu(60) height: units.gu(90) Component.onCompleted: dialog.show() Dialog { id: dialog objectName: "signOnUiDialog" title: signonRequest.title text: signonRequest.message Label { id: userNameLabel objectName: "userNameLabel" visible: signonRequest.queryUserName text: signonRequest.userNameText } TextField { id: userNameField objectName: "userNameField" visible: signonRequest.queryUserName text: signonRequest.userName onTextChanged: signonRequest.userName = text } Column { anchors.left: parent.left anchors.right: parent.right visible: signonRequest.queryPassword Label { id: passwordLabel objectName: "passwordLabel" text: signonRequest.passwordText } TextField { id: passwordField objectName: "passwordField" text: signonRequest.password echoMode: TextInput.Password onTextChanged: signonRequest.password = text Keys.onReturnPressed: signonRequest.accept() } Label { objectName: "forgotPasswordLabel" visible: signonRequest.forgotPasswordUrl.toString() !== "" text: "" + signonRequest.forgotPasswordText + "" } } Item { id: pageFooter anchors.left: parent.left anchors.right: parent.right visible: signonRequest.registerUrl.toString() !== "" ListItem.ThinDivider { anchors.bottom: registerUrlLabel.top } Label { id: registerUrlLabel objectName: "registerUrlLabel" anchors.bottom: parent.bottom text: "" + signonRequest.registerText + "" } } Item { anchors.left: parent.left anchors.right: parent.right height: childrenRect.height Button { objectName: "cancelButton" anchors.left: parent.left text: i18n.dtr("lomiri-online-accounts", "Cancel") width: (parent.width / 2) - 0.5 * units.gu(1) onClicked: signonRequest.cancel() } Button { objectName: "acceptButton" anchors.right: parent.right text: signonRequest.loginText width: (parent.width / 2) - 0.5 * units.gu(1) onClicked: signonRequest.accept() } } } }