pragma ComponentBehavior: Bound import ".." import qs.components import qs.components.controls import qs.components.effects import qs.services import qs.config import QtQuick import QtQuick.Layouts ColumnLayout { id: root required property Session session spacing: Appearance.spacing.normal MaterialIcon { Layout.alignment: Qt.AlignHCenter text: "cable" font.pointSize: Appearance.font.size.extraLarge * 3 font.bold: true } StyledText { Layout.alignment: Qt.AlignHCenter text: qsTr("Ethernet settings") font.pointSize: Appearance.font.size.large font.bold: true } StyledText { Layout.topMargin: Appearance.spacing.large text: qsTr("Ethernet devices") font.pointSize: Appearance.font.size.larger font.weight: 500 } StyledText { text: qsTr("Available ethernet devices") color: Colours.palette.m3outline } StyledRect { Layout.fillWidth: true implicitHeight: ethernetInfo.implicitHeight + Appearance.padding.large * 2 radius: Appearance.rounding.normal color: Colours.tPalette.m3surfaceContainer ColumnLayout { id: ethernetInfo anchors.left: parent.left anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.margins: Appearance.padding.large spacing: Appearance.spacing.small / 2 StyledText { text: qsTr("Total devices") } StyledText { text: qsTr("%1").arg(Network.ethernetDeviceCount || Network.ethernetDevices.length) color: Colours.palette.m3outline font.pointSize: Appearance.font.size.small } StyledText { Layout.topMargin: Appearance.spacing.normal text: qsTr("Connected devices") } StyledText { text: qsTr("%1").arg(Network.ethernetDevices.filter(d => d.connected).length) color: Colours.palette.m3outline font.pointSize: Appearance.font.size.small } } } StyledText { Layout.topMargin: Appearance.spacing.large text: qsTr("Debug Info") font.pointSize: Appearance.font.size.larger font.weight: 500 } StyledRect { Layout.fillWidth: true implicitHeight: debugInfo.implicitHeight + Appearance.padding.large * 2 radius: Appearance.rounding.normal color: Colours.tPalette.m3surfaceContainer ColumnLayout { id: debugInfo anchors.left: parent.left anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter anchors.margins: Appearance.padding.large spacing: Appearance.spacing.small / 2 StyledText { text: qsTr("Process running: %1").arg(Network.ethernetProcessRunning ? "Yes" : "No") font.pointSize: Appearance.font.size.small } StyledText { text: qsTr("List length: %1").arg(Network.ethernetDevices.length) font.pointSize: Appearance.font.size.small } StyledText { text: qsTr("Device count: %1").arg(Network.ethernetDeviceCount) font.pointSize: Appearance.font.size.small } StyledText { Layout.topMargin: Appearance.spacing.normal text: qsTr("Debug: %1").arg(Network.ethernetDebugInfo || "No info") font.pointSize: Appearance.font.size.small color: Colours.palette.m3outline wrapMode: Text.Wrap Layout.maximumWidth: parent.width } } } }