Merge claude/2
This commit is contained in:
commit
8e9a084389
@ -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 {
|
||||
|
||||
1
containers/libreportal/frontend/icons/os/arch.svg
Normal file
1
containers/libreportal/frontend/icons/os/arch.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 72c44 78 84 178 176 372-72-44-136-56-176-56s-104 12-176 56C172 250 212 150 256 72z" fill="#1793d1"/></svg>
|
||||
|
After Width: | Height: | Size: 183 B |
1
containers/libreportal/frontend/icons/os/debian.svg
Normal file
1
containers/libreportal/frontend/icons/os/debian.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M296 120a160 160 0 1 0 96 256 104 104 0 1 1-58-150" fill="none" stroke="#d70a53" stroke-width="34" stroke-linecap="round"/></svg>
|
||||
|
After Width: | Height: | Size: 201 B |
1
containers/libreportal/frontend/icons/os/fedora.svg
Normal file
1
containers/libreportal/frontend/icons/os/fedora.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="192" fill="#3c6eb4"/><path d="M300 168a60 60 0 0 0-98 48v118" fill="none" stroke="#fff" stroke-width="40" stroke-linecap="round" stroke-linejoin="round"/><path d="M170 262h96" fill="none" stroke="#fff" stroke-width="36" stroke-linecap="round"/></svg>
|
||||
|
After Width: | Height: | Size: 342 B |
1
containers/libreportal/frontend/icons/os/linux.svg
Normal file
1
containers/libreportal/frontend/icons/os/linux.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 60c-66 0-104 50-104 122 0 42-26 66-44 116-14 40-10 74 28 86 24 46 72 42 120 42s96 4 120-42c38-12 42-46 28-86-18-50-44-74-44-116 0-72-38-122-104-122z" fill="#2d2d2d"/><ellipse cx="256" cy="332" rx="74" ry="96" fill="#f7f7f7"/><ellipse cx="230" cy="150" rx="15" ry="20" fill="#fff"/><ellipse cx="282" cy="150" rx="15" ry="20" fill="#fff"/><circle cx="234" cy="155" r="7" fill="#1b1b1b"/><circle cx="278" cy="155" r="7" fill="#1b1b1b"/><path d="M238 175h36l-18 24z" fill="#f5a623"/><path d="M206 448c-12 26 18 34 40 24-6-16-22-22-40-24z" fill="#f5a623"/><path d="M306 448c12 26-18 34-40 24 6-16 22-22 40-24z" fill="#f5a623"/></svg>
|
||||
|
After Width: | Height: | Size: 705 B |
1
containers/libreportal/frontend/icons/os/ubuntu.svg
Normal file
1
containers/libreportal/frontend/icons/os/ubuntu.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><circle cx="256" cy="256" r="148" fill="none" stroke="#e95420" stroke-width="38"/><circle cx="256" cy="108" r="36" fill="#e95420"/><circle cx="128" cy="330" r="36" fill="#e95420"/><circle cx="384" cy="330" r="36" fill="#e95420"/></svg>
|
||||
|
After Width: | Height: | Size: 298 B |
@ -287,7 +287,7 @@ class AdminSystem {
|
||||
const infoStrip = `
|
||||
<div class="sys-section-head"><h2>Host</h2></div>
|
||||
<div class="sys-strip">
|
||||
${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 `<div class="sys-stat"><span class="sys-stat-label">${this.escape(label)}</span><strong class="sys-stat-value">${this.escape(value)}</strong></div>`;
|
||||
}
|
||||
|
||||
// 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 `<div class="sys-stat">
|
||||
<span class="sys-stat-label">OS</span>
|
||||
<strong class="sys-stat-value sys-os-value">
|
||||
<img class="sys-os-icon" src="/icons/os/${slug}.svg" alt="" onerror="this.onerror=null;this.src='/icons/os/linux.svg'">
|
||||
${this.escape(os || '—')}
|
||||
</strong>
|
||||
</div>`;
|
||||
}
|
||||
}
|
||||
|
||||
// Lightweight formatter helpers shared with sub-pages so they don't each
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user