1 parent
bee4360ca0
commit
33d2fac640
2 files changed
+5
-5
No files matched your search
@@ -68,7 +68,7 @@ NavigationPage {
|
||||
iconName: "power_settings_new"
|
||||
title: qsTr("Reboot")
|
||||
description: qsTr("Restart the charger")
|
||||
action: function() {
|
||||
activationCallback: function() {
|
||||
confirmationDialog.openFor(
|
||||
"espReset",
|
||||
qsTr("Reboot charger?"),
|
||||
@@ -80,7 +80,7 @@ NavigationPage {
|
||||
iconName: "delete_forever"
|
||||
title: qsTr("Factory reset")
|
||||
description: qsTr("Erase all settings and restore defaults")
|
||||
action: function() {
|
||||
activationCallback: function() {
|
||||
confirmationDialog.openFor(
|
||||
"factoryReset",
|
||||
qsTr("Factory reset charger?"),
|
||||
|
||||
@@ -11,7 +11,7 @@ WhiteItemDelegate {
|
||||
property string description
|
||||
property Component component
|
||||
property var componentProperties: ({})
|
||||
property var action: null
|
||||
property var activationCallback: null
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
||||
@@ -19,8 +19,8 @@ WhiteItemDelegate {
|
||||
implicitHeight: Math.max(row.implicitHeight, 50)
|
||||
|
||||
onClicked: {
|
||||
if (typeof navigationItem.action === "function")
|
||||
navigationItem.action()
|
||||
if (typeof navigationItem.activationCallback === "function")
|
||||
navigationItem.activationCallback()
|
||||
else if (navigationItem.component)
|
||||
stackView.push(navigationItem.component, navigationItem.componentProperties)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user