Commit Graph

4548 Commits

Author SHA1 Message Date
Guangcong Luo
c70a54f4e6 Support room search in rooms panel 2019-03-22 18:51:44 +09:00
Guangcong Luo
087c030c2b Support "Chat" button on usercards
Also grey out unsupported buttons.
2019-03-22 00:22:17 +09:00
Guangcong Luo
23a1c86823 Update /me styling
In /me, usernames are now bold, italic, and username-colored. The
username should now be more obviously a username, and also more
obviously a part of the /me-sentence.

I got unanimously positive reactions, so I'm pushing this through. I'm
sure plenty of people will hate change, but whatever.
2019-03-22 00:10:24 +09:00
Guangcong Luo
f802aa8b40 Improve support for username colors
Includes a minor refactor of battle-log.ts
2019-03-22 00:10:24 +09: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
asgdf
689c741526 Don't display illegal HMs as legal in Teambuilder (#1253) 2019-03-19 10:45:14 +09:00
Kris Johnson
0cb0056dae Fix teambuilder headers (#1254) 2019-03-18 22:29:47 +04:00
Guangcong Luo
a45578f731 Fix closing PM windows 2019-03-17 20:22:58 +09:00
Guangcong Luo
3e59d4e430 Add stub support for PMing 2019-03-17 20:18:26 +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
Guangcong Luo
7479cf6658 Lower line length limit to 120 2019-03-17 19:02:53 +09:00
Guangcong Luo
c02370f8b2 Stub teambuilder implementation 2019-03-17 19:02:53 +09:00
Guangcong Luo
25d2422a58 Add support for chat userlists and usercards
This involves a relatively substantial refactor to how panels work, but
it should be somewhat finalized now. Popups are now fully supported.
2019-03-17 19:02:53 +09:00
Guangcong Luo
6622e50234 Improve support for panel switching
Using arrow keys to switch rooms is now in! Unlike in the old client,
the new system supports switching to all rooms, and supports arrow keys
in all situations, rather than only being able to switch between chat
rooms, and only with textareas focused.

Also, focusing chat rooms now focuses the input box. This was
surprisingly hard to implement with React, which has an annoying
all-or-nothing approach to state it doesn't control.
2019-03-17 19:02:53 +09:00
Guangcong Luo
7174223d87 Support sending messages to rooms 2019-03-17 19:02:53 +09:00
Guangcong Luo
04a5454f6e Support login handshake
You can't actually log in through the Preact client anyway, but now
if you set the right config file, you can _be_ logged in.
2019-03-17 19:02:53 +09:00
Guangcong Luo
47425d4314 Fix style errors caught by tslint 2019-03-17 19:02:53 +09:00
Guangcong Luo
ecc21274b1 Router: Support hashes in testclient
This at least lets me test some router features without pushing it to
the live server.
2019-03-17 19:02:53 +09:00
Guangcong Luo
786bd37f72 Support uhtml 2019-03-17 19:02:53 +09:00
Guangcong Luo
0246466299 Use BattleLog for chat logs 2019-03-17 19:02:53 +09:00
Guangcong Luo
f3b6352676 Stub chatroom support 2019-03-17 19:02:53 +09:00
Guangcong Luo
805cc810d9 Add basic popup support 2019-03-17 19:02:53 +09:00
Guangcong Luo
e501702a2a Add connection support
The actual connect function is commented out, because there's no reason
for it to do anything. But it can actually connect to a server now.
2019-03-17 19:02:53 +09:00
Guangcong Luo
d271be4758 Add a router
Unlike the old router, this one has no dependencies, and also tracks
left/right panel state, for more accurate back/forward button support.

It also sets the URL to the last selected panel, instead of always
using the left panel.
2019-03-17 19:02:53 +09:00
Guangcong Luo
49bb49a038 Support joining/leaving rooms 2019-03-17 19:02:53 +09:00
Guangcong Luo
bf26807c16 Flesh out Prefs, Teams, User models a bit
There's still a lot more to do, but this is a start
2019-03-17 19:02:53 +09:00
Guangcong Luo
7ecf13caf2 Improve room layout code
Room layout code is now better commented and more readable.
2019-03-17 19:02:53 +09:00
Guangcong Luo
bc7676838d Rename client-frame.tsx -> panels.tsx
Considering all the individual panels start with `panel-`, this should
make it easier to find and in general be a more intuitive name.

All other tsx files will start with `panel-`, putting them together in
one place when sorting alphabetically.
2019-03-17 19:02:53 +09:00
Guangcong Luo
008e3de862 Implement stub Main Menu and Rooms panels 2019-03-17 19:02:53 +09:00
Guangcong Luo
5def884999 Stub Main Menu 2019-03-17 19:02:53 +09:00
Guangcong Luo
f7c47ffdf5 Move calculateLeftRoomWidth to PS main model
This is kind of a break of purity, because it reads
`window.offsetWidth`, but this is the lowest-overhead way to
automatically recalculate the leftRoom width whenever PS updates
(i.e. whenever leftRoom or rightRoom change).
2019-03-17 19:02:53 +09:00
Guangcong Luo
7d50045957 TypeScript 3.1 thinks document.head is nullable
:|
2019-03-17 19:02:53 +09:00
Guangcong Luo
0d0cdfe068 Add architecture overview to CONTRIBUTING.md 2019-03-17 19:02:53 +09:00
Guangcong Luo
f8d251c8a1 Stub Preact rewrite
HIGHLY UNFINISHED CODE
2019-03-17 19:02:53 +09:00
Ridaz
137dc317b7 Move animations: Fix xattack
...And the moves that use its animation
2019-03-14 16:23:39 +00:00
whales
d4f7d6668c Fix desktop notifications (#1251) 2019-03-14 19:29:05 +09:00
Guangcong Luo
13dfe03a3a Support "read more" element
This is just code to support using details/summary for a "read more"
system. The entire summary portion can be clicked to expand/collapse,
but the overall usability feels "better than before" to me.
2019-03-14 04:03:11 +09:00
Kirk Scheibelhut
8710f6cf0a Add Ctrl+ as a keyboard shortcut for code` (#1250) 2019-03-13 17:11:59 +09:00
Kirk Scheibelhut
74941fde52 Update README testclient instructions (#1249) 2019-03-12 13:11:50 -07:00
urkerab
8c075d4f8e Fix activation of Mummy (#1248) 2019-03-09 09:57:29 -06:00
whales
6a38e809bc Update nwjs API for later version (#1246) 2019-03-09 09:27:44 -06:00
asgdf
d843455588 Tooltips: Fix Flower Gift (#1247) 2019-03-09 12:27:19 +01:00
Guangcong Luo
06a9b34125 EV guesser: Fix Modest/Adamant spreads
Modest/Adamant spreads were accidentally more common than intended,
due to a simplification that went the wrong way.
2019-03-08 09:53:36 -06:00
Guangcong Luo
f94a242c63 Tooltips: Don't count copied/Z moves for limit 2019-03-07 16:36:29 -06:00
Guangcong Luo
c88d2a2ecb Stop showing stats for Transformed Pokémon 2019-03-06 13:49:17 -06:00
Guangcong Luo
a9b8155b5d Implement EV guesser test
Also improve existing battle test.
2019-03-06 13:49:17 -06:00
MacChaeger
5232273445 Don't intercept links in replay-uploaded popups (#1245) 2019-03-06 11:25:02 -06:00
Guangcong Luo
30c57c1a42 Correctly handle renames in BattleLog 2019-03-06 10:24:34 -05:00
Guangcong Luo
9c9675f2fc Don't intercept replay links on side servers 2019-03-06 10:24:34 -05:00