diff --git a/nymea-app/resources.qrc b/nymea-app/resources.qrc index a05b924a..e08babd0 100644 --- a/nymea-app/resources.qrc +++ b/nymea-app/resources.qrc @@ -178,5 +178,6 @@ ui/system/GeneralSettingsPage.qml ui/components/Imprint.qml ui/appsettings/LookAndFeelSettingsPage.qml + ui/appsettings/AppLogPage.qml diff --git a/nymea-app/ui/appsettings/AppLogPage.qml b/nymea-app/ui/appsettings/AppLogPage.qml new file mode 100644 index 00000000..23d4f0ec --- /dev/null +++ b/nymea-app/ui/appsettings/AppLogPage.qml @@ -0,0 +1,33 @@ +import QtQuick 2.9 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 +import Nymea 1.0 +import "../components" + +Page { + header: GuhHeader { + text: qsTr("App log") + backButtonVisible: true + onBackPressed: pageStack.pop() + HeaderButton { + imageSource: "../images/edit-copy.svg" + onClicked: AppLogController.toClipboard() + } + } + + ListView { + anchors.fill: parent + + ScrollBar.vertical: ScrollBar {} + + model: AppLogController + delegate: Text { + width: parent.width + maximumLineCount: 2 + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + text: model.text + color: model.type === AppLogController.TypeWarning ? "red" : app.foregroundColor + font.pixelSize: app.smallFont + } + } +} diff --git a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml index 92bc2620..1e0fb6cb 100644 --- a/nymea-app/ui/appsettings/DeveloperOptionsPage.qml +++ b/nymea-app/ui/appsettings/DeveloperOptionsPage.qml @@ -43,7 +43,7 @@ Page { MeaListItemDelegate { Layout.fillWidth: true text: qsTr("View log") - onClicked: pageStack.push(appLogComponent) + onClicked: pageStack.push(Qt.resolvedUrl("../appsettings/AppLogPage.qml")) enabled: AppLogController.enabled } @@ -64,35 +64,4 @@ Page { } } } - - Component { - id: appLogComponent - Page { - header: GuhHeader { - text: qsTr("App log") - backButtonVisible: true - onBackPressed: pageStack.pop() - HeaderButton { - imageSource: "../images/edit-copy.svg" - onClicked: AppLogController.toClipboard() - } - } - - ListView { - anchors.fill: parent - - ScrollBar.vertical: ScrollBar {} - - model: AppLogController - delegate: Text { - width: parent.width - maximumLineCount: 2 - wrapMode: Text.WrapAtWordBoundaryOrAnywhere - text: model.text - color: model.type === AppLogController.TypeWarning ? "red" : app.foregroundColor - font.pixelSize: app.smallFont - } - } - } - } } diff --git a/nymea-app/ui/connection/ConnectingPage.qml b/nymea-app/ui/connection/ConnectingPage.qml index 7b3035ec..84ac3bb2 100644 --- a/nymea-app/ui/connection/ConnectingPage.qml +++ b/nymea-app/ui/connection/ConnectingPage.qml @@ -11,6 +11,20 @@ Page { signal cancel() + ColorIcon { + anchors { top: parent.top; right: parent.right; margins: app.margins } + height: app.iconSize + width: height + name: "../images/logs.svg" + visible: settings.showHiddenOptions + MouseArea { + anchors.fill: parent + onClicked: { + onClicked: pageStack.push(Qt.resolvedUrl("../appsettings/AppLogPage.qml")) + } + } + } + ColumnLayout { id: columnLayout anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter; margins: app.margins } @@ -28,7 +42,7 @@ Page { } Label { Layout.fillWidth: true - text: engine.connection.currentHost.uuid + text: engine.connection.currentHost.name.length > 0 ? engine.connection.currentHost.name : engine.connection.currentHost.uuid font.pixelSize: app.smallFont wrapMode: Text.WrapAtWordBoundaryOrAnywhere horizontalAlignment: Text.AlignHCenter