fixed default network

This commit is contained in:
2026-06-29 15:06:48 +03:00
parent 980608a279
commit e9e2cbbfec
18 changed files with 1227 additions and 138 deletions
+20
View File
@@ -10,6 +10,7 @@ Dialog {
standardButtons: Dialog.Ok | Dialog.Cancel
property string editId: ""
property bool responseCheckWasEnabled: false
function openForCreate() {
editId = ""
@@ -24,6 +25,8 @@ Dialog {
typeCombo.currentIndex = 0
holdSwitch.checked = true
holdSlider.value = 800
responseCheckSwitch.checked = false
responseCheckWasEnabled = false
open()
}
@@ -45,6 +48,8 @@ Dialog {
typeCombo.currentIndex = (o.actionType === "http_post") ? 1 : 0
holdSwitch.checked = (o.triggerMode !== "click")
holdSlider.value = (o.holdMs && o.holdMs > 0) ? o.holdMs : 800
responseCheckSwitch.checked = !!o.responseCheckEnabled
responseCheckWasEnabled = responseCheckSwitch.checked
open()
}
@@ -141,6 +146,19 @@ Dialog {
value: 800
}
}
RowLayout {
Layout.fillWidth: true
Text { text: "Расширенная проверка:"; color: settingsContainer.darkMode ? "white" : "black" }
Switch { id: responseCheckSwitch }
Text {
Layout.fillWidth: true
text: "Правила JSON — в веб-конфигураторе"
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
font.pixelSize: 11
wrapMode: Text.WordWrap
}
}
}
onAccepted: {
@@ -156,6 +174,8 @@ Dialog {
typeCombo.currentText, urlF.text,
successF.text, errorF.text, pendingF.text,
colorF.text, mode, hold)
if (responseCheckSwitch.checked !== responseCheckWasEnabled)
btnController.setResponseCheckEnabled(editId, responseCheckSwitch.checked)
}
}
}