Skip to content

Instantly share code, notes, and snippets.

@bluekeys
Last active November 13, 2018 11:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluekeys/e5b28317ec6e46800fd19a05f71e75e0 to your computer and use it in GitHub Desktop.
Save bluekeys/e5b28317ec6e46800fd19a05f71e75e0 to your computer and use it in GitHub Desktop.
Crime Database Client*
Crime Database Client*
App Start*
connected? -> Connected?
connectionless? -> Connectionless?
App Resume
Connectionless?
Welcome Unconnected*
Local Store Empty
Local Store Populated
Connected?
Welcome Connected*
login_success -> Authenticated
login_failed -> Authentication Failed
logout -> Unauthenticated
Unauthenticated
login_success -> Authenticated
login_failed -> Authentication Failed
Authenticated
logout -> Unauthenticated
Authentication Failed
login_success -> Authenticated
login_failed -> Authentication Failed
// Attach Figma frames (artboards) to states
// IDs can be found under "Share > Public Embed" in Figma
// ** Edit this: Figma File ID
const figmaFile = "9YIyKtFdtZ1Rad2xIdjMB9";
// ** Edit this: List state names and matching Figma frame/artboard IDs
const figmaNodes =
{Shop: "0%3A197",
Tickets: "0%3A53" };
const figmaURL = "https://www.figma.com/embed?embed_host=share&url=https://www.figma.com/file/" + figmaFile + "/Sample-File?node-id=";
function render(model){
const currentStateName = model.active_states[0].name;
for (f in figmaNodes)
if (currentStateName === f)
return $("iframe",{src: figmaURL + figmaNodes[f], width: '100%', height: '100%'});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment