2017-09-01 13:13:12 +00:00
|
|
|
import QtQuick 2.9
|
|
|
|
import QtQuick.Controls 2.2
|
2017-12-14 08:44:10 +00:00
|
|
|
import QtQuick.Layouts 1.3
|
2017-12-21 13:15:29 +00:00
|
|
|
import "../controls"
|
2017-09-02 10:17:51 +00:00
|
|
|
import com.fortfirewall 1.0
|
2017-09-01 13:13:12 +00:00
|
|
|
|
2017-09-01 15:13:17 +00:00
|
|
|
BasePage {
|
|
|
|
|
2018-01-10 09:57:27 +00:00
|
|
|
function onAboutToSave() { // override
|
|
|
|
const password = editPassword.text;
|
|
|
|
if (password) {
|
|
|
|
firewallConf.passwordHash = stringUtil.cryptoHash(password);
|
|
|
|
editPassword.text = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-09-19 08:35:43 +00:00
|
|
|
function onSaved() { // override
|
2017-09-03 07:20:07 +00:00
|
|
|
fortSettings.startWithWindows = cbStart.checked;
|
2017-09-03 06:49:58 +00:00
|
|
|
}
|
|
|
|
|
2017-09-06 12:24:03 +00:00
|
|
|
Frame {
|
2017-09-01 13:13:12 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
|
2017-12-21 13:15:29 +00:00
|
|
|
ColumnLayout {
|
2017-09-06 12:24:03 +00:00
|
|
|
anchors.fill: parent
|
|
|
|
spacing: 10
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: cbStart
|
2017-09-07 10:44:15 +00:00
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Start with Windows")
|
2017-09-06 12:24:03 +00:00
|
|
|
checked: fortSettings.startWithWindows
|
2017-09-07 05:34:18 +00:00
|
|
|
onToggled: {
|
|
|
|
setConfFlagsEdited();
|
|
|
|
}
|
2017-09-06 12:24:03 +00:00
|
|
|
}
|
2017-12-06 00:27:58 +00:00
|
|
|
|
2017-10-27 11:59:09 +00:00
|
|
|
CheckBox {
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Block access to network when Fort Firewall is not running")
|
2017-10-28 01:57:44 +00:00
|
|
|
checked: firewallConf.provBoot
|
2017-10-27 11:59:09 +00:00
|
|
|
onToggled: {
|
|
|
|
firewallConf.provBoot = checked;
|
|
|
|
|
|
|
|
setConfFlagsEdited();
|
|
|
|
}
|
|
|
|
}
|
2017-12-06 00:27:58 +00:00
|
|
|
|
2017-09-06 12:24:03 +00:00
|
|
|
CheckBox {
|
2017-09-07 10:44:15 +00:00
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Filter Enabled")
|
2017-09-06 12:24:03 +00:00
|
|
|
checked: firewallConf.filterEnabled
|
|
|
|
onToggled: {
|
|
|
|
firewallConf.filterEnabled = checked;
|
2017-09-07 05:34:18 +00:00
|
|
|
|
|
|
|
setConfFlagsEdited();
|
2017-09-06 12:24:03 +00:00
|
|
|
}
|
2017-09-01 13:13:12 +00:00
|
|
|
}
|
2017-12-06 00:27:58 +00:00
|
|
|
|
2018-01-12 08:52:09 +00:00
|
|
|
Row {
|
|
|
|
spacing: 20
|
2017-12-23 06:15:36 +00:00
|
|
|
|
2018-01-12 08:52:09 +00:00
|
|
|
CheckBox {
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Stop Traffic")
|
|
|
|
checked: firewallConf.stopTraffic
|
|
|
|
onToggled: {
|
|
|
|
firewallConf.stopTraffic = checked;
|
|
|
|
|
|
|
|
setConfFlagsEdited();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Stop Internet Traffic")
|
|
|
|
checked: firewallConf.stopInetTraffic
|
|
|
|
onToggled: {
|
|
|
|
firewallConf.stopInetTraffic = checked;
|
|
|
|
|
|
|
|
setConfFlagsEdited();
|
|
|
|
}
|
2017-12-23 06:15:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-11 08:54:38 +00:00
|
|
|
CheckBox {
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Log Errors")
|
|
|
|
checked: firewallConf.logErrors
|
|
|
|
onToggled: {
|
|
|
|
firewallConf.logErrors = checked;
|
|
|
|
|
|
|
|
setConfFlagsEdited();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-01-10 09:57:27 +00:00
|
|
|
Row {
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
CheckBox {
|
|
|
|
id: cbPassword
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Password:")
|
|
|
|
checked: firewallConf.hasPassword
|
|
|
|
onToggled: {
|
|
|
|
if (!checked) {
|
|
|
|
firewallConf.passwordHash =
|
|
|
|
editPassword.text = "";
|
|
|
|
} else {
|
|
|
|
editPassword.forceActiveFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
setConfEdited();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
TextFieldFrame {
|
|
|
|
id: editPassword
|
|
|
|
width: 180
|
|
|
|
echoMode: TextInput.Password
|
|
|
|
passwordMaskDelay: 300
|
|
|
|
readOnly: firewallConf.hasPassword || !cbPassword.checked
|
|
|
|
placeholderText: translationManager.dummyBool
|
|
|
|
&& (firewallConf.hasPassword
|
|
|
|
? qsTranslate("qml", "Installed")
|
|
|
|
: qsTranslate("qml", "Not Installed"))
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-12-06 00:27:58 +00:00
|
|
|
Row {
|
|
|
|
spacing: 4
|
|
|
|
|
|
|
|
Label {
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Language:")
|
|
|
|
}
|
|
|
|
ComboBox {
|
|
|
|
width: Math.max(implicitWidth, 180)
|
|
|
|
flat: true
|
|
|
|
currentIndex: translationManager.language
|
|
|
|
model: translationManager.naturalLabels
|
|
|
|
onActivated: fortManager.setLanguage(index)
|
|
|
|
}
|
2017-09-07 10:44:15 +00:00
|
|
|
}
|
2017-12-21 13:15:29 +00:00
|
|
|
|
|
|
|
Item {
|
|
|
|
Layout.fillHeight: true
|
|
|
|
}
|
|
|
|
|
2018-01-11 08:54:38 +00:00
|
|
|
RowLayout {
|
2017-12-21 13:15:29 +00:00
|
|
|
LinkButton {
|
2018-01-11 08:54:38 +00:00
|
|
|
visible: firewallConf.logErrors
|
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Logs")
|
|
|
|
tipText: path
|
|
|
|
onClicked: Qt.openUrlExternally("file:///" + path)
|
|
|
|
readonly property string path: fortSettings.logsPath
|
2017-12-21 13:15:29 +00:00
|
|
|
}
|
|
|
|
|
2018-01-11 08:54:38 +00:00
|
|
|
VSeparator {
|
|
|
|
visible: firewallConf.logErrors
|
|
|
|
}
|
2017-12-21 13:15:29 +00:00
|
|
|
|
2018-01-11 08:54:38 +00:00
|
|
|
LinkButton {
|
2017-12-21 13:15:29 +00:00
|
|
|
text: translationManager.dummyBool
|
2018-01-11 08:54:38 +00:00
|
|
|
&& qsTranslate("qml", "Profile")
|
|
|
|
tipText: path
|
|
|
|
onClicked: Qt.openUrlExternally("file:///" + path)
|
|
|
|
readonly property string path: fortSettings.profilePath
|
2017-12-21 13:15:29 +00:00
|
|
|
}
|
2018-01-11 08:54:38 +00:00
|
|
|
|
|
|
|
VSeparator {}
|
|
|
|
|
2017-12-21 13:15:29 +00:00
|
|
|
LinkButton {
|
2018-01-11 08:54:38 +00:00
|
|
|
text: translationManager.dummyBool
|
|
|
|
&& qsTranslate("qml", "Releases")
|
|
|
|
tipText: link
|
|
|
|
onClicked: Qt.openUrlExternally(link)
|
|
|
|
readonly property string link: fortSettings.appUpdatesUrl
|
2017-12-21 13:15:29 +00:00
|
|
|
}
|
|
|
|
}
|
2017-09-01 13:13:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|