Backup Config
This commit is contained in:
@@ -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"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user