Merge linuxero

This commit is contained in:
2025-02-27 14:48:08 +01:00
10 changed files with 214 additions and 34 deletions

View File

@@ -11,6 +11,7 @@ GridLayout
Layout.fillHeight: true
rowSpacing: 9
//// New grid row
Label
@@ -218,7 +219,9 @@ GridLayout
function checkObjectField()
{
return street.text.trim() && houseno.text.trim() &&
(postcode.editText.trim() || postcode.currentText.trim()) &&
(city.editText.trim() || city.currentText.trim()) &&
cleaningproducts.text.trim()

115
Gui/BackupSettings.qml Normal file
View File

@@ -0,0 +1,115 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Dialogs
import QtCore
import "../js/qmldict.js" as JsLib
GridLayout
{
anchors.fill: parent
anchors.topMargin: 150
columns: 2
Label
{
Layout.columnSpan: 2
Layout.alignment: Qt.AlignHCenter
text: qsTr("Sicherung")
font.pixelSize: 35
}
Label
{
text: qsTr("Konfiguration")
Layout.alignment: Qt.AlignRight
}
Button
{
id: saveConfig
text: qsTr("Jetzt sichern!")
onClicked: dialog.open()
}
Label
{
text: qsTr("Verschlüsselung")
Layout.alignment: Qt.AlignRight
}
Button
{
id: saveEncryption
text: qsTr("Jetzt sichern!")
onClicked: apploader.item.recoverEnc.open()
}
Item
{
id: spacer
Layout.fillHeight: true
}
Dialog
{
anchors.centerIn: parent
id: dialog
title: "Title"
standardButtons: Dialog.Apply | Dialog.Cancel
onApplied:
{
if (configPwd.text === repeatConfigPwd.text)
{
saveConfigFile.open()
}
else
{
configPwd.text = ""
configPwd.placeholderText = qsTr("Passwort stimmt nicht überein")
configPwd.placeholderTextColor = "red"
repeatConfigPwd.placeholderText = qsTr("")
repeatConfigPwd.text = ""
}
}
onRejected: console.log("Cancel clicked")
GridLayout
{
id: gridPw
columns: 2
Label
{
text: qsTr("Passwort eingeben")
}
TextField
{
id: configPwd
placeholderText: qsTr("Sicherungspasswort festlegen")
}
Label
{
text: qsTr("Passwort wiederholen")
}
TextField
{
property string name: "password"
id: repeatConfigPwd
placeholderText: qsTr("Sicherungspasswort wiederholen")
}
}
}
FileDialog
{
id: saveConfigFile
fileMode: FileDialog.SaveFile
nameFilters: ["PYQCRM Recovery files (*.pyqrec)"]
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
onAccepted:
{
var pw = JsLib.parseForm(gridPw)
config.backupConfig(saveConfigFile.currentFile, pw["password"])
}
}
}

View File

@@ -11,7 +11,9 @@ Item
{
property string recpass: ""
property bool adminAvailable: true
property alias recoverEnc: recoveryPaswordDialog
id: firstStartItem
anchors.fill: parent
StackView
{
@@ -87,6 +89,7 @@ Item
Dialog
{
id: recoveryPaswordDialog
modal: true
title: qsTr("Wiederherstellung")
@@ -115,6 +118,19 @@ Item
implicitWidth: 300
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
}
Label
{
text: qsTr("Wiederherstellungspasswort eingeben: ")
}
TextField
{
id: repeatRecoveryPaswordInput
text: ""
echoMode: TextInput.Password
implicitWidth: 300
placeholderText: qsTr("Hier Wiederherstellungspasswort eingeben")
}
}
}
}

View File

@@ -269,8 +269,10 @@ GridLayout
highlightFollowsCurrentItem: false
onActiveFocusChanged: if(!focus) currentIndex = -1
delegate: Item
{
width: contactView.width
height: 15
MouseArea
{
@@ -281,17 +283,7 @@ GridLayout
contactView.highlightFollowsCurrentItem = true
}
}
MouseArea
{
id: clickedRow
anchors.fill: parent
onClicked:
{
//var currentIndex = index
console.log(index)
console.log(contactView.currentItem.y)
}
}
Row
{

View File

@@ -21,6 +21,12 @@ Item
{
text: qsTr("Das Unternehmen")
}
TabButton
{
text: qsTr("Sicherung")
}
}
StackLayout
@@ -55,6 +61,17 @@ Item
anchors.fill: parent
}
}
Item
{
id: backup
BackupSettings
{
id: backupSettings
anchors.fill: parent
}
}
}
RowLayout

View File

@@ -12,6 +12,8 @@ ApplicationWindow
visible: true
title: "PYQCRM"
property string confile: ""
property alias settingsFileDialog: settingsFiledialog
TopBar
{
@@ -80,17 +82,18 @@ ApplicationWindow
anchors.centerIn: parent
standardButtons: Dialog.Yes | Dialog.No
onAccepted: settingsFiledialog.open()
onRejected: appLoader.source= "firststart.qml"
onRejected: appLoader.source= "Firststart.qml"
title: qsTr("Einstellungen importieren")
}
FileDialog
{
id: settingsFiledialog
title: qsTr("PYQCRM Einstellungen")
currentFolder: StandardPaths.standardLocations(StandardPaths.DocumentsLocation)[0]
modality: "ApplicationModal"
nameFilters: [qsTr("PYQCRM Einstellungen (*.pyqcrm)")]
nameFilters: [qsTr("PYQCRM Einstellungen (*.pyqrec)")]
onAccepted:
{
exportFilePassword.open()