- Add a Diagnostics panel to the extension popup and manager page with copy and refresh actions - Collect extension settings, router API status, torrents, DHT nodes, and a tail of the router log into one report - Add a native host `diagnostics` command that reports router PID, active ports, log path, and log summary counters - Export data dir, log file, router PID, and SAM port from the AppImage launcher - Start the router with `--debug` so the log tail has detailed output - Bump extension version to 0.1.4 and request clipboardWrite permission
123 lines
4.3 KiB
HTML
123 lines
4.3 KiB
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<title>Moon I2P Torrent</title>
|
|
<link rel="stylesheet" href="ui.css" />
|
|
</head>
|
|
<body class="popup">
|
|
<header>
|
|
<div class="brand">
|
|
<img src="icon.svg" alt="" />
|
|
<span>moon-i2p Torrent</span>
|
|
</div>
|
|
<div class="row">
|
|
<span id="router-pill" class="pill offline">Offline</span>
|
|
<button id="open-manager-btn" class="secondary">Full View</button>
|
|
</div>
|
|
</header>
|
|
|
|
<section class="card">
|
|
<h2>
|
|
<span>I2P Router & Proxy</span>
|
|
<span class="row">
|
|
<button id="start-router-btn">Start Router</button>
|
|
<button id="stop-router-btn" class="secondary" style="display:none;">Stop</button>
|
|
</span>
|
|
</h2>
|
|
<div class="grid-2">
|
|
<div class="stat">
|
|
<div class="stat-label">NetDB / Tunnels</div>
|
|
<div id="net-summary" class="stat-val">--</div>
|
|
</div>
|
|
<div class="stat">
|
|
<div class="stat-label">I2P Proxy (.i2p)</div>
|
|
<div class="row">
|
|
<label class="row" style="gap:4px;">
|
|
<input id="proxy-enabled" type="checkbox" />
|
|
<span id="proxy-addr" class="mono">127.0.0.1:4444</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="stat" style="margin-top:6px;">
|
|
<div class="stat-label">Torrent Session .b32.i2p</div>
|
|
<div id="torrent-b32" class="stat-val mono">--</div>
|
|
</div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>
|
|
<span>I2P DHT</span>
|
|
<span id="dht-summary" class="mono">0 nodes</span>
|
|
</h2>
|
|
<div class="grid-2">
|
|
<div class="stat">
|
|
<div class="stat-label">DHT Node ID (20B)</div>
|
|
<div id="dht-node-id" class="stat-val mono">--</div>
|
|
</div>
|
|
<div class="stat">
|
|
<div class="stat-label">Sent / Recv / Peers</div>
|
|
<div id="dht-stats" class="stat-val">0 / 0 / 0</div>
|
|
</div>
|
|
</div>
|
|
<form id="bootstrap-form" class="row" style="margin-top:8px;">
|
|
<input id="bootstrap-b32" type="text" placeholder="Bootstrap node .b32.i2p" />
|
|
<input id="bootstrap-port" type="number" value="6881" style="width:74px;" />
|
|
<button type="submit" class="secondary">Ping</button>
|
|
</form>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2><span>Add I2P Torrent</span></h2>
|
|
<form id="magnet-form" class="row">
|
|
<input id="magnet-uri" type="text" placeholder="magnet:?xt=urn:btih:..." />
|
|
<button type="submit">Add</button>
|
|
</form>
|
|
<div id="dropzone" class="dropzone">
|
|
Drop a .torrent file here or click to browse
|
|
<input id="torrent-file" type="file" accept=".torrent" style="display:none;" />
|
|
</div>
|
|
<div id="status-msg" class="msg"></div>
|
|
</section>
|
|
|
|
<section class="card">
|
|
<h2>
|
|
<span>Torrents</span>
|
|
<span id="torrent-count" class="mono">0</span>
|
|
</h2>
|
|
<div id="torrents-list" class="muted">No torrents added yet.</div>
|
|
</section>
|
|
|
|
<details class="card">
|
|
<summary>Settings (API, Proxy & Download Folder)</summary>
|
|
<form id="settings-form" style="margin-top:8px;">
|
|
<div class="grid-2">
|
|
<div><div class="stat-label">Proxy Port</div><input id="cfg-proxy-port" type="number" /></div>
|
|
<div><div class="stat-label">Torrent API Port</div><input id="cfg-api-port" type="number" /></div>
|
|
</div>
|
|
<div style="margin-top:6px;">
|
|
<div class="stat-label">Download Directory</div>
|
|
<input id="cfg-dl-dir" type="text" placeholder="~/Downloads/moon-i2p" />
|
|
</div>
|
|
<div class="row" style="margin-top:8px;justify-content:space-between;">
|
|
<label class="row"><input id="cfg-intercept" type="checkbox" /> <span>Intercept .i2p magnets & .torrent links</span></label>
|
|
<button type="submit" class="secondary">Save</button>
|
|
</div>
|
|
</form>
|
|
</details>
|
|
|
|
<details id="diagnostics-details" class="card">
|
|
<summary>Diagnostics & Verbose Logs</summary>
|
|
<div class="row" style="margin-top:8px;justify-content:flex-end;">
|
|
<button id="copy-diag-btn" type="button">Copy Diagnostics</button>
|
|
<button id="refresh-diag-btn" class="secondary" type="button">Refresh</button>
|
|
</div>
|
|
<div id="diag-status" class="msg"></div>
|
|
<pre id="diagnostics-log" class="mono diag-log">Open to load diagnostics...</pre>
|
|
</details>
|
|
|
|
<script src="ui.js"></script>
|
|
</body>
|
|
</html>
|