Backup Config

This commit is contained in:
2025-02-27 14:45:27 +01:00
parent 4c62834369
commit 73542e8089
4 changed files with 61 additions and 30 deletions

View File

@@ -3,6 +3,8 @@ import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Dialogs
import QtCore
import "../js/qmldict.js" as JsLib
GridLayout
@@ -57,7 +59,8 @@ GridLayout
{
if (configPwd.text === repeatConfigPwd.text)
{ console.log("true")
{
saveConfigFile.open()
}
else
@@ -67,12 +70,12 @@ GridLayout
configPwd.placeholderTextColor = "red"
repeatConfigPwd.placeholderText = qsTr("")
repeatConfigPwd.text = ""
console.log("false")
}
}
onRejected: console.log("Cancel clicked")
GridLayout
{
id: gridPw
columns: 2
Label
{
@@ -80,6 +83,7 @@ GridLayout
}
TextField
{
id: configPwd
placeholderText: qsTr("Sicherungspasswort festlegen")
}
@@ -89,6 +93,7 @@ GridLayout
}
TextField
{
property string name: "password"
id: repeatConfigPwd
placeholderText: qsTr("Sicherungspasswort wiederholen")
}
@@ -103,8 +108,8 @@ GridLayout
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
onAccepted:
{
var test = config.backupConfig(saveConfigFile.currentFile)
console.log()
var pw = JsLib.parseForm(gridPw)
config.backupConfig(saveConfigFile.currentFile, pw["password"])
}
}
}