All checks were successful
Deploy production / deploy (push) Successful in 1m15s
- server.js wraps Bun.serve to add /ws/<channel> upgrades (same server and port) and serve the map tiles from the host mount; Dockerfile now runs bun ./server.js - ws hub (channel registry, origin check) + pubg-map channel: rooms by unguessable code, validated + rate-limited messages, per-room write queue, presence - games.pubg_rooms / pubg_matches / pubg_markers; per-match sessions with history - /trackers/games/pubg/map hub (owner: rooms, landings over time, history) and /trackers/games/pubg/map/<code> fullscreen Leaflet map (all 11 maps) - deploy-remote.sh bind-mounts ~/pubg-maps; scripts/build-pubg-tiles.py rebuilds it
29 lines
1.0 KiB
TypeScript
29 lines
1.0 KiB
TypeScript
/**
|
|
* Full-screen pages that render without the site header and footer (the book reader). They
|
|
* also skip loading the header's JS (icons, menus, the mobile Sheet): src/routes/+layout.ts
|
|
* only imports SiteChrome for other pages.
|
|
*/
|
|
export function isImmersive(pathname: string): boolean {
|
|
return (
|
|
/^\/trackers\/books\/\d+\/read\/?$/.test(pathname) ||
|
|
// A PUBG drop map room (full-screen, for a second monitor).
|
|
/^\/trackers\/games\/pubg\/map\/[A-Za-z0-9]{20}\/?$/.test(pathname)
|
|
);
|
|
}
|
|
|
|
/** Pages that show the site header but no footer: the /start new-tab dashboard. */
|
|
export function hidesFooter(pathname: string): boolean {
|
|
return /^\/start\/?$/.test(pathname);
|
|
}
|
|
|
|
/** True when a keyboard shortcut should not fire because the user is typing. */
|
|
export function isTyping(target: EventTarget | null): boolean {
|
|
if (!(target instanceof HTMLElement)) return false;
|
|
return (
|
|
target.isContentEditable ||
|
|
target.tagName === 'INPUT' ||
|
|
target.tagName === 'TEXTAREA' ||
|
|
target.tagName === 'SELECT'
|
|
);
|
|
}
|