diff --git a/containers/libreportal/frontend/css/admin.css b/containers/libreportal/frontend/css/admin.css index 00fab6d..6797830 100644 --- a/containers/libreportal/frontend/css/admin.css +++ b/containers/libreportal/frontend/css/admin.css @@ -319,6 +319,8 @@ color: var(--text-primary); word-break: break-word; } +.sys-os-value { display: inline-flex; align-items: center; gap: 8px; } +.sys-os-icon { width: 18px; height: 18px; flex-shrink: 0; object-fit: contain; } /* Per-app table */ .sys-apps-wrap { diff --git a/containers/libreportal/frontend/icons/os/arch.svg b/containers/libreportal/frontend/icons/os/arch.svg new file mode 100644 index 0000000..921980f --- /dev/null +++ b/containers/libreportal/frontend/icons/os/arch.svg @@ -0,0 +1 @@ + diff --git a/containers/libreportal/frontend/icons/os/debian.svg b/containers/libreportal/frontend/icons/os/debian.svg new file mode 100644 index 0000000..a9192d1 --- /dev/null +++ b/containers/libreportal/frontend/icons/os/debian.svg @@ -0,0 +1 @@ + diff --git a/containers/libreportal/frontend/icons/os/fedora.svg b/containers/libreportal/frontend/icons/os/fedora.svg new file mode 100644 index 0000000..00b9e51 --- /dev/null +++ b/containers/libreportal/frontend/icons/os/fedora.svg @@ -0,0 +1 @@ + diff --git a/containers/libreportal/frontend/icons/os/linux.svg b/containers/libreportal/frontend/icons/os/linux.svg new file mode 100644 index 0000000..2da49ae --- /dev/null +++ b/containers/libreportal/frontend/icons/os/linux.svg @@ -0,0 +1 @@ + diff --git a/containers/libreportal/frontend/icons/os/ubuntu.svg b/containers/libreportal/frontend/icons/os/ubuntu.svg new file mode 100644 index 0000000..cadec4e --- /dev/null +++ b/containers/libreportal/frontend/icons/os/ubuntu.svg @@ -0,0 +1 @@ + diff --git a/containers/libreportal/frontend/js/components/admin/admin-system.js b/containers/libreportal/frontend/js/components/admin/admin-system.js index 1292074..d3d732c 100644 --- a/containers/libreportal/frontend/js/components/admin/admin-system.js +++ b/containers/libreportal/frontend/js/components/admin/admin-system.js @@ -287,7 +287,7 @@ class AdminSystem { const infoStrip = `

Host

- ${this.stat('OS', info.os || '—')} + ${this._osStat(info.os)} ${this.stat('Kernel', info.kernel || '—')} ${this.stat('Uptime', (info.uptime || '—').replace(/^up /, ''))} ${this.stat('CPU', info.cpu || '—')} @@ -399,6 +399,19 @@ class AdminSystem { stat(label, value) { return `
${this.escape(label)}${this.escape(value)}
`; } + + // OS stat with a distro icon (bundled under /icons/os/, generic Linux glyph + // for anything we don't have a logo for). + _osStat(os) { + const slug = String(os || '').toLowerCase().replace(/[^a-z0-9]/g, '') || 'linux'; + return `
+ OS + + + ${this.escape(os || '—')} + +
`; + } } // Lightweight formatter helpers shared with sub-pages so they don't each