Documentation
¶
Overview ¶
Package ui is WittyPlay's server-driven UI (module API 4): what it adds to every app, as data the server checks, merges and renders (WittyMediaServer docs/SDUI-MODULES.md). sdui.json at the repository's root is written from UI and held equal to it by a test.
The games pages themselves are the server's own (Games, each games library, a game's page), drawn from the library. What WittyPlay adds is the one thing only it knows: which consoles this server plays, and how (a core installed, or a standalone emulator set up). It's a row on the Games page, a page of its own, a section for the page editor, and its settings.
Index ¶
Constants ¶
const ( SourceConsoles = Module + ".consoles" // SettingShowConsoles, for the server: the row on the Games page is shown. SettingShowConsoles = "showConsoles" // SettingOnlyPlayable, for each profile: list only the consoles that play here. SettingOnlyPlayable = "onlyPlayable" )
The source and its settings, by the names the helper answers (rpc/sdui.go).
const ( SourceRecent = Module + ".recent" SourceCollections = Module + ".collections" SourceFriends = Module + ".friends" SourceRooms = Module + ".rooms" SourceRoom = Module + ".room" SourceSaveStates = Module + ".saveStates" SourceMemories = Module + ".memories" SourceControllers = Module + ".controllers" // Answered by the server for its Forms: the profile's two choices as switches, and an // administrator's choice of a Kids profile's friends (user: the profile's ID). SourcePrivacy = Module + ".privacy" SourceKidsFriends = Module + ".kidsFriends" )
WittyPlay Online's sources (WittyMediaServer docs/plans/DESIGN-2-SDUI-GAPS.md, section 6). Friends and a room's players are people: person cards, round, with a line and a badge. They're about this server's profiles, saves and running games, so the server answers them (its wittyplay_online.go) through each profile's limits; they're declared here so that pages, editors and the checks know them.
const ( SourceLibrary = Module + ".library" SourceStoreConsoles = Module + ".storeConsoles" SourceStoreEmus = Module + ".storeEmulators" SourceSetup = Module + ".setup" )
The library and the store, for the apps that draw WittyPlay's screens themselves (the Apple TV and Android TV apps, and the phone apps): answered by package api (sdui_store.go).
const ( PageOnline = Module + "-online" PageControllers = Module + "-controllers" PageQuick = Module + "-quick" PageRoom = Module + "-room" PageMemory = Module + "-memory" PageKeep = Module + "-keep" PagePrivacy = Module + "-privacy" PageKids = Module + "-kids" // The apps' own versions of WittyPlay's web pages (the web app keeps its React pages for these): // every games library's page, Settings, and Cores & emulators with each console's rows. PageLibrary = Module + "-library" PageSettings = Module + "-settings" PageStore = Module + "-store" PageStoreConsole = Module + "-store-console" // The first-run step on every app: the server's "Finish setting up WittyPlay" notice opens it. PageSetup = Module + "-setup" )
WittyPlay Online's pages (Design 2: docs/design-2/canvas/Play.dc.html in WittyMediaServer, and the boards in docs/design-2/images/play and gaps/GB2_7). All of it is the catalogue's own components over the sources above, so every app draws it; what only a device knows (its controllers' batteries, "press any button") the app adds itself.
const ( CommandCoreInstall = Module + ".core.install" CommandCoreRemove = Module + ".core.remove" CommandConsoleCore = Module + ".console.core" CommandEmulatorInstall = Module + ".emulator.install" CommandEmulatorCancel = Module + ".emulator.cancel" CommandEmulatorRemove = Module + ".emulator.remove" CommandSetupDone = Module + ".setup.done" CommandSetupLater = Module + ".setup.later" )
The commands the store's rows run: WittyPlay's own routes (api/cores.go, rpc/docker.go), which every app runs from the server's catalogue (WittyMediaServer docs/SDUI-MODULES.md, "Commands"). Every one is an administrator's route, and none needs a password.
const Module = "wittyplay"
Module is WittyPlay's ID.
Variables ¶
This section is empty.
Functions ¶
func Commands ¶ added in v0.7.0
func Commands() []core.CommandSpec
Commands are WittyPlay's own commands, as sdui.json declares them.
Types ¶
This section is empty.