Skip to content

Instantly share code, notes, and snippets.

@WinstonFassett
Created January 5, 2020 18:08
Show Gist options
  • Save WinstonFassett/879132f7513e1a21c88e560088549298 to your computer and use it in GitHub Desktop.
Save WinstonFassett/879132f7513e1a21c88e560088549298 to your computer and use it in GitHub Desktop.
Online-First Realtime Doc Viewer
Online-First Realtime Doc Viewer
restart -> Loading
Loading
Connecting to Remote Doc
disconnect while loading -> Load Failed
Preparing Auth
Identifying User
got user token -> Verifying User
no user token -> Login
Verifying User
valid token -> Connecting to Remote Socket
Login
logged in -> Connecting to Remote Socket
not logged in -> Not Authorized
Connecting to Remote Socket
connection auth error -> Not Authorized
connected remote socket -> Awaiting Initial Sync
connection timeout -> Load Error
Awaiting Initial Sync
first sync message -> Syncing Initial
Syncing Initial
last initial sync message -> Loaded and Connected
timeout -> Loaded and Connected
Loaded and Connected
Idle
change -> Syncing
Syncing
done -> Idle
disconnect -> Loaded and Disconnected
loaded connection failed -> Loaded with Invalid Connection
Loaded with Invalid Connection
disconnect invalid connection -> Loaded and Disconnected
Loaded and Disconnected
reconnected -> Loaded and Connected
Load Failed
Not Authorized
Load Error
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment