diff --git a/nymea-app/images.qrc b/nymea-app/images.qrc index 0c6a5287..3782deca 100644 --- a/nymea-app/images.qrc +++ b/nymea-app/images.qrc @@ -246,5 +246,8 @@ ui/images/twitter.svg ui/images/discourse.svg ui/images/telegram.svg + ui/images/facebook.svg + ui/images/help.svg + ui/images/discord.svg diff --git a/nymea-app/ui/MainMenu.qml b/nymea-app/ui/MainMenu.qml index 6da8c48f..855070fe 100644 --- a/nymea-app/ui/MainMenu.qml +++ b/nymea-app/ui/MainMenu.qml @@ -13,6 +13,7 @@ Drawer { signal openMagicSettings(); signal openAppSettings(); signal openSystemSettings(); + signal configureMainView(); signal startWirelessSetup(); signal startManualConnection(); @@ -140,6 +141,17 @@ Drawer { root.close(); } } + NymeaItemDelegate { + Layout.fillWidth: true + text: qsTr("Configure main view") + iconName: "../images/configure.svg" + progressive: false + visible: root.currentEngine && root.currentEngine.jsonRpcClient.currentHost + onClicked: { + root.configureMainView(); + root.close(); + } + } NymeaItemDelegate { Layout.fillWidth: true text: qsTr("App settings") @@ -166,6 +178,13 @@ Drawer { NymeaItemDelegate { Layout.fillWidth: true Layout.topMargin: app.margins + text: qsTr("Help") + iconName: "../images/help.svg" + progressive: false + onClicked: Qt.openUrlExternally("https://nymea.io/documentation/users/usage/first-steps") + } + NymeaItemDelegate { + Layout.fillWidth: true text: qsTr("Forum") iconName: "../images/discourse.svg" progressive: false @@ -178,6 +197,13 @@ Drawer { progressive: false onClicked: Qt.openUrlExternally("https://t.me/nymeacommunity") } + NymeaItemDelegate { + Layout.fillWidth: true + text: qsTr("Discord") + iconName: "../images/discord.svg" + progressive: false + onClicked: Qt.openUrlExternally("https://discord.gg/tX9YCpD") + } NymeaItemDelegate { Layout.fillWidth: true text: qsTr("Twitter") @@ -185,10 +211,15 @@ Drawer { progressive: false onClicked: Qt.openUrlExternally("https://twitter.com/nymea_io") } + NymeaItemDelegate { + Layout.fillWidth: true + text: qsTr("Facebook") + iconName: "../images/facebook.svg" + progressive: false + onClicked: Qt.openUrlExternally("https://m.facebook.com/groups/nymea") + } } - } - } - + } } diff --git a/nymea-app/ui/MainPage.qml b/nymea-app/ui/MainPage.qml index a699a761..d0b6353a 100644 --- a/nymea-app/ui/MainPage.qml +++ b/nymea-app/ui/MainPage.qml @@ -43,13 +43,17 @@ import "mainviews" Page { id: root + function configureViews() { + d.configOverlay = configComponent.createObject(contentContainer) + } + header: ToolBar { id: mainHeader RowLayout { anchors.fill: parent HeaderButton { - imageSource: "qrc:/styles/%1/logo.svg".arg(styleController.currentStyle) + imageSource: "../images/navigation-menu.svg" onClicked: { if (d.configOverlay != null) { d.configOverlay.destroy(); @@ -64,12 +68,6 @@ Page { qsTr("Configure main view") : swipeView.currentItem.item.title.length > 0 ? swipeView.currentItem.item.title : filteredContentModel.data(swipeView.currentIndex, "displayName") } - - HeaderButton { - imageSource: "../images/settings.svg" - visible: d.configOverlay == null - onClicked: d.configOverlay = configComponent.createObject(contentContainer) - } } } diff --git a/nymea-app/ui/Nymea.qml b/nymea-app/ui/Nymea.qml index 470716d4..f016ac9f 100644 --- a/nymea-app/ui/Nymea.qml +++ b/nymea-app/ui/Nymea.qml @@ -109,6 +109,7 @@ ApplicationWindow { onOpenMagicSettings: rootItem.openMagicSettings(); onOpenAppSettings: rootItem.openAppSettings(); onOpenSystemSettings: rootItem.openSystemSettings(); + onConfigureMainView: rootItem.configureMainView(); onStartManualConnection: rootItem.startManualConnection(); onStartWirelessSetup: rootItem.startWirelessSetup(); onStartDemoMode: rootItem.startDemoMode(); diff --git a/nymea-app/ui/RootItem.qml b/nymea-app/ui/RootItem.qml index 4c99d049..dc610b44 100644 --- a/nymea-app/ui/RootItem.qml +++ b/nymea-app/ui/RootItem.qml @@ -72,6 +72,11 @@ Item { function openSystemSettings() { d.pushSettingsPage("SettingsPage.qml") } + function configureMainView() { + swipeView.currentItem.pageStack.pop(null) + swipeView.currentItem.pageStack.currentItem.configureViews() + } + function startManualConnection() { d.pushSettingsPage("connection/ManualConnectPage.qml") } diff --git a/nymea-app/ui/devicepages/DevicePageBase.qml b/nymea-app/ui/devicepages/DevicePageBase.qml index 0c732ac2..b256a7fd 100644 --- a/nymea-app/ui/devicepages/DevicePageBase.qml +++ b/nymea-app/ui/devicepages/DevicePageBase.qml @@ -91,7 +91,7 @@ Page { if (root.showDetailsButton) { thingMenu.addItem(menuEntryComponent.createObject(thingMenu, {text: qsTr("Details"), iconSource: "../images/info.svg", functionName: "openGenericDevicePage"})) } - thingMenu.addItem(menuEntryComponent.createObject(thingMenu, {text: qsTr("Settings"), iconSource: "../images/configure.svg", functionName: "openThingSettingsPage"})) +// thingMenu.addItem(menuEntryComponent.createObject(thingMenu, {text: qsTr("Settings"), iconSource: "../images/configure.svg", functionName: "openThingSettingsPage"})) if (root.showLogsButton) { thingMenu.addItem(menuEntryComponent.createObject(thingMenu, {text: qsTr("Logs"), iconSource: "../images/logs.svg", functionName: "openDeviceLogPage"})) } diff --git a/nymea-app/ui/images/discord.svg b/nymea-app/ui/images/discord.svg new file mode 100644 index 00000000..4fec6dd0 --- /dev/null +++ b/nymea-app/ui/images/discord.svg @@ -0,0 +1,67 @@ + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/nymea-app/ui/images/facebook.svg b/nymea-app/ui/images/facebook.svg new file mode 100644 index 00000000..b8863f4a --- /dev/null +++ b/nymea-app/ui/images/facebook.svg @@ -0,0 +1,34 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/nymea-app/ui/images/help.svg b/nymea-app/ui/images/help.svg new file mode 100644 index 00000000..efeda013 --- /dev/null +++ b/nymea-app/ui/images/help.svg @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + +