Overhaul the web UI

This commit is contained in:
Tanner
2026-11-04 16:50:40 +00:00
parent 67c0ed5af4
commit 4129686b07
22 changed files with 787 additions and 11614 deletions
+97 -26
View File
@@ -1,36 +1,107 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<meta name="theme-color" content="#10130f" />
<meta name="description" content="Live Minecraft bot dashboard" />
<title>Mosfet · Minecraft Bot</title>
<link rel="stylesheet" href="/static/css/dashboard.css?v=4" />
<script defer src="/static/js/dashboard.js?v=7"></script>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
<div class="shell">
<main>
<section class="hero panel">
<div class="hero-main">
<div class="eyebrow">LIVE SESSION <span class="eyebrow-line"></span></div>
<h1 id="bot-name">Mosfet<span class="name-period">.</span></h1>
<p id="session-subtitle" class="session-subtitle">Waiting for the bot connection</p>
</div>
<div class="hero-coordinates">
<div class="coordinate-label">CURRENT POSITION</div>
<div id="position" class="coordinate-value">—</div>
<div id="dimension" class="dimension-value">NO DIMENSION</div>
</div>
<div class="hero-grid" aria-hidden="true"></div>
<div class="hero-glow" aria-hidden="true"></div>
</section>
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
<section class="stats-grid" aria-label="Bot status">
<article class="stat-card panel">
<div class="stat-top"><span class="stat-label">HEALTH</span><span class="stat-icon heart">♥</span></div>
<div class="stat-value"><span id="health-value">—</span><small>/ 20</small></div>
<div class="meter"><span id="health-meter" class="meter-fill health-fill"></span></div>
</article>
<article class="stat-card panel">
<div class="stat-top"><span class="stat-label">HUNGER</span><span class="stat-icon food">◆</span></div>
<div class="stat-value"><span id="food-value">—</span><small>/ 20</small></div>
<div class="meter"><span id="food-meter" class="meter-fill food-fill"></span></div>
</article>
<article class="stat-card panel">
<div class="stat-top"><span class="stat-label">MOVEMENT</span><span class="live-dot"></span></div>
<div id="movement-value" class="stat-value stat-word">IDLE</div>
<div id="movement-detail" class="stat-caption">No active path</div>
</article>
<article class="stat-card panel">
<div class="stat-top"><span class="stat-label">WORLD CACHE</span><span class="stat-icon cache-icon">▦</span></div>
<div class="stat-value"><span id="chunk-count">—</span><small> chunks</small></div>
<div id="chunk-detail" class="stat-caption">Waiting for world data</div>
</article>
</section>
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<section class="content-grid">
<section class="inventory-panel panel">
<div class="section-heading">
<div>
<div class="eyebrow">PLAYER STORAGE</div>
<h2>Inventory</h2>
</div>
<div class="inventory-summary">
<span id="inventory-count">0 items</span>
<span class="heading-divider"></span>
<span id="inventory-slots">0 / 46 slots</span>
</div>
</div>
<div id="inventory-warning" class="inventory-warning" hidden>
Some item components are not decoded yet; displayed contents may be partial.
</div>
<div id="inventory-grid" class="inventory-grid" aria-label="Minecraft inventory"></div>
<div class="inventory-legend"><span class="legend-swatch"></span> Empty slot <span class="legend-note">Hover an item for its name and stack size</span></div>
</section>
<aside class="side-column">
<section class="side-panel panel">
<div class="section-heading compact-heading">
<div><div class="eyebrow">MULTIPLAYER</div><h2>Players</h2></div>
<span id="player-count" class="count-badge">0</span>
</div>
<div id="player-list" class="player-list"><div class="empty-state">No player data yet</div></div>
</section>
<section class="side-panel panel">
<div class="section-heading compact-heading">
<div><div class="eyebrow">AUTOMATION</div><h2>Runtime</h2></div>
</div>
<dl class="runtime-list">
<div><dt>Game mode</dt><dd id="game-mode">—</dd></div>
<div><dt>Active job</dt><dd id="job-state">IDLE</dd></div>
<div><dt>Path nodes</dt><dd id="path-length">0</dd></div>
<div><dt>Entities</dt><dd id="entity-count">0 mobs · 0 drops</dd></div>
<div><dt>AFK</dt><dd id="afk-state">NO</dd></div>
</dl>
<div id="movement-error" class="error-box" hidden></div>
</section>
</aside>
</section>
<footer class="footer">
<span class="footer-brand"><span class="footer-mark">■</span> MOSFET / 26.3</span>
<span id="connection-pill" class="connection-pill is-offline"><i></i><span>OFFLINE</span></span>
<span id="last-update">Waiting for API data</span>
</footer>
</main>
</div>
<div id="toast" class="toast" role="status" aria-live="polite"></div>
</body>
</html>