Some code organisation and recovery procedure fix

This commit is contained in:
2024-12-09 23:23:11 +01:00
parent 5f08435816
commit 3acafaea32
7 changed files with 305 additions and 234 deletions

View File

@@ -47,6 +47,7 @@ ApplicationWindow
property alias window: appWindow
}
Component.onCompleted:
{
if(bad_config)
@@ -54,8 +55,8 @@ ApplicationWindow
importDialog.open()
}
else appLoader.source= "LoginScreen.qml"
}
Dialog
{
id: importDialog
@@ -65,11 +66,10 @@ ApplicationWindow
onAccepted: settingsFiledialog.open()
onRejected: appLoader.source= "firststart.qml"
title: qsTr("Einstellungen importieren")
}
FileDialog
{
id: settingsFiledialog
title: qsTr("PYQCRM Einstellungen")
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
@@ -77,18 +77,19 @@ ApplicationWindow
nameFilters: [qsTr("PYQCRM Einstellungen (*.pyqcrm)")]
onAccepted:
{
encryptPwDialog.open()
exportFilePassword.open()
confile = selectedFile
}
}
Dialog
{
id: encryptPwDialog
id: exportFilePassword
modal: true
title: qsTr("PYQCRM Einstellungen")
anchors.centerIn: parent
standardButtons: Dialog.Ok | Dialog.Cancel
onAccepted: config.importConfig(confile, encryptPassword.text)
onAccepted: config.importConfig(confile, exportPasswordInput.text)
ColumnLayout
{
RowLayout
@@ -100,7 +101,7 @@ ApplicationWindow
TextField
{
id: encryptPassword
id: exportPasswordInput
echoMode: TextInput.Password
implicitWidth: 300
}