|
@@ -17,10 +17,26 @@ Page {
|
|
|
window.close()
|
|
|
}
|
|
|
onLoadSettings: {
|
|
|
- settingsCovertMethodPicker.currentIndex = covertMethod
|
|
|
settingsSaveIpSwitch.checked = saveIP
|
|
|
settingsSaveUsernameSwitch.checked = saveUsername
|
|
|
- settingsCliPath.text = "CLI-Path: " + cliPath
|
|
|
+ settingsCliPath.text = "CLI-Path: " + cliPath
|
|
|
+ settingsKeyPath.text = "CLI-Path: " + keyPath
|
|
|
+ }
|
|
|
+ onKeyfileStatus: {
|
|
|
+ if(success) {
|
|
|
+ settingsKeyStatus.text = "Keyfile: OK"
|
|
|
+ settingsKeyStatus.color = "#3fdf3f"
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ settingsKeyStatus.text = "Keyfile: Error"
|
|
|
+ settingsKeyStatus.color = "#df3f3f"
|
|
|
+ settingsKeyPath.text = msg
|
|
|
+ }
|
|
|
+ }
|
|
|
+ onKeyfileClosedOK: {
|
|
|
+ settingsKeyStatus.text = "Keyfile:"
|
|
|
+ settingsKeyStatus.color = "#ffffff"
|
|
|
+ settingsKeyPath.text = " "
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -43,7 +59,7 @@ Page {
|
|
|
Layout.preferredWidth: 400
|
|
|
Layout.preferredHeight: 50
|
|
|
color: "#ffffff"
|
|
|
- text: "Covert Channel Method:"
|
|
|
+ text: "Autofill default IP on start:"
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
horizontalAlignment: Text.AlignLeft
|
|
|
font.pixelSize: 20
|
|
@@ -54,30 +70,43 @@ Page {
|
|
|
Layout.preferredWidth: 400
|
|
|
Layout.preferredHeight: 50
|
|
|
color: "#ffffff"
|
|
|
- text: "Autofill default IP on start:"
|
|
|
+ text: "Autofill default username on start:"
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
horizontalAlignment: Text.AlignLeft
|
|
|
font.pixelSize: 20
|
|
|
}
|
|
|
|
|
|
Text {
|
|
|
+ id: settingsCliPath
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
Layout.preferredWidth: 400
|
|
|
Layout.preferredHeight: 50
|
|
|
color: "#ffffff"
|
|
|
- text: "Autofill default username on start:"
|
|
|
+ text: "CLI-Path: "
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
horizontalAlignment: Text.AlignLeft
|
|
|
font.pixelSize: 20
|
|
|
}
|
|
|
|
|
|
Text {
|
|
|
- id: settingsCliPath
|
|
|
+ id: settingsKeyStatus
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
Layout.preferredWidth: 400
|
|
|
Layout.preferredHeight: 50
|
|
|
color: "#ffffff"
|
|
|
- text: "CLI-Path: "
|
|
|
+ text: "Keyfile:"
|
|
|
+ verticalAlignment: Text.AlignVCenter
|
|
|
+ horizontalAlignment: Text.AlignLeft
|
|
|
+ font.pixelSize: 20
|
|
|
+ }
|
|
|
+
|
|
|
+ Text {
|
|
|
+ id: settingsKeyPath
|
|
|
+ Layout.alignment: Qt.AlignCenter
|
|
|
+ Layout.preferredWidth: 400
|
|
|
+ Layout.preferredHeight: 50
|
|
|
+ color: "#ffffff"
|
|
|
+ text: " "
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
horizontalAlignment: Text.AlignLeft
|
|
|
font.pixelSize: 20
|
|
@@ -100,25 +129,6 @@ Page {
|
|
|
Layout.preferredWidth: 500
|
|
|
Layout.preferredHeight: parent.height
|
|
|
|
|
|
- ComboBox {
|
|
|
- id: settingsCovertMethodPicker
|
|
|
- Layout.alignment: Qt.AlignCenter
|
|
|
- Layout.preferredHeight: 50
|
|
|
- Layout.preferredWidth: 400
|
|
|
-
|
|
|
- model: ListModel {
|
|
|
- ListElement {
|
|
|
- text: "Method 1"
|
|
|
- }
|
|
|
- ListElement {
|
|
|
- text: "Method 2"
|
|
|
- }
|
|
|
- ListElement {
|
|
|
- text: "Method 3"
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
Switch {
|
|
|
id: settingsSaveIpSwitch
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
@@ -144,7 +154,7 @@ Page {
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
Layout.preferredHeight: 50
|
|
|
Layout.preferredWidth: 220
|
|
|
- text: "Change (req. restart)"
|
|
|
+ text: "Change (needs restart)"
|
|
|
font.pixelSize: 20
|
|
|
// @disable-check M223
|
|
|
onClicked: {
|
|
@@ -153,6 +163,37 @@ Page {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ ColumnLayout {
|
|
|
+ Layout.alignment: Qt.AlignCenter
|
|
|
+ Button {
|
|
|
+ id: settingsChangeKeyfilePathButton
|
|
|
+ Layout.alignment: Qt.AlignCenter
|
|
|
+ Layout.preferredHeight: 50
|
|
|
+ Layout.preferredWidth: 220
|
|
|
+ text: "Select"
|
|
|
+ font.pixelSize: 20
|
|
|
+ // @disable-check M223
|
|
|
+ onClicked: {
|
|
|
+ // @disable-check M222
|
|
|
+ settingsKeyfileDialog.open()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ Button {
|
|
|
+ id: settingsDisableKeyfile
|
|
|
+ Layout.alignment: Qt.AlignCenter
|
|
|
+ Layout.preferredHeight: 50
|
|
|
+ Layout.preferredWidth: 220
|
|
|
+ text: "Close Keyfile"
|
|
|
+ font.pixelSize: 20
|
|
|
+ // @disable-check M223
|
|
|
+ onClicked: {
|
|
|
+ // @disable-check M222
|
|
|
+ _qmlHandler.onKeyfileClosed()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
Button {
|
|
|
id: settingsDeleteMeButton
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
@@ -173,7 +214,6 @@ Page {
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
Layout.preferredWidth: parent.width
|
|
|
Layout.preferredHeight: 2
|
|
|
- Layout.bottomMargin: 30
|
|
|
color: Material.accent
|
|
|
}
|
|
|
|
|
@@ -190,7 +230,9 @@ Page {
|
|
|
Layout.preferredHeight: 50
|
|
|
text: "Select defaults"
|
|
|
font.pixelSize: 20
|
|
|
+ // @disable-check M223
|
|
|
onClicked: {
|
|
|
+ // @disable-check M222
|
|
|
_qmlHandler.onSettingsResetButton()
|
|
|
}
|
|
|
}
|
|
@@ -202,12 +244,17 @@ Page {
|
|
|
Layout.preferredHeight: 50
|
|
|
text: "Save Changes"
|
|
|
font.pixelSize: 20
|
|
|
+ // @disable-check M223
|
|
|
onClicked: {
|
|
|
+ // @disable-check M222
|
|
|
_qmlHandler.onSettingsSaveButton(
|
|
|
- settingsCovertMethodPicker.currentIndex,
|
|
|
settingsSaveIpSwitch.checked,
|
|
|
settingsSaveUsernameSwitch.checked,
|
|
|
- settingsCliPath.text.replace("CLI-Path: ",
|
|
|
+ // @disable-check M222
|
|
|
+ settingsCliPath.text.replace("CLI-Path: ",
|
|
|
+ ""),
|
|
|
+ // @disable-check M222
|
|
|
+ settingsKeyPath.text.replace(" ",
|
|
|
""))
|
|
|
}
|
|
|
}
|
|
@@ -219,7 +266,9 @@ Page {
|
|
|
Layout.preferredHeight: 50
|
|
|
text: "Revert Changes"
|
|
|
font.pixelSize: 20
|
|
|
+ // @disable-check M223
|
|
|
onClicked: {
|
|
|
+ // @disable-check M222
|
|
|
_qmlHandler.onSettingsRevertChangesButton()
|
|
|
}
|
|
|
}
|
|
@@ -233,14 +282,32 @@ Page {
|
|
|
folder: shortcuts.home
|
|
|
// @disable-check M223
|
|
|
onAccepted: {
|
|
|
- // @disable-check M222
|
|
|
var path = settingsCliDialog.fileUrl.toString()
|
|
|
+ // @disable-check M222
|
|
|
path = path.replace(/^(file:\/{2})/, "")
|
|
|
settingsCliPath.text = "CLI-Path: " + path
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ FileDialog {
|
|
|
+ id: settingsKeyfileDialog
|
|
|
+ title: "Select keyfile to use"
|
|
|
+ folder: shortcuts.home
|
|
|
+ // @disable-check M223
|
|
|
+ onAccepted: {
|
|
|
+ var path = settingsKeyfileDialog.fileUrl.toString()
|
|
|
+ // @disable-check M222
|
|
|
+ path = path.replace(/^(file:\/{2})/, "")
|
|
|
+ settingsKeyPath.text = " " + path
|
|
|
+ // @disable-check M222
|
|
|
+ _qmlHandler.onKeyfileSelected(path)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
DeleteMePopup {
|
|
|
id: deleteMePopup
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|