diff --git a/app/index.html b/app/index.html
index 3201d23..bf3f9e5 100644
--- a/app/index.html
+++ b/app/index.html
@@ -250,6 +250,7 @@
#bar button { border: 0; padding: 3px 10px 4px; font-size: 13px; color: var(--muted); }
#bar button:hover { color: var(--text); background: var(--raised); }
#bar button[aria-pressed="true"], #bar button[aria-expanded="true"] { color: #000; background: var(--text); }
+ #bar #bar-update { color: #000; background: var(--text); font-weight: 700; }
body.fullscreen { --bar-height: 0px; }
body.fullscreen #bar, body.fullscreen #stats { display: none; }
#stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; background: #000; min-height: 0; }
@@ -436,6 +437,7 @@
+
Offline
@@ -1392,22 +1394,31 @@
// updates (the client's updater.js): one fetched waits for a restart,
// and one that needs a new install is a download from the server's site.
+ // shown on the login card, and on the game's bar for those playing.
let update = null;
const showUpdate = state => {
update = state;
$("update-line").hidden = !state;
+ $("bar-update").hidden = !state;
if (state) {
$("update-button").textContent = state.state === "ready" ? `Update ${state.version} ready · Restart` : `Burrow ${state.version} · Download`;
+ $("bar-update").textContent = state.state === "ready" ? `Update ${state.version} · Restart` : `Burrow ${state.version} · Download`;
}
};
window.client.onUpdate(showUpdate);
- $("update-button").addEventListener("click", () => {
+ const takeUpdate = () => {
if (update && update.state === "ready") {
window.client.restartToUpdate();
}
else if (update) {
window.client.openPage(`${info.defaultServer}/`);
}
+ };
+ $("update-button").addEventListener("click", takeUpdate);
+ $("bar-update").addEventListener("click", () => {
+ if (!update || update.state !== "ready" || window.confirm("Restart Burrow now to update? This leaves the game.")) {
+ takeUpdate();
+ }
});
$("auto-update").addEventListener("change", () => window.client.setAutoUpdate($("auto-update").checked));
diff --git a/app/updater.js b/app/updater.js
index 123682c..d3b2f54 100644
--- a/app/updater.js
+++ b/app/updater.js
@@ -20,7 +20,7 @@ MCowBQYDK2VwAyEAvFgBu6kqSLUj9RSK16gBvpGtUoHHuoqtMqZhUzaOEHo=
-----END PUBLIC KEY-----
`);
const FIRST_CHECK_MS = 10000;
-const CHECK_EVERY_MS = 6 * 3600000;
+const CHECK_EVERY_MS = 30 * 60000; // latest.json is a few hundred bytes
const TIMEOUT_MS = 60000;
const MAX_MANIFEST_BYTES = 64 * 1024;
const MAX_BUNDLE_BYTES = 20 * 1024 * 1024;