Let players use Sokko TCG from a phone through a mobile fallback mode
#/mobile/cards shows the game without the site shell: a title, a footer with the account and a discreet "Version complète" link, and a tab bar fixed at the bottom. Phones opening #/cards are sent to the same section in mobile mode unless the player chose the full version. Account, History and Administration point to the computer. The panels are the computer ones, adapted under .nebula-mobile (and body.nebula-mobile-body for dialogs) for a 393×852 reference phone: small cards with names under them when opening packs, a revealed card shown large on tap, tap-to-pick team recruitment with a single Recruit button and large stars, row lists for explorers and commons in the expedition pickers, a race track and circuit that read at phone size, and full-width actions throughout. Firefox no longer shows a mirrored back on a flipped card. Phone Playwright journeys check that every section fits the screen with no button wrapping, then open a pack, run an expedition and recruit a team by touch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
0262f596c9
commit
c3e494b8a6
53 changed files with 1830 additions and 123 deletions
|
|
@ -90,9 +90,15 @@ function oauthReturnCookie(value, secure, maxAge = 600) {
|
|||
return cookie("sokkog_cards_oauth_return", value, secure, maxAge);
|
||||
}
|
||||
|
||||
/** Retour après la connexion Discord : une section du jeu, ou le lien direct d'une expédition (#/cards/expeditions/<id>). */
|
||||
/**
|
||||
* Retour après la connexion Discord : une section du jeu, ou le lien direct d'une expédition (#/cards/expeditions/<id>),
|
||||
* en version complète comme en mode mobile (`/mobile/cards/...`, sans administration).
|
||||
*/
|
||||
function cardsReturnPath(value) {
|
||||
return /^\/cards(?:\/admin(?:\/[a-z0-9-]{1,40}){0,2}|\/expeditions\/[a-z0-9-]{1,40}|\/[a-z0-9-]{1,40})?$/.test(String(value || "")) ? value : "/cards";
|
||||
const path = String(value || "");
|
||||
if (/^\/cards(?:\/admin(?:\/[a-z0-9-]{1,40}){0,2}|\/expeditions\/[a-z0-9-]{1,40}|\/[a-z0-9-]{1,40})?$/.test(path)) return path;
|
||||
if (/^\/mobile\/cards(?:\/expeditions\/[a-z0-9-]{1,40}|\/(?!admin$)[a-z0-9-]{1,40})?$/.test(path)) return path;
|
||||
return "/cards";
|
||||
}
|
||||
|
||||
async function readBody(req) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue