five-on-it / apps/client/src/ui/platform
apps/client/src/ui/platform
The page's side of the platform API (apps/api), without React: where the API is (the page's api query parameter, else the address the player set on the main menu's Play online screen, else the one the build carries (FOI_PLATFORM_URL when the release was built), else /api on the page's own origin, which the Vite dev server and the Compose stack's proxy pass to the API; a desktop app's page, from file://, has none of its own), what a platform says of itself before a player plays on it (/info), a guest session made the first time and kept (a device id and the session token in the page's storage) unless the player signs in with an email and a password, and the calls the Games tab and the game pages make: the games (searched and sorted), a game's page and its preview, its open rooms, a new room of a game, a run of one of its missions, joining a room, rating, reporting and remixing a game, and any other call as the session's account (request: the social layer's, social-client.ts). A room is joined by reloading the page against the URL the API answers with (it carries a join token), so nothing else in the game changes.
On a platform for the game's owners (FOI_ENTITLEMENT=steam, its /info says so) nobody is signed in as a guest: a call that needs an account is refused with why (PlatformRefusal: no Steam account, no copy, a lent copy creating), the reads anyone may make are made without a session, and the player signs in through Steam: a browser's OpenID round trip (steamStartUrl, back with a one-time code the page exchanges, ui/steam.ts), the desktop app's ticket (steamTicket), or an e-mail account linked to its Steam account (linkSteam).
Classes
Interfaces
- Platform
- PlatformAccount
- PlatformDeps
- PlatformDraft
- PlatformGame
- PlatformGamePage
- PlatformInfo
- PlatformMe
- PlatformRoom
- PlatformSources
- PlatformSteam