fixed default network
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user