PushRuleSettingsPopup: handle enter to save

This commit is contained in:
miruka 2021-02-28 17:28:39 -04:00
parent 156f89aca1
commit ef1f6edf31
2 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,5 @@
# TODO # TODO
- enter in field
- sfx selection - sfx selection
- custom action - custom action

View File

@ -78,6 +78,7 @@ HFlickableColumnPopup {
page.footer: AutoDirectionLayout { page.footer: AutoDirectionLayout {
ApplyButton { ApplyButton {
id: applyButton
text: qsTr("Save changes") text: qsTr("Save changes")
enabled: swipeView.currentItem.idField.text.trim() !== "" enabled: swipeView.currentItem.idField.text.trim() !== ""
loading: saveFutureId !== "" loading: saveFutureId !== ""
@ -98,6 +99,8 @@ HFlickableColumnPopup {
} }
} }
onKeyboardAccept: applyButton.clicked()
CustomLabel { CustomLabel {
visible: root.rule.default visible: root.rule.default
text: qsTr("Some settings cannot be changed for default server rules") text: qsTr("Some settings cannot be changed for default server rules")