Extension: show installed/latest version for drift tracking
Popup footer shows its own installed version (from manifest.json, via chrome.runtime.getManifest()); Terminals page shows the latest bundled version next to the download link (new GET /api/extension/version, reads the same manifest.json). Bumped manifest.json to 0.2.0 for the Today's Arrivals change, and documented in extension-src/README.md that every future change to this folder must bump the version too — nothing else keeps it in sync automatically.
This commit is contained in:
parent
ebf9875ca8
commit
790431c446
8 changed files with 49 additions and 5 deletions
|
|
@ -97,3 +97,7 @@ a.settings-link { display: block; margin-top: 12px; font-size: 12px; color: #7b4
|
|||
padding: 4px 10px; border-radius: 6px; cursor: pointer;
|
||||
}
|
||||
.send-small:disabled { opacity: 0.5; cursor: default; }
|
||||
|
||||
.version {
|
||||
margin-top: 10px; text-align: center; font-size: 10px; color: #94a3b8;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,6 +15,8 @@
|
|||
<p class="muted">Loading…</p>
|
||||
</div>
|
||||
|
||||
<div id="version" class="version"></div>
|
||||
|
||||
<script type="module" src="popup.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@ const BOOKING_URL_RE = /\/bookings_(?:view|edit|checkin)\/(\d+)/i;
|
|||
|
||||
const contentEl = document.getElementById('content');
|
||||
const nbStatusEl = document.getElementById('nbStatus');
|
||||
const versionEl = document.getElementById('version');
|
||||
|
||||
// Shown so staff/admin can tell at a glance whether a given reception PC is
|
||||
// running an old install — compare against the "Latest version" shown next
|
||||
// to the download link on tablet-checkin's own Terminals page (see
|
||||
// routes/extension.js's /api/extension/version). Pulled from the manifest
|
||||
// rather than hardcoded here, so it can never itself drift out of sync with
|
||||
// manifest.json's own version field.
|
||||
versionEl.textContent = `v${chrome.runtime.getManifest().version}`;
|
||||
|
||||
async function main() {
|
||||
const [tab] = await chrome.tabs.query({ active: true, currentWindow: true });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue