Embedded: fix network detection

This commit is contained in:
Floris Bos 2024-01-15 00:16:43 +01:00
parent ebe72a4b16
commit 8c9de2d78c
7 changed files with 188 additions and 6 deletions

View file

@ -320,6 +320,16 @@ ApplicationWindow {
text: qsTr("Using custom repository: %1").arg(imageWriter.constantOsListUrl())
}
Text {
id: networkInfo
Layout.columnSpan: 3
color: "#ffffff"
font.pixelSize: 18
font.family: roboto.name
visible: imageWriter.isEmbeddedMode()
text: qsTr("Network not ready yet")
}
Text {
Layout.columnSpan: 3
color: "#ffffff"
@ -1316,6 +1326,10 @@ ApplicationWindow {
progressText.text = qsTr("Finalizing...")
}
function onNetworkInfo(msg) {
networkInfo.text = msg
}
function shuffle(arr) {
for (var i = 0; i < arr.length - 1; i++) {
var j = i + Math.floor(Math.random() * (arr.length - i));