diff --git a/nymea-app/ui/MainMenu.qml b/nymea-app/ui/MainMenu.qml index 15b4dd14..120f44ff 100644 --- a/nymea-app/ui/MainMenu.qml +++ b/nymea-app/ui/MainMenu.qml @@ -161,7 +161,8 @@ Drawer { text: qsTr("Configure main view") iconName: "../images/configure.svg" progressive: false - visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost + visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost && + !Configuration.hasOwnProperty("mainViewsFilter") onClicked: { root.configureMainView(); root.close(); diff --git a/nymea-app/ui/MainPage.qml b/nymea-app/ui/MainPage.qml index 02d885fe..5cb53b68 100644 --- a/nymea-app/ui/MainPage.qml +++ b/nymea-app/ui/MainPage.qml @@ -44,7 +44,14 @@ Page { id: root function configureViews() { + if (Configuration.hasOwnProperty("mainViewsFilter")) { + console.warn("Main views configuration is disabled by app configuration") + return + } + + PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection) d.configOverlay = configComponent.createObject(contentContainer) + mainHeader.menuOpen = false; } header: ToolBar { @@ -287,9 +294,7 @@ Page { iconSource: "../images/" + model.icon + ".svg" onPressAndHold: { - PlatformHelper.vibrate(PlatformHelper.HapticsFeedbackSelection) - d.configOverlay = configComponent.createObject(contentContainer) - mainHeader.menuOpen = false; + root.configureViews(); } } } @@ -464,8 +469,11 @@ Page { header: RowLayout { id: headerRow + width: parent.width Label { text: model.displayName + Layout.fillWidth: true + elide: Text.ElideRight } }