From 33d2fac64066c05cb633f042f363c5c14a1c0179 Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Wed, 19 Aug 2026 13:10:22 +0200 Subject: [PATCH] Fix bug --- evcharger-app/qml/GeneralPage.qml | 4 ++-- evcharger-app/qml/NavigationItem.qml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/evcharger-app/qml/GeneralPage.qml b/evcharger-app/qml/GeneralPage.qml index d4081f1..83b9241 100644 --- a/evcharger-app/qml/GeneralPage.qml +++ b/evcharger-app/qml/GeneralPage.qml @@ -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?"), diff --git a/evcharger-app/qml/NavigationItem.qml b/evcharger-app/qml/NavigationItem.qml index f83cbf7..b1966af 100644 --- a/evcharger-app/qml/NavigationItem.qml +++ b/evcharger-app/qml/NavigationItem.qml @@ -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) }