Commit Graph

9 Commits

Author SHA1 Message Date
Ben Davies
29bab1bfdf Fix SockJS when using the desktop client (#1360)
* Patch SockJS v1.4.0 to work with nw.js

* Document how to upgrade SockJS in UPGRADING-SOCKJS.md
2019-09-04 14:54:03 -05:00
Ben Davies
02eaeecf46 Implement connection timeouts (#1358)
* Use SockJS' timeout config option

This sets timeouts on connections to 5 minutes, matching the server's
heartbeat interval to close sockets that shouldn't be open anymore.

* Update SockJS client to v1.4.0

This fixes an issue where SockJS would parse the entire HTTP response
received as JSON, not the response's body alone.
2019-09-03 21:31:24 -05:00
Guangcong Luo
898280c5e5 Improve format/team selector
This introduces a new TeamForm component, which can be used to choose
formats and teams.
2019-08-22 11:08:43 -07:00
Guangcong Luo
b47708efa0 Implement teambuilder dropdown selector
This took way too long to get to a presentable state.

- search.js has been refactored into battle-search.ts (search logic)
  and battle-searchresults.tsx (display)

- panel-teambuilder.tsx has been split into teambuilder (team list) and
  teambuilder-team (team editor).

- The teambuilder's text editor can now detect which line it's on,
  and show the appropriate search result panel.

- The teambuilder's text editor now detects sets dynamically, and has
  the beginnings of support for set comments.

Currently, everything here is really basic, and mostly just a tech
demo for people to play around with and understand the direction of
the new teambuilder, but it'll be improved over time.
2019-06-25 00:51:27 -07:00
Guangcong Luo
bb6fe7ec3e Improve teambuilder stub
This should give an idea of the direction I want to take the
teambuilder in: a text editor, but with special features.

This neatly sidesteps a lot of UI questions, especially all the export
and input buttons, because the regular editing mode can be used to
import and export without anything fancy.

This also makes way for a better way to implement team/set comments:
comments are just invalid Pokémon in a team.
2019-05-16 01:27:19 +04:00
Guangcong Luo
7d52fd8c30 Implement TeamDropdown
Currently it's in the Main Menu where the old team dropdown was, but
the plan is for "Battle!" to eventually open a separate Search window.
2019-04-05 17:34:20 +08:00
Guangcong Luo
fbaceafac1 Implement Rooms room 2019-03-21 20:16:01 +09:00
Guangcong Luo
3bef3920a8 Defer JS loading
I don't know exactly how HTTP2 works, but in theory this should be a
noticeable perf improvement.
2019-03-21 17:00:52 +09:00
Guangcong Luo
eb38544200 Support serving the Preact client
If you want to access it, I'm sure you can figure out how from this
code. ;)
2019-03-17 06:21:49 -04:00