Login, user in datenbank und encryption key

This commit is contained in:
2024-12-02 16:15:26 +01:00
parent 70ad4d557b
commit 5bf35ce12a
9 changed files with 309 additions and 309 deletions

View File

@@ -24,6 +24,7 @@ GridLayout
Label
{
id: benutzerNamelabel
text: qsTr("Benutzername:")
Layout.alignment: Qt.AlignRight
}
@@ -69,4 +70,17 @@ GridLayout
{
Layout.fillHeight: true
}
Component.onCompleted:
{
config.usernameNotAvailable.connect(usernameNotAvailable)
}
function usernameNotAvailable()
{
benutzerName.placeholderText = qsTr ("Benutzername ist bereits vergeben")
benutzerName.clear()
benutzerNamelabel.color = "red"
benutzerNamelabel.font.bold = true
}
}

View File

@@ -37,6 +37,7 @@ RowLayout
implicitWidth: kunden.implicitContentWidth + 10
onClicked:
{
// TODO: here we should call the model
appLoader.source = "CustomerTables.qml"
}
}

View File

@@ -45,7 +45,6 @@ Item
firstStart.push("AdminUserConfig.qml")
}
MessageDialog
{
id: conErrDialog
@@ -62,7 +61,13 @@ Item
title: qsTr("Encryption Key")
anchors.centerIn: parent
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: config.setEncyrptKey(encryptPassword.text)
onAccepted:
{
// TODO: signal for EncryptionKey testing
config.setEncyrptKey(encryptPassword.text)
appLoader.source = "Dashboard.qml"
topBar.visible = true
}
ColumnLayout
{
RowLayout
@@ -89,6 +94,7 @@ Item
id: firstStart
anchors.fill: parent
initialItem: "DbConfiguration.qml"
//initialItem: "AdminUserConfig.qml"
}
RowLayout
{
@@ -126,7 +132,7 @@ Item
pyqcrm_conf = Qmldict.func(submitBtn.grids)
if (pyqcrm_conf)
{
admin = config.setConfig(pyqcrm_conf)
config.setConfig(pyqcrm_conf)
}
}