Standalone Open OSCAR Server admin dashboard with login, user/session/room management, BART, buddy list, Gotify addon, audit log, and API console. Includes AI disclosure and open-source project docs.
199 lines
14 KiB
PHP
199 lines
14 KiB
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* BART/Buddy ART info page.
|
|
*
|
|
* Static help page linked from the dashboard BART tab. Keep content practical
|
|
* and include sources/caveats when protocol details weren't verified live.
|
|
*/
|
|
require_once __DIR__ . '/lib.php';
|
|
$admin = admin_require_login();
|
|
|
|
admin_page('BART Info', 'dashboard', function (): void {
|
|
?>
|
|
<style>
|
|
.bip { display: grid; gap: 1rem; }
|
|
.bip-hero { padding: 1.25rem 1.4rem; }
|
|
.bip-hero h1 { margin: .2rem 0 .35rem; font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; }
|
|
.bip-hero p { margin: 0; max-width: 70ch; }
|
|
.bip-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
|
|
.bip-section { padding: 1.25rem 1.4rem; }
|
|
.bip-section h2 { margin: 0 0 .35rem; font-size: 1.2rem; letter-spacing: -.01em; }
|
|
.bip-section > p { margin: 0 0 1rem; color: var(--muted); max-width: 75ch; }
|
|
.bip-caveat { padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid rgba(255,211,106,.28); background: rgba(255,211,106,.08); }
|
|
.bip-caveat strong { color: #ffe3a0; }
|
|
.bip-cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; }
|
|
.bip-card { padding: 1rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); min-width: 0; }
|
|
.bip-card h3 { margin: 0 0 .4rem; font-size: .95rem; }
|
|
.bip-card p { margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
|
|
.bip-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
|
|
.bip-step-list { display: grid; gap: .65rem; }
|
|
.bip-step { padding: 1rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); min-width: 0; }
|
|
.bip-step h3 { margin: 0 0 .35rem; font-size: .92rem; display: flex; gap: .5rem; align-items: center; }
|
|
.bip-step-num { width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: rgba(110,168,255,.16); color: var(--accent); font-size: .75rem; font-weight: 700; flex-shrink: 0; }
|
|
.bip-step p, .bip-step li { color: var(--muted); font-size: .88rem; line-height: 1.55; overflow-wrap: anywhere; }
|
|
.bip-step ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
|
|
.bip-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
|
|
.bip-table { width: 100%; border-collapse: collapse; min-width: 760px; }
|
|
.bip-table th, .bip-table td { padding: .75rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(148,163,184,.1); font-size: .86rem; }
|
|
.bip-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; background: rgba(255,255,255,.02); }
|
|
.bip-table tr:last-child td { border-bottom: 0; }
|
|
.bip-table td code, .bip code { font-family: var(--mono); font-size: .92em; background: rgba(110,168,255,.1); padding: .08rem .3rem; border-radius: 4px; }
|
|
.bip-source-list { display: grid; gap: .65rem; }
|
|
.bip-source { display: block; padding: 1rem; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); color: inherit; text-decoration: none; min-width: 0; }
|
|
.bip-source:hover { border-color: rgba(110,168,255,.3); background: rgba(110,168,255,.04); }
|
|
.bip-source h3 { margin: 0 0 .3rem; font-size: .92rem; }
|
|
.bip-source p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; overflow-wrap: anywhere; }
|
|
@media (max-width: 980px) { .bip-cards { grid-template-columns: 1fr; } .bip-grid-2 { grid-template-columns: 1fr; } }
|
|
@media (max-width: 700px) { .bip-section, .bip-hero { padding: 1rem; } }
|
|
</style>
|
|
|
|
<div class="bip">
|
|
<section class="panel bip-hero reveal">
|
|
<div style="display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;flex-wrap:wrap">
|
|
<div>
|
|
<div class="eyebrow">Open OSCAR Server</div>
|
|
<h1>BART / Buddy ART Guide</h1>
|
|
<p class="muted">What BART assets are, how type IDs and hashes work, and how to manage them on the server and in OSCAR clients.</p>
|
|
</div>
|
|
<div class="bip-actions">
|
|
<a class="btn btn-ghost" href="index.php" style="text-decoration:none">
|
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M15 18l-6-6 6-6"/></svg>
|
|
Back to Dashboard
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bip-section reveal delay-1">
|
|
<div class="bip-caveat">
|
|
<strong>Accuracy note:</strong> This is a practical guide. Type IDs/names/descriptions reflect common OSCAR BART documentation and the catalog used by this admin UI. Management API endpoint details are based on Open OSCAR Server <code>api.yml</code>. NINA wiki was offline during this update, so protocol details were not re-verified live. Verify implementation-specific behavior against the sources below.
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bip-section reveal delay-1">
|
|
<h2>What is BART?</h2>
|
|
<p>BART stands for <strong>Buddy ART</strong>. It's the OSCAR asset system used for buddy icons, sounds, emoticon sets, IM chrome, status strings, and other client art.</p>
|
|
<div class="bip-cards">
|
|
<div class="bip-card">
|
|
<h3>Identified by type + hash</h3>
|
|
<p>Each asset has a <strong>type ID</strong> (what it is) and a <strong>hash</strong> (usually MD5 hex of the file content). Together they identify the asset.</p>
|
|
</div>
|
|
<div class="bip-card">
|
|
<h3>Stored on the server</h3>
|
|
<p>The OSCAR server stores BART assets. Clients upload/download through the BART foodgroup (<code>0x0010</code>), and admins can manage them through the Management API.</p>
|
|
</div>
|
|
<div class="bip-card">
|
|
<h3>Used by clients</h3>
|
|
<p>Clients reference BART assets for buddy icons, arrival/depart sounds, IM chrome, emoticons, and other features. Support varies by client version.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bip-section reveal delay-1">
|
|
<h2>Common BART type IDs</h2>
|
|
<p>Type IDs tell the server and client what the asset is for. These are the known types shown in the admin catalog.</p>
|
|
<div class="bip-table-wrap">
|
|
<table class="bip-table">
|
|
<thead><tr><th>ID</th><th>Name</th><th>Group</th><th>What it's for / notes</th></tr></thead>
|
|
<tbody>
|
|
<tr><td><code>0</code></td><td>Buddy icon (small)</td><td><span class="pill pill-muted">Icons</span></td><td>Small buddy icon. GIF/JPEG/BMP/PNG, <= 32x32, <= 2KB.</td></tr>
|
|
<tr><td><code>1</code></td><td>Buddy icon</td><td><span class="pill pill-muted">Icons</span></td><td>Standard buddy icon. GIF/JPEG/BMP/PNG, <= 64x64, <= 7KB.</td></tr>
|
|
<tr><td><code>12</code></td><td>Buddy icon (big)</td><td><span class="pill pill-muted">Icons</span></td><td>Large buddy icon. GIF/JPEG/BMP/PNG, <= 1024x1024, <= 64KB.</td></tr>
|
|
<tr><td><code>2</code></td><td>Status string</td><td><span class="pill pill-muted">Status</span></td><td>Status text in StringTLV format (DATA flag always set).</td></tr>
|
|
<tr><td><code>13</code></td><td>Status string time</td><td><span class="pill pill-muted">Status</span></td><td>Time when the status string was set.</td></tr>
|
|
<tr><td><code>3</code></td><td>Arrive sound</td><td><span class="pill pill-muted">Sounds</span></td><td>Sound played when a buddy comes online. WAV/MP3/MID, <= 10KB.</td></tr>
|
|
<tr><td><code>96</code></td><td>Depart sound</td><td><span class="pill pill-muted">Sounds</span></td><td>Sound played when a buddy goes offline. WAV/MP3/MID, <= 10KB.</td></tr>
|
|
<tr><td><code>131</code></td><td>IM sound</td><td><span class="pill pill-muted">Sounds</span></td><td>Instant message sound. WAV/MP3, <= 10KB.</td></tr>
|
|
<tr><td><code>4</code></td><td>Rich text</td><td><span class="pill pill-muted">Text & UI</span></td><td>Rich text formatting codes (DATA flag always set).</td></tr>
|
|
<tr><td><code>129</code></td><td>IM chrome</td><td><span class="pill pill-muted">Text & UI</span></td><td>IM window wallpaper/background. GIF/JPG/BMP.</td></tr>
|
|
<tr><td><code>136</code></td><td>IM chrome XML</td><td><span class="pill pill-muted">Text & UI</span></td><td>IM chrome XML definition.</td></tr>
|
|
<tr><td><code>137</code></td><td>IM chrome immersive</td><td><span class="pill pill-muted">Text & UI</span></td><td>Immersive Expressions for IM chrome.</td></tr>
|
|
<tr><td><code>5</code></td><td>SuperBuddy icon</td><td><span class="pill pill-muted">Other</span></td><td>SuperBuddy icon XML.</td></tr>
|
|
<tr><td><code>6</code></td><td>Radio station</td><td><span class="pill pill-muted">Other</span></td><td>Radio station opaque struct (DATA flag always set).</td></tr>
|
|
<tr><td><code>15</code></td><td>Current AV track</td><td><span class="pill pill-muted">Other</span></td><td>Current audio/video track XML.</td></tr>
|
|
<tr><td><code>1024</code></td><td>Emoticon set</td><td><span class="pill pill-muted">Other</span></td><td>Set of default emoticons.</td></tr>
|
|
<tr><td><code>1026</code></td><td>Encryption cert chain</td><td><span class="pill pill-muted">Security</span></td><td>Certificate chain for encryption certs.</td></tr>
|
|
<tr><td><code>1027</code></td><td>Signing cert chain</td><td><span class="pill pill-muted">Security</span></td><td>Certificate chain for signing certs.</td></tr>
|
|
<tr><td><code>1028</code></td><td>Gateway cert</td><td><span class="pill pill-muted">Security</span></td><td>Certificate for enterprise gateway.</td></tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bip-section reveal delay-2">
|
|
<h2>How to use BART in the admin panel</h2>
|
|
<p>The BART tab talks to the Open OSCAR Management API. Pick a type, browse existing assets, or upload a new one.</p>
|
|
<div class="bip-grid-2">
|
|
<div class="bip-step-list">
|
|
<div class="bip-step">
|
|
<h3><span class="bip-step-num">1</span>Pick a type</h3>
|
|
<p>Select a type card in the left catalog. The selected type is used for browsing and uploading, and the upload banner explains what that type is for.</p>
|
|
</div>
|
|
<div class="bip-step">
|
|
<h3><span class="bip-step-num">2</span>Browse assets</h3>
|
|
<ul>
|
|
<li><strong>List this type</strong> - fetch assets for the selected type ID.</li>
|
|
<li><strong>Load all assets</strong> - scan known types and merge results so you can search by hash, type ID, or type name.</li>
|
|
<li><strong>Preview/Use</strong> - preview an asset or copy its hash/type into forms.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="bip-step">
|
|
<h3><span class="bip-step-num">3</span>Upload or delete</h3>
|
|
<ul>
|
|
<li><strong>Upload</strong> - choose a file, auto-generate MD5 hash, then upload to <code>POST /bart/{hash}?type=...</code>.</li>
|
|
<li><strong>Delete</strong> - remove an asset by hash via <code>DELETE /bart/{hash}</code>.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="bip-step-list">
|
|
<div class="bip-step">
|
|
<h3>On the server</h3>
|
|
<ul>
|
|
<li>Assets are stored by hash/type in the server's BART store.</li>
|
|
<li>Management API endpoints: <code>GET /bart?type=</code>, <code>GET /bart/{hash}</code>, <code>POST /bart/{hash}?type=</code>, <code>DELETE /bart/{hash}</code>.</li>
|
|
<li>Feedbag entries can reference BART items (e.g. buddy icons). The admin Feedbag tab can set/remove a user's feedbag BART item.</li>
|
|
</ul>
|
|
</div>
|
|
<div class="bip-step">
|
|
<h3>In OSCAR clients</h3>
|
|
<ul>
|
|
<li>Clients use the BART foodgroup (<code>0x0010</code>) to upload/download art assets.</li>
|
|
<li>Buddy icons are typically uploaded, hashed, and referenced in presence/feedbag data so other clients can fetch them.</li>
|
|
<li>Feature support varies by client and server version. A 404/unsupported response may mean the running server build doesn't expose that endpoint.</li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="panel bip-section reveal delay-3">
|
|
<h2>Sources & references</h2>
|
|
<p>Use these for authoritative or implementation-specific details.</p>
|
|
<div class="bip-source-list">
|
|
<a class="bip-source" href="https://github.com/mk6i/open-oscar-server/blob/main/api.yml" target="_blank" rel="noopener noreferrer">
|
|
<h3>Open OSCAR Management API spec (api.yml)</h3>
|
|
<p>Used for Management API endpoint behavior (<code>/bart</code> list/get/upload/delete, feedbag BART item endpoints). Primary source for admin-panel API behavior.</p>
|
|
</a>
|
|
<a class="bip-source" href="https://github.com/mk6i/open-oscar-server" target="_blank" rel="noopener noreferrer">
|
|
<h3>Open OSCAR Server (GitHub)</h3>
|
|
<p>Server project, releases, and implementation details.</p>
|
|
</a>
|
|
<a class="bip-source" href="https://wiki.nina.chat/wiki/Protocols/OSCAR/BART" target="_blank" rel="noopener noreferrer">
|
|
<h3>NINA Wiki - OSCAR BART</h3>
|
|
<p>Protocol-level BART reference. <strong>Not re-verified live during this update because the wiki was offline.</strong></p>
|
|
</a>
|
|
<a class="bip-source" href="https://wiki.nina.chat/wiki/Protocols/OSCAR" target="_blank" rel="noopener noreferrer">
|
|
<h3>NINA Wiki - OSCAR Protocol</h3>
|
|
<p>General OSCAR protocol/foodgroup reference. Also not re-verified live during this update.</p>
|
|
</a>
|
|
<div class="bip-source">
|
|
<h3>Admin panel implementation</h3>
|
|
<p>Type labels/descriptions in this guide mirror the BART type catalog used by this admin UI; verify against protocol/server docs before relying on size/format constraints for a specific client.</p>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
<?php
|
|
});
|