feat (about/version): removed fallback to board_name, made it simpler

This commit is contained in:
D3rJust1n
2026-03-06 23:30:14 +01:00
parent 6d7d5dfcd5
commit aac61f12a5
4 changed files with 25 additions and 30 deletions
@@ -4,6 +4,7 @@
"os",
"kernel",
"title",
"board",
"host",
"uptime",
"cpu",
+1
View File
@@ -736,6 +736,7 @@
"system-os": "Betriebssystem:",
"system-packages": "Pakete:",
"system-product": "Produkt:",
"system-board": "Board:",
"system-title": "Systeminformationen",
"system-uptime": "Betriebszeit:",
"system-wm": "WM:",
+1
View File
@@ -736,6 +736,7 @@
"system-os": "OS:",
"system-packages": "Packages:",
"system-product": "Product:",
"system-board": "Board:",
"system-title": "System Information",
"system-uptime": "Uptime:",
"system-wm": "WM:",
@@ -33,7 +33,6 @@ ColumnLayout {
property string commitInfo: ""
property string qsVersion: ""
property string qsRevision: ""
property string boardNameFallback: ""
readonly property bool isGitVersion: root.currentVersion.endsWith("-git")
readonly property int gigaB: (1024 * 1024 * 1024)
@@ -151,6 +150,7 @@ ColumnLayout {
const kernel = root.getModule("Kernel");
const title = root.getModule("Title");
const product = root.getModule("Host");
const board = root.getModule("Board");
const cpu = root.getModule("CPU");
const gpu = root.getModule("GPU");
const mem = root.getModule("Memory");
@@ -158,8 +158,8 @@ ColumnLayout {
info += "OS: " + (os?.result?.prettyName || "N/A") + "\n";
info += "Kernel: " + (kernel?.result?.release || "N/A") + "\n";
info += "Host: " + (title?.result?.hostName || "N/A") + "\n";
const productName = product?.result?.name;
info += "Product: " + ((!productName || productName === "N/A") ? (root.boardNameFallback || "N/A") : productName) + "\n";
info += "Product: " + (product?.result?.name || "N/A") + "\n";
info += "Board: " + (board?.result?.name || "N/A") + "\n";
info += "CPU: " + (cpu?.result?.cpu || "N/A") + "\n";
if (gpu?.result && Array.isArray(gpu.result) && gpu.result.length > 0) {
info += "GPU: " + gpu.result.map(g => g.name || "Unknown").join(", ") + "\n";
@@ -188,9 +188,6 @@ ColumnLayout {
// Check if fastfetch is available before trying to run it
checkFastfetchProcess.running = true;
qsVersionProcess.running = true;
boardNameProcess.running = true;
Logger.d("VersionSubTab", "Current version:", root.currentVersion);
Logger.d("VersionSubTab", "Is git version:", root.isGitVersion);
@@ -275,24 +272,6 @@ ColumnLayout {
stderr: StdioCollector {}
}
Process {
id: boardNameProcess
command: ["cat", "/sys/class/dmi/id/board_name"]
running: false
onExited: function(exitCode) {
if (exitCode === 0) {
var output = stdout.text.trim();
if (output && output !== "" && output !== "N/A") {
root.boardNameFallback = output;
}
}
}
stdout: StdioCollector {}
stderr: StdioCollector {}
}
// Check if fastfetch is available before attempting to run it
Process {
id: checkFastfetchProcess
@@ -734,12 +713,25 @@ ColumnLayout {
}
NText {
text: {
const host = root.getModule("Host");
const name = host?.result?.name;
if (!name || name === "N/A" || name === "") {
return root.boardNameFallback || "N/A";
}
return name;
const title = root.getModule("Host");
return title?.result?.name || "N/A";
}
color: Color.mOnSurface
pointSize: sysInfo.textSize
Layout.fillWidth: true
wrapMode: Text.Wrap
}
// Board name
NText {
text: I18n.tr("panels.about.system-board")
color: Color.mOnSurfaceVariant
pointSize: sysInfo.textSize
}
NText {
text: {
const title = root.getModule("Board");
return title?.result?.name || "N/A";
}
color: Color.mOnSurface
pointSize: sysInfo.textSize