minor fixess

This commit is contained in:
2026-07-13 06:04:04 +03:00
parent e9e2cbbfec
commit ff2b8a250e
34 changed files with 712 additions and 282 deletions
+22 -17
View File
@@ -58,6 +58,11 @@ Item {
Component.onCompleted: reload()
Rectangle {
anchors.fill: parent
color: "#161628"
}
Timer {
id: reloadTimer
interval: 1500
@@ -86,7 +91,7 @@ Item {
text: "Сеть (Ethernet)"
font.bold: true
font.pixelSize: 16
color: settingsContainer.darkMode ? "white" : "black"
color: "#ffffff"
horizontalAlignment: Text.AlignHCenter
}
Button { text: "\u21BB"; onClicked: page.reload() }
@@ -97,7 +102,7 @@ Item {
Layout.fillWidth: true
visible: page.devices.length === 0
text: "Ethernet-интерфейсы не найдены (или nmcli недоступен)."
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
color: "#cccccc"
wrapMode: Text.Wrap
}
@@ -107,8 +112,8 @@ Item {
Layout.fillWidth: true
Layout.preferredHeight: col.implicitHeight + 16
radius: 6
color: settingsContainer.darkMode ? "#40222c58" : "#40ffffff"
border.color: settingsContainer.darkMode ? "#80ffffff" : "#80000000"
color: "#40222c58"
border.color: "#80ffffff"
border.width: 1
ColumnLayout {
@@ -118,29 +123,29 @@ Item {
spacing: 2
Text {
text: modelData.device + " (" + modelData.state + ")"
color: settingsContainer.darkMode ? "white" : "black"
color: "#ffffff"
font.bold: true
}
Text {
text: "Соединение: " + (modelData.connection || "—")
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
color: "#cccccc"
font.pixelSize: 12
}
Text {
text: "IP: " + (modelData.addresses || "—")
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
color: "#cccccc"
font.pixelSize: 12
}
Text {
text: "Шлюз: " + (modelData.gateway || "—") + " DNS: " + (modelData.dns || "—")
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
color: "#cccccc"
font.pixelSize: 12
}
}
}
}
Rectangle { Layout.fillWidth: true; height: 1; color: settingsContainer.darkMode ? "#40ffffff" : "#40000000" }
Rectangle { Layout.fillWidth: true; height: 1; color: "#40ffffff" }
// ----- Configuration form -----
Text {
@@ -153,7 +158,7 @@ Item {
RowLayout {
Layout.fillWidth: true
Text { text: "Интерфейс:"; color: settingsContainer.darkMode ? "white" : "black"; Layout.preferredWidth: 120 }
Text { text: "Интерфейс:"; color: "#ffffff"; Layout.preferredWidth: 120 }
ComboBox {
id: ifaceCombo
Layout.fillWidth: true
@@ -163,14 +168,14 @@ Item {
RowLayout {
Layout.fillWidth: true
Text { text: "Статический IP:"; color: settingsContainer.darkMode ? "white" : "black"; Layout.preferredWidth: 120 }
Text { text: "Статический IP:"; color: "#ffffff"; Layout.preferredWidth: 120 }
Switch {
id: staticSwitch
checked: false
}
Text {
text: staticSwitch.checked ? "Статический" : "DHCP (авто)"
color: settingsContainer.darkMode ? "#cccccc" : "#444444"
color: "#cccccc"
}
Item { Layout.fillWidth: true }
}
@@ -180,16 +185,16 @@ Item {
columns: 2
visible: staticSwitch.checked
Text { text: "IP-адрес:"; color: settingsContainer.darkMode ? "white" : "black" }
Text { text: "IP-адрес:"; color: "#ffffff" }
TextField { id: addrField; Layout.fillWidth: true; placeholderText: "192.168.1.50" }
Text { text: "Префикс:"; color: settingsContainer.darkMode ? "white" : "black" }
Text { text: "Префикс:"; color: "#ffffff" }
TextField { id: prefixField; Layout.fillWidth: true; text: "24"; inputMethodHints: Qt.ImhDigitsOnly }
Text { text: "Шлюз:"; color: settingsContainer.darkMode ? "white" : "black" }
Text { text: "Шлюз:"; color: "#ffffff" }
TextField { id: gwField; Layout.fillWidth: true; placeholderText: "192.168.1.1" }
Text { text: "DNS:"; color: settingsContainer.darkMode ? "white" : "black" }
Text { text: "DNS:"; color: "#ffffff" }
TextField { id: dnsField; Layout.fillWidth: true; placeholderText: "8.8.8.8, 1.1.1.1" }
}
@@ -224,7 +229,7 @@ Item {
Text {
width: parent ? parent.width : 300
text: "Соединение может прерваться. Продолжить?"
color: settingsContainer.darkMode ? "white" : "black"
color: "#ffffff"
wrapMode: Text.Wrap
}
onAccepted: page.applyNow()