Merge linuxero
This commit is contained in:
17
Gui/CompanyConf.qml
Normal file
17
Gui/CompanyConf.qml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
property string name: "company"
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
Label
|
||||||
|
{
|
||||||
|
text: qsTr("Das Unternehmen")
|
||||||
|
anchors.centerIn: parent
|
||||||
|
font.pixelSize: 57
|
||||||
|
font.bold: true
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -231,6 +231,25 @@ GridLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component
|
||||||
|
{
|
||||||
|
id: highlight
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
width: 230; height: 15
|
||||||
|
color: "lightsteelblue"; radius: 5
|
||||||
|
y: contactView.currentItem.y
|
||||||
|
Behavior on y
|
||||||
|
{
|
||||||
|
SpringAnimation
|
||||||
|
{
|
||||||
|
spring: 3
|
||||||
|
damping: 0.2
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle
|
Rectangle
|
||||||
{
|
{
|
||||||
id: mainRect
|
id: mainRect
|
||||||
@@ -242,6 +261,7 @@ GridLayout
|
|||||||
ListView
|
ListView
|
||||||
{
|
{
|
||||||
id: contactView
|
id: contactView
|
||||||
|
|
||||||
implicitHeight: parent.height
|
implicitHeight: parent.height
|
||||||
implicitWidth: parent.width
|
implicitWidth: parent.width
|
||||||
model: contactModel
|
model: contactModel
|
||||||
@@ -249,10 +269,13 @@ GridLayout
|
|||||||
highlight: Rectangle { color: "grey"}
|
highlight: Rectangle { color: "grey"}
|
||||||
highlightFollowsCurrentItem: false
|
highlightFollowsCurrentItem: false
|
||||||
|
|
||||||
|
|
||||||
onActiveFocusChanged: if(!focus) currentIndex = -1
|
onActiveFocusChanged: if(!focus) currentIndex = -1
|
||||||
delegate: Item
|
delegate: Item
|
||||||
|
|
||||||
{
|
{
|
||||||
width: contactView.width
|
width: contactView.width
|
||||||
|
|
||||||
height: 15
|
height: 15
|
||||||
MouseArea
|
MouseArea
|
||||||
{
|
{
|
||||||
@@ -264,6 +287,7 @@ GridLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Row
|
Row
|
||||||
{
|
{
|
||||||
//spacing: 9
|
//spacing: 9
|
||||||
@@ -297,6 +321,8 @@ GridLayout
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
95
Gui/PyqcrmConf.qml
Normal file
95
Gui/PyqcrmConf.qml
Normal file
@@ -0,0 +1,95 @@
|
|||||||
|
import QtQuick
|
||||||
|
import QtQuick.Controls
|
||||||
|
import QtQuick.Layouts
|
||||||
|
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
TabBar
|
||||||
|
{
|
||||||
|
id: bar
|
||||||
|
width: parent.width
|
||||||
|
TabButton
|
||||||
|
{
|
||||||
|
text: qsTr("Benutzer")
|
||||||
|
}
|
||||||
|
TabButton
|
||||||
|
{
|
||||||
|
text: qsTr("Datenbank")
|
||||||
|
}
|
||||||
|
TabButton
|
||||||
|
{
|
||||||
|
text: qsTr("Das Unternehmen")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
StackLayout
|
||||||
|
{
|
||||||
|
id: confContainer
|
||||||
|
anchors.fill: parent
|
||||||
|
currentIndex: bar.currentIndex
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: userTab
|
||||||
|
UsersPage
|
||||||
|
{
|
||||||
|
id: usersPage
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: dbTab
|
||||||
|
DbConfiguration
|
||||||
|
{
|
||||||
|
id: dbConf
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
id: companyTab
|
||||||
|
CompanyConf
|
||||||
|
{
|
||||||
|
id: companyConf
|
||||||
|
anchors.fill: parent
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout
|
||||||
|
{
|
||||||
|
width: parent.width
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
Item
|
||||||
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Ablehnen")
|
||||||
|
onClicked: appLoader.source = "Dashboard.qml"
|
||||||
|
}
|
||||||
|
|
||||||
|
Button
|
||||||
|
{
|
||||||
|
text: qsTr("Speichern")
|
||||||
|
onClicked:
|
||||||
|
{
|
||||||
|
switch (confContainer.currentIndex)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
console.log("Need to update DB paramenters")
|
||||||
|
break
|
||||||
|
|
||||||
|
case 2:
|
||||||
|
console.log("Need to update company's info.")
|
||||||
|
break
|
||||||
|
default:
|
||||||
|
console.log("Need to handle users")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -178,8 +178,15 @@ RowLayout
|
|||||||
id: mainMenu
|
id: mainMenu
|
||||||
MenuItem
|
MenuItem
|
||||||
{
|
{
|
||||||
text: qsTr("Benutzer-Verwaltung")
|
//text: qsTr("Benutzer-Verwaltung")
|
||||||
onTriggered: appLoader.source = "UsersPage.qml"
|
//onTriggered: appLoader.source = "UsersPage.qml"
|
||||||
|
text: qsTr("Einstellungen")
|
||||||
|
onTriggered:
|
||||||
|
{
|
||||||
|
// TODO: Check if logged-in user is admin first!!
|
||||||
|
|
||||||
|
appLoader.source = "PyqcrmConf.qml"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MenuSeparator {}
|
MenuSeparator {}
|
||||||
MenuItem { text: qsTr("Als PDF exportieren") }
|
MenuItem { text: qsTr("Als PDF exportieren") }
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import QtQuick.Controls
|
|||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
property string name: "users"
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
Label
|
Label
|
||||||
|
|||||||
1
enc_key_backup.txt
Normal file
1
enc_key_backup.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Lj30yFOP7hJmY5Cub1Go8fJz0UE+Zyo9cEqNxfY23Sc=
|
||||||
@@ -20,7 +20,7 @@ class Vermasseln:
|
|||||||
|
|
||||||
return storable_data
|
return storable_data
|
||||||
|
|
||||||
def entschluesseln(self, data, local= True):
|
def entschluesseln(self, data, local = True):
|
||||||
try:
|
try:
|
||||||
data_list = data.split(".")
|
data_list = data.split(".")
|
||||||
encoded_data = [b64decode(x) for x in data_list]
|
encoded_data = [b64decode(x) for x in data_list]
|
||||||
@@ -37,7 +37,7 @@ class Vermasseln:
|
|||||||
|
|
||||||
return decrypted_data
|
return decrypted_data
|
||||||
|
|
||||||
def __vermasslungsKobold(self, local= True):
|
def __vermasslungsKobold(self, local = True):
|
||||||
key = platform.processor().encode("utf-8") if local else b"(==daniishtverhaftetwegensexy#)"
|
key = platform.processor().encode("utf-8") if local else b"(==daniishtverhaftetwegensexy#)"
|
||||||
key = key[0:31]
|
key = key[0:31]
|
||||||
hash_key = SHA256.new(key)
|
hash_key = SHA256.new(key)
|
||||||
|
|||||||
2
qml.qrc
2
qml.qrc
@@ -42,5 +42,7 @@
|
|||||||
<file>Gui/CustomerDetailsView.qml</file>
|
<file>Gui/CustomerDetailsView.qml</file>
|
||||||
<file>Gui/ReadMe.qml</file>
|
<file>Gui/ReadMe.qml</file>
|
||||||
<file>Gui/UsersPage.qml</file>
|
<file>Gui/UsersPage.qml</file>
|
||||||
|
<file>Gui/PyqcrmConf.qml</file>
|
||||||
|
<file>Gui/CompanyConf.qml</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
Reference in New Issue
Block a user