Skip to content

Botão de ecrã inteiro na versão web para telemóvel - #3

Merged
neteinstein merged 1 commit into
mainfrom
claude/math-game-multiplayer-iwtwcm
Oct 31, 2026
Merged

neteinstein merged 1 commit into
mainfrom
claude/math-game-multiplayer-iwtwcm

Conversation

@neteinstein

Copy link
Copy Markdown
Owner

O que muda

No menu aparece um botão Ecrã inteiro:

  • Android (Chrome), computador e iPad: põe a página em ecrã inteiro e, quando o browser deixa, fixa-a ao alto.
  • iPhone: o Safari não deixa as páginas ficarem em ecrã inteiro, por isso o botão mostra como adicionar o jogo ao ecrã principal. Se a página veio do WhatsApp, explica que é preciso abrir primeiro no Safari.
  • O botão não aparece na app Android, nem na app instalada no ecrã principal, nem quando a página já está em ecrã inteiro.

Como foi testado

  • tsc --noEmit, os 45 testes e npm run build passam.
  • No Chromium (Playwright) com tamanho de telemóvel, o botão pôs a página em ecrã inteiro e depois escondeu-se.
  • Simulei um browser sem suporte para ecrã inteiro, como o Safari do iPhone: aparecem as instruções para adicionar ao ecrã principal.
  • Não foi testado num iPhone real.

Generated by Claude Code

The menu gets an "Ecrã inteiro" chip. Where the browser allows it
(Android Chrome, desktop, iPad) it enters full screen and locks portrait
when possible. iPhone Safari has no full-screen API, so there it shows
how to add the game to the home screen, the only way to get it full
screen (including opening from WhatsApp's in-app browser). The button
hides itself in the native app, in an installed home-screen app and
once already full screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G6VuNJKhVgrfHS1yPhYdHq
@neteinstein
neteinstein merged commit 4491dc5 into main Oct 31, 2026
2 checks passed
@neteinstein
neteinstein deleted the claude/math-game-multiplayer-iwtwcm branch October 31, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants