Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,12 @@ body.touch #quest-tracker .q-card ~ .q-card ~ .q-card { display: none; }
@media (max-width: 860px) and (min-height: 521px) {
#craft-done { position: sticky; bottom: -1px; z-index: 2; box-shadow: 0 -10px 14px 6px rgba(20, 24, 34, .95); }
}
/* Recipe cards: the station badge goes under the ingredients, so long names never push the card wider. */
.recipe { min-width: 0; grid-template-columns: 44px minmax(0, 1fr) auto; }
@media (max-width: 480px) {
.recipe { grid-template-columns: 40px minmax(0, 1fr); row-gap: 4px; }
.recipe img.out { width: 36px; height: 36px; }
.recipe .badge { grid-column: 2; justify-self: start; }
.slot-grid { gap: 3px; }
#craft .slot-grid .slot .count { font-size: 11px; right: 2px; bottom: 0; }
}
Expand Down
2 changes: 1 addition & 1 deletion sw.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Service worker: caches the whole game so it works offline once loaded.
// Bump VERSION whenever files change so players get the update.
const VERSION = 'minicrafter-v22';
const VERSION = 'minicrafter-v23';
const CORE = [
'./', './index.html', './style.css', './manifest.webmanifest', './site-config.json',
'./icons/icon-192.png', './icons/icon-512.png', './icons/icon-maskable-512.png', './icons/apple-touch-icon.png', './icons/favicon-32.png',
Expand Down
14 changes: 7 additions & 7 deletions tests/smoke.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -257,16 +257,16 @@ try {
});
ok(touch, 'touch controls appear in touch mode');
// Phones: turning the phone upright pauses and asks for sideways; turning it back carries on.
const shown = (id) => t.page.evaluate((i) => !document.getElementById(i).classList.contains('hidden'), id);
// (Waits for the change itself: CI runners render slowly, so a fixed pause isn't enough.)
const settle = (fn) => t.page.waitForFunction(fn, null, { timeout: 15000 }).then(() => true).catch(() => false);
await t.page.setViewportSize({ width: 390, height: 844 });
await t.page.waitForTimeout(300);
const askedUpright = (await shown('rotate')) && !(await shown('hud'));
const askedUpright = await settle(() => !document.getElementById('rotate').classList.contains('hidden') && document.getElementById('hud').classList.contains('hidden'));
await t.page.setViewportSize({ width: 844, height: 390 });
await t.page.waitForTimeout(300);
const resumed = !(await shown('rotate')) && (await shown('hud'));
const resumed = await settle(() => document.getElementById('rotate').classList.contains('hidden') && !document.getElementById('hud').classList.contains('hidden'));
ok(askedUpright && resumed, 'phones: upright pauses and asks to turn sideways, sideways carries on');
// Phones: the survival crafting panel fits an upright phone (its 9-slot rows used to push it sideways).
await t.page.setViewportSize({ width: 375, height: 667 });
// Phones: the survival crafting panel fits an upright phone (its 9-slot rows used to push it
// sideways). 360px is a common Android width, and the narrowest that matters.
await t.page.setViewportSize({ width: 360, height: 740 });
const craftOverflow = await t.page.evaluate(async () => {
const m = window.minicrafter; m.setMode('survival'); m.forcePlay(); m.openOverlay();
await new Promise((r) => setTimeout(r, 300));
Expand Down
Loading