refactor(DeviceInfo.qml): enhance layout and add action buttons in DeviceInfo.qml

This commit is contained in:
uncor3
2026-06-09 21:47:44 +03:00
parent f09e89377c
commit 17eca1dbb5
+119 -59
View File
@@ -21,9 +21,54 @@ Item {
RowLayout { RowLayout {
spacing: 12 spacing: 12
DeviceImage { ColumnLayout {
iosVersion: info ? info.ios_version_major : 0 DeviceImage {
displayName: v("product_type", "Unknown Device") iosVersion: info ? info.ios_version_major : 0
displayName: v("product_type", "Unknown Device")
}
RowLayout {
//center
anchors.horizontalCenter: parent.horizontalCenter
// implicitHeight: 50
spacing: 10
//
Button {
icon.source: "qrc:/resources/icons/ic_outline-power-settings-new.svg"
HoverHandler {
cursorShape: Qt.PointingHandCursor
}
//FIXME: wire up
onClicked: {
}
background: Rectangle {
color: "transparent"
}
}
Button {
icon.source: "qrc:/resources/icons/ic_twotone-restart-alt.svg"
HoverHandler {
cursorShape: Qt.PointingHandCursor
}
//FIXME: wire up
onClicked: {
}
background: Rectangle {
color: "transparent"
}
}
Button {
icon.source: "qrc:/resources/icons/hugeicons_wrench-01.svg"
HoverHandler {
cursorShape: Qt.PointingHandCursor
}
//FIXME: wire up
onClicked: {
}
background: Rectangle {
color: "transparent"
}
}
}
} }
ColumnLayout { ColumnLayout {
@@ -47,73 +92,88 @@ Item {
color: "#666" color: "#666"
} }
} }
GridLayout { Item {
id: grid
columns: 4
columnSpacing: 14
rowSpacing: 8
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: grid.implicitHeight + 20 // match your margins
// implicitHeight: grid.implicitHeight
// Row 0 Rectangle {
Label { text: "iOS Version:"; font.bold: true } anchors.fill: parent
Label { text: v("ProductVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Device Name:"; font.bold: true } color: Qt.rgba(255, 255, 255, 0.1)
Label { text: v("DeviceName", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } radius: 4
z: -1
}
GridLayout {
id: grid
columns: 4
columnSpacing: 14
rowSpacing: 8
anchors.fill: parent
anchors.margins: 10
// Row 1 // Row 0
Label { text: "Activation State:"; font.bold: true } Label { text: "iOS Version:"; font.bold: true }
Label { text: v("ActivationState", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("ProductVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Device Class:"; font.bold: true } Label { text: "Device Name:"; font.bold: true }
Label { text: v("DeviceClass", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("DeviceName", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 2 // Row 1
Label { text: "Jailbroken:"; font.bold: true } Label { text: "Activation State:"; font.bold: true }
Label { text: v("Jailbroken", "TODO") ? "Yes" : "No"; elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("ActivationState", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Model Number:"; font.bold: true } Label { text: "Device Class:"; font.bold: true }
Label { text: v("ModelNumber", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("DeviceClass", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 3 // Row 2
Label { text: "CPU Architecture:"; font.bold: true } Label { text: "Jailbroken:"; font.bold: true }
Label { text: v("CPUArchitecture", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("Jailbroken", "TODO") ? "Yes" : "No"; elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Build Version:"; font.bold: true } Label { text: "Model Number:"; font.bold: true }
Label { text: v("BuildVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("ModelNumber", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 4 // Row 3
Label { text: "Hardware Model:"; font.bold: true } Label { text: "CPU Architecture:"; font.bold: true }
Label { text: v("HardwareModel", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("CPUArchitecture", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Region:"; font.bold: true } Label { text: "Build Version:"; font.bold: true }
Label { text: v("region", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("BuildVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 5 // Row 4
Label { text: "Hardware Platform:"; font.bold: true } Label { text: "Hardware Model:"; font.bold: true }
Label { text: v("HardwarePlatform", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("HardwareModel", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Firmware Version:"; font.bold: true } Label { text: "Region:"; font.bold: true }
Label { text: v("FirmwareVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("region", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 6 // Row 5
Label { text: "Bluetooth Address:"; font.bold: true } Label { text: "Hardware Platform:"; font.bold: true }
Label { text: v("BluetoothAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("HardwarePlatform", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "WiFi Address:"; font.bold: true } Label { text: "Firmware Version:"; font.bold: true }
Label { text: v("WiFiAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("FirmwareVersion", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 7 // Row 6
Label { text: "Ethernet Address:"; font.bold: true } Label { text: "Bluetooth Address:"; font.bold: true }
Label { text: v("EthernetAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("BluetoothAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Battery Health:"; font.bold: true } Label { text: "WiFi Address:"; font.bold: true }
Label { text: "TODO"; elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("WiFiAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 8 // Row 7
Label { text: "Production Device:"; font.bold: true } Label { text: "Ethernet Address:"; font.bold: true }
Label { text: "TODO"; elide: Text.ElideRight; Layout.fillWidth: true } Label { text: v("EthernetAddress", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "Serial Number:"; font.bold: true } Label { text: "Battery Health:"; font.bold: true }
Label { text: v("SerialNumber", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: "TODO"; elide: Text.ElideRight; Layout.fillWidth: true }
// Row 9 // Row 8
Label { text: "IMEI:"; font.bold: true } Label { text: "Production Device:"; font.bold: true }
Label { text: v("InternationalMobileEquipmentIdentity", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true } Label { text: "TODO"; elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "UDID:"; font.bold: true } Label { text: "Serial Number:"; font.bold: true }
Label { text: v("UniqueDeviceID", "TODO"); elide: Text.ElideMiddle; Layout.fillWidth: true } Label { text: v("SerialNumber", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
// Row 9
Label { text: "IMEI:"; font.bold: true }
Label { text: v("InternationalMobileEquipmentIdentity", "TODO"); elide: Text.ElideRight; Layout.fillWidth: true }
Label { text: "UDID:"; font.bold: true }
Label { text: v("UniqueDeviceID", "TODO"); elide: Text.ElideMiddle; Layout.fillWidth: true }
}
} }
} }
} }