// Copyright (C) 2026 Danilo M. // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License version 2 as // published by the Free Software Foundation. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. import QtQuick import "../.." // The state line under the tile label: a green dot, the link's name, and its // local IP. One row per active link, because the API exposes no route metric // and the tile will not guess which link carries traffic. Column { id: tile required property var net width: parent ? parent.width : implicitWidth spacing: 2 Row { visible: tile.net.wiredUp width: tile.width spacing: 5 Rectangle { anchors.verticalCenter: parent.verticalCenter width: 7; height: 7; radius: 4 color: Theme.green } Text { width: parent.width - 12 elide: Text.ElideRight text: { const ip = tile.net.ipFor(tile.net.wiredName); return tile.net.wiredName + (ip !== "" ? " " + ip : ""); } font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } color: Theme.text } } Row { visible: tile.net.wifiUp width: tile.width spacing: 5 Rectangle { anchors.verticalCenter: parent.verticalCenter width: 7; height: 7; radius: 4 color: Theme.green } Text { width: parent.width - 12 elide: Text.ElideRight text: { const ip = tile.net.ipFor(tile.net.wifiDevice ? tile.net.wifiDevice.name : ""); return tile.net.wifiSsid + (ip !== "" ? " " + ip : ""); } font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } color: Theme.text } } Text { width: tile.width elide: Text.ElideRight visible: !tile.net.wiredUp && !tile.net.wifiUp text: tile.net.wifiOn ? "Disconnected" : "Off" font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } color: Theme.subtext } }