GODT-1346: GODT-1340 GODT-1315 QML changes

GODT-1365: Create ComboBox component
GODT-1338: GODT-1343 Help view buttons
GODT-1340: Not crashing, user list updating in main thread.
GODT-1345: adding panic handlers
This commit is contained in:
Jakub Cuth
2021-09-28 12:45:47 +00:00
committed by Jakub
parent 2c8feff97a
commit d11cf57879
46 changed files with 1267 additions and 727 deletions

View File

@ -28,12 +28,6 @@ Item {
property ColorScheme colorScheme
property var backend
property var window
signal login(string username, string password)
signal login2FA(string username, string code)
signal login2Password(string username, string password)
signal loginAbort(string username)
implicitHeight: children[0].implicitHeight
implicitWidth: children[0].implicitWidth
@ -230,22 +224,14 @@ Item {
Layout.preferredWidth: 320
Layout.fillWidth: true
onLogin: {
root.login(username, password)
username: {
if (root.backend.users.count !== 1) return ""
var user = root.backend.users.get(0)
if (user) return ""
if (user.loggedIn) return ""
return user.username
}
onLogin2FA: {
root.login2FA(username, code)
}
onLogin2Password: {
root.login2Password(username, password)
}
onLoginAbort: {
root.loginAbort(username)
}
username: (backend.users.count === 1 && backend.users.get(0).loggedIn === false) ? backend.users.get(0).username : ""
backend: root.backend
window: root.window
}
// Right margin