2019-04-28 11:07:20 +10:00
|
|
|
import QtQuick 2.7
|
2019-04-29 05:45:42 +10:00
|
|
|
import QtQuick.Layouts 1.3
|
2019-04-29 05:18:36 +10:00
|
|
|
import "../Base"
|
2019-04-28 11:07:20 +10:00
|
|
|
|
|
|
|
Item {
|
|
|
|
property string loginWith: "username"
|
|
|
|
property var client: null
|
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HInterfaceBox {
|
2019-04-28 11:07:20 +10:00
|
|
|
id: rememberBox
|
|
|
|
title: "Sign in"
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
|
|
enterButtonTarget: "yes"
|
|
|
|
|
|
|
|
buttonModel: [
|
|
|
|
{ name: "yes", text: qsTr("Yes") },
|
|
|
|
{ name: "no", text: qsTr("No") },
|
|
|
|
]
|
|
|
|
|
|
|
|
buttonCallbacks: {
|
|
|
|
"yes": function(button) {
|
2019-05-03 04:54:37 +10:00
|
|
|
Backend.clients.remember(client)
|
2019-04-28 11:07:20 +10:00
|
|
|
pageStack.showPage("Default")
|
|
|
|
},
|
|
|
|
"no": function(button) { pageStack.showPage("Default") },
|
|
|
|
}
|
|
|
|
|
2019-04-29 05:18:36 +10:00
|
|
|
HLabel {
|
2019-04-28 11:07:20 +10:00
|
|
|
text: qsTr(
|
|
|
|
"Do you want to remember this account?\n\n" +
|
|
|
|
"If yes, the " + loginWith + " and an access token will be " +
|
|
|
|
"stored to automatically sign in on this device."
|
|
|
|
)
|
|
|
|
wrapMode: Text.Wrap
|
|
|
|
|
|
|
|
Layout.margins: rememberBox.margins
|
|
|
|
Layout.maximumWidth: rememberBox.width - Layout.margins * 2
|
|
|
|
}
|
|
|
|
|
2019-04-29 05:22:53 +10:00
|
|
|
HSpacer {}
|
2019-04-28 11:07:20 +10:00
|
|
|
}
|
|
|
|
}
|