d80a5255ed
CI / lint (push) Successful in 3s
extension / lint (push) Successful in 10s
CI / frontend-build (push) Successful in 24s
CI / backend-lint-and-test (push) Successful in 39s
CI / integration (push) Successful in 3m51s
extension / lint (pull_request) Successful in 10s
The extension is installed per-instance from the operator's FC host, so Firefox's
static update_url can't apply (each instance has a different host) and updates
were fully manual. Add a self-hosted-friendly update surface that reuses the
existing public GET /api/extension/manifest ({version, latest_url, sha256}):
- lib/api.js: getExtensionManifest().
- background.js: checkForUpdateInfo() compares the instance's latest published
version against runtime.getManifest().version (dotted-numeric compare so
1.0.10 > 1.0.9); CHECK_UPDATE message handler; refreshUpdateBadge() sets a
toolbar badge via browser.action; a daily browser.alarms check plus on
startup/installed. New 'alarms' permission (non-prompting).
- popup: an 'Update available — vX' banner with an Update button that opens the
signed XPI (web root, /api stripped like OPEN_ARTIST_PAGE) → Firefox's native
install prompt. Never blocks the popup on a failed check.
No backend changes (endpoint already exists). Bump 1.0.8→1.0.9 so this ships;
from here on updates surface themselves instead of needing a manual reinstall.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
53 lines
1.5 KiB
HTML
53 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="stylesheet" href="popup.css" />
|
|
<title>FabledCurator</title>
|
|
</head>
|
|
<body>
|
|
<header class="topbar">
|
|
<span class="brand">FabledCurator</span>
|
|
<span id="connection-status" class="dot" title="checking…"></span>
|
|
</header>
|
|
|
|
<section id="setup-required" class="setup hidden">
|
|
<div class="alert">
|
|
<strong>Setup required</strong>
|
|
<p>Configure the FC URL and extension API key.</p>
|
|
</div>
|
|
<button id="open-settings-btn" class="btn primary">Open settings</button>
|
|
</section>
|
|
|
|
<section id="main-content" class="main hidden">
|
|
<div id="update-banner" class="update-banner hidden">
|
|
<span id="update-text"></span>
|
|
<button id="update-btn" class="btn primary small">Update</button>
|
|
</div>
|
|
|
|
<nav class="tabs">
|
|
<button class="tab active" data-tab="platforms">Platforms</button>
|
|
<button class="tab" data-tab="sources">Sources</button>
|
|
</nav>
|
|
|
|
<div id="tab-platforms" class="tab-panel">
|
|
<div id="platforms-list"></div>
|
|
<button id="export-all-btn" class="btn primary block">Export all platforms</button>
|
|
</div>
|
|
|
|
<div id="tab-sources" class="tab-panel hidden">
|
|
<div id="sources-list"></div>
|
|
</div>
|
|
|
|
<div id="status-message" class="status-message hidden"></div>
|
|
|
|
<footer class="footer">
|
|
<button id="settings-btn" class="btn link">Settings</button>
|
|
</footer>
|
|
</section>
|
|
|
|
<script src="../lib/platforms.js"></script>
|
|
<script src="popup.js"></script>
|
|
</body>
|
|
</html>
|