Commit Graph

17 Commits

Author SHA1 Message Date
Zorchenhimer 01219fffa1 Fix help popup
Properly call the open() function in the web assembly to open a new
popup.
2019-03-16 16:40:39 -04:00
Zorchenhimer d0cd90e7af Properly implement the help popup
Move the help html to a template and populate the lists dynamically.
This also splits out the base HTML stuff (eg, the <html> and <body>
tags) to a base template file.
2019-03-16 16:15:55 -04:00
joeyak 30d480d878 Change heartbeat to be send only when in chat 2019-03-16 15:47:48 -04:00
joeyak b38542333a Add a debug message to print values 2019-03-16 14:59:30 -04:00
joeyak f9fa44ea77 Add enter for keys to autocomplete name 2019-03-16 14:27:13 -04:00
Zorchenhimer 80be38128f Wasm client pings the server every second
This prevents disconnects when the server is behind Nignx.  Resolves
#35.
2019-03-16 14:12:25 -04:00
joeyak ad4186a279 Added completion on tab for autocompleting name
closes  #7
2019-03-16 11:56:43 -04:00
joeyak 57e1f3863a Added popup box and arrow controls
When typing @ a div will show up with all the chat names that match.
When up or down arrow keys are pressed, the highlight changes.
Tab handling is currently incomplete but the event is prevented.

issue #7
2019-03-16 11:40:39 -04:00
joeyak a717c6ef38 Converting from conn.WriteMessage to conn.WriteJson
This takes away some of the work on the developers side to worry about parsing the object as a json string.
Backend work for issue #7
2019-03-15 17:28:29 -04:00
joeyak 678ccab95c Add some backend infrastructure
The server can now send the client objects with data for the client to process.
issue #7
2019-03-15 02:19:16 -04:00
joeyak 60dd98a1e7 Add infrastructure for the client to send formatted data to the server 2019-03-14 15:21:53 -04:00
Zorchenhimer 653ff6fc9c Some performance tweaks to the wasm code
Removed two fmt.Sprintf() calls and a fmt.Printf() call.  The Printf()
was for debugging and isn't needed anymore.  Sprintf() apparently
isn't all that performant.
2019-03-14 10:12:21 -04:00
joeyak 2ef3684c14 Some linting fixes for the common package 2019-03-13 21:24:14 -04:00
joeyak d83d5225c8 Remove the log function which is no longer needed 2019-03-13 15:28:21 -04:00
Zorchenhimer bdd4e71261 Flesh out the JSON stuff a bit more
Implement some commands in the wasm client code:
  - /playing (setting and clearing)
  - /refreshplayer
Commands not yet implemented:
  - /purge (command doesn't exist yet on server)
  - /help (doesn't open window)
2019-03-13 13:42:38 -04:00
Zorchenhimer 9c80269943 Start convert to JSON data b/t client and server
Chat and events should work.  Commands do not work yet.  Everything
also needs to be tested and cleaned up a bunch more.
2019-03-13 01:09:24 -04:00
joeyak 5544ac817f Converted to code to using webassembly 2019-03-11 23:15:42 -04:00