Skip to content

five-on-it / apps/client/src/ui/phone-view / followServer

Function: followServer() ​

followServer(ui, before, after): PhoneUi

Defined in: apps/client/src/ui/phone-view.ts:92

The phone after the server's word changed: a conversation starting, or a screen the world opened, pops it open (remembering whether it was the world that did); what the world opened gone, a phone the world opened is put away again, and an app's page with no screen left goes home.

Parameters ​

ui ​

PhoneUi

before ​

{ apps: object[]; calls: object[]; camera?: { note?: "missed" | "subject" | "away" | "saved"; shots: number; }; contacts: object[]; has: boolean; messages: object[]; screen?: { app: string; buttons: object[]; form: object[]; kind: "keypad" | "app"; name: string; note?: string; noteKey?: "wrongCode" | "nothing"; source: "phone" | "world"; text: string; title?: string; }; talk?: { choices: object[]; dialogue: string; goesOn: boolean; line?: string; note?: string; speaker?: string; state: "ringing" | "talking"; via: "call" | "face"; with: string; }; type: "phone"; unread: number; waypoint?: { label?: string; x: number; z: number; }; } | undefined

after ​

apps ​

object[] = ...

calls ​

object[] = ...

camera? ​

{ note?: "missed" | "subject" | "away" | "saved"; shots: number; } = ...

camera.note? ​

"missed" | "subject" | "away" | "saved" = ...

camera.shots ​

number = ...

contacts ​

object[] = ...

has ​

boolean = ...

messages ​

object[] = ...

screen? ​

{ app: string; buttons: object[]; form: object[]; kind: "keypad" | "app"; name: string; note?: string; noteKey?: "wrongCode" | "nothing"; source: "phone" | "world"; text: string; title?: string; } = ...

screen.app ​

string = ...

screen.buttons ​

object[] = ...

screen.form ​

object[] = ...

screen.kind ​

"keypad" | "app" = ...

screen.name ​

string = ...

screen.note? ​

string = ...

screen.noteKey? ​

"wrongCode" | "nothing" = ...

screen.source ​

"phone" | "world" = ...

screen.text ​

string = ...

screen.title? ​

string = ...

talk? ​

{ choices: object[]; dialogue: string; goesOn: boolean; line?: string; note?: string; speaker?: string; state: "ringing" | "talking"; via: "call" | "face"; with: string; } = ...

talk.choices ​

object[] = ...

talk.dialogue ​

string = PhoneId

talk.goesOn ​

boolean = ...

talk.line? ​

string = ...

talk.note? ​

string = ...

talk.speaker? ​

string = ...

talk.state ​

"ringing" | "talking" = ...

talk.via ​

"call" | "face" = ...

talk.with ​

string = ...

type ​

"phone" = ...

unread ​

number = ...

waypoint? ​

{ label?: string; x: number; z: number; } = ...

waypoint.label? ​

string = ...

waypoint.x ​

number = ...

waypoint.z ​

number = ...

Returns ​

PhoneUi