Improve ConnectingPage a bit
This commit is contained in:
parent
0629da0790
commit
d62b3333ce
@ -178,5 +178,6 @@
|
||||
<file>ui/system/GeneralSettingsPage.qml</file>
|
||||
<file>ui/components/Imprint.qml</file>
|
||||
<file>ui/appsettings/LookAndFeelSettingsPage.qml</file>
|
||||
<file>ui/appsettings/AppLogPage.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
33
nymea-app/ui/appsettings/AppLogPage.qml
Normal file
33
nymea-app/ui/appsettings/AppLogPage.qml
Normal file
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Reference in New Issue
Block a user