discgod/extension/popup.html
type-two 1945c19fb3 discgod: API-token Discogs seller-inventory tracker
Lean MV3 extension + standalone single-file ingest server that pulls watched
sellers' full inventories from the Discogs API into discogs_full (mp_* schema),
tracking price changes and sales over time. Successor to pliceclogs/marketwatcher;
runs alongside the legacy plice server on a separate port (5057).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-13 19:54:33 +10:00

83 lines
3.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="popup.css" />
</head>
<body>
<header>
<div class="logo">disc<span>god</span></div>
<div class="dot" id="statusDot" title="status"></div>
</header>
<!-- Setup -->
<section class="panel">
<h2>Setup</h2>
<label>Discogs API token</label>
<div class="row tight">
<input type="password" id="token" placeholder="personal access token" />
<button id="testToken" class="ghost" style="flex:0 0 auto">Test</button>
</div>
<div class="hint" id="tokenHint">
Get one at <a href="https://www.discogs.com/settings/developers" target="_blank">Settings → Developers</a> → “Generate token”.
</div>
<div class="row">
<div>
<label>Ingest server URL</label>
<input type="text" id="serverUrl" placeholder="http://100.91.239.7:5057" />
</div>
<div style="flex:0 0 110px">
<label>Every</label>
<select id="intervalHours">
<option value="6">6 hours</option>
<option value="12">12 hours</option>
<option value="24">24 hours</option>
<option value="48">2 days</option>
<option value="168">Weekly</option>
</select>
</div>
</div>
<div class="row tight" style="margin-top:10px">
<label style="margin:0; display:flex; align-items:center; gap:6px; flex:1">
<input type="checkbox" id="autoCrawl" style="width:auto" /> Auto-crawl on schedule
</label>
<button id="save" class="primary" style="flex:0 0 auto">Save</button>
</div>
</section>
<!-- Watchlist -->
<section class="panel">
<h2>Sellers tracked</h2>
<div class="row tight">
<input type="text" id="newSeller" placeholder="seller username" />
<input type="text" id="newFilter" placeholder="filter (optional)" title="e.g. format=Vinyl" style="flex:0 0 120px" />
<button id="track" style="flex:0 0 auto">Track</button>
</div>
<div id="watchlist"><div class="empty">No sellers yet.</div></div>
<div class="row" style="margin-top:8px">
<button id="scrapeAll" class="primary">Scrape all now</button>
<button id="refresh" class="ghost" style="flex:0 0 auto"></button>
</div>
<div class="statusline" id="statusLine"><span>idle</span><span></span></div>
</section>
<!-- Stats -->
<section class="panel">
<h2>Database</h2>
<div class="stats">
<div class="stat"><div class="n" id="s_active"></div><div class="l">Active listings</div></div>
<div class="stat"><div class="n" id="s_watched"></div><div class="l">Sellers watched</div></div>
<div class="stat"><div class="n" id="s_gone"></div><div class="l">Gone (7d)</div></div>
<div class="stat"><div class="n" id="s_price"></div><div class="l">Price changes (7d)</div></div>
</div>
<div class="statusline" id="lastCapture"><span>last capture</span><span></span></div>
</section>
<div class="toast" id="toast"></div>
<script src="popup.js"></script>
</body>
</html>