Commit Graph

5791 Commits

Author SHA1 Message Date
Guangcong Luo
0dcff6c2c3 New Replays: Support pagination in search results 2023-10-29 04:51:14 +00:00
Guangcong Luo
6d26acef8d New Replays: Support linking to viewpoints
New Replays now supports adding `?p2` to the end of a replay
URL, to see the replay from the opposing viewpoint.

Search results will now automatically be from the viewpoint of
the player you're searching for.

Viewpoint is now a selector rather than a "Switch sides" button,
which should hopefully be clearer about what it's doing.
2023-10-29 04:51:14 +00:00
Guangcong Luo
3bb2271bbc New Replays: Two column support
Old Replays's two column support was the Panel system most notably
shown off by PSDex. It was definitely very nice but a bit hard to
port to Preact.

This new one, written from scratch, has a few niceities:

- topbar can scroll offscreen
- only one scrollable area (scroll wheel works everywhere, and
  the PageUp/PageDown/Spacebar keys are unambiguous)
- uses very little JavaScript when resizing; most of the layout
  work is done by CSS

With the drawbacks:

- no animation
- only two columns supported (not relevant to Replays which has
  never used over two columns)
- uses a lot of modern CSS (overflow: sticky, and flexbox) but
  should degrade gracefully
2023-10-29 04:51:14 +00:00
Guangcong Luo
689531d3b4 New Replays: Support private replays & more
The headline feature here is that we now support being logged in and
searching for private replays. We also have a new button to instantly
find your own replays.

Also here is the basics of HTML5 history support. It's the first step
to having the two-column layout up and running!
2023-10-29 04:51:14 +00:00
Guangcong Luo
235056ba75 Update New Replays
The main difference is that the main search screen should look
much nicer now.

https://pokemonshowdown.com/replays/

Putting search/featured/recent in separate sections makes the new
design look much nicer. And dark mode is now fully supported.
2023-10-26 21:38:59 +00:00
Guangcong Luo
fd28aca33f WIP New Replays
New Replays isn't done yet but I've done a lot of work on it and
probably it deserves a commit.

Why rewrite Replays:

- I redesigned pokemonshowdown.com to look more modern and support
  dark mode, and rejiggering Old Replays would be a lot of work
  anyway.

- It'd be nice to actually deploy some of PS's whole Preact
  infrastructure somewhere, instead of it just being in development
  hell.

- Nice to get a second look at the relevant code, leading to fixes
  like fc00e68231 and f28b1e9bf3.

- Replays is due for a migration from JS/PHP to TS anyway.

Anyway, feel free to try out New Replays, it's live in:

https://pokemonshowdown.com/replays/

Old Replays will stick around until we hit feature parity, but
that shouldn't be too long (I know, famous last words).
2023-10-26 14:56:05 +00:00
Guangcong Luo
e64b9a8732 Update Gen 1 battle background?
This has been sitting around uncommitted in the client. I'm sure
someone knows what's up with this, but I don't.
2023-10-25 17:20:34 +00:00
Guangcong Luo
399ab35dab Add <<formatsuggestions>> shortcut 2023-10-25 16:51:56 +00:00
Guangcong Luo
908fe3a320 Allow direct-linking lobby
In the distant past, Lobby was open by default, so people linking
to Lobby usually meant to link to PS itself, so links to Lobby
would just open PS.

This is no longer necessary, now that we no longer open Lobby by
default.

This commit also cleans up a bunch of other .htaccess entries,
for style/readability.
2023-10-25 16:51:50 +00:00
Guangcong Luo
1b04902c83 News: Support BBCode for italics 2023-10-25 16:51:46 +00:00
Guangcong Luo
44becdddbf Minor improvements to downtime messages 2023-10-25 16:51:41 +00:00
Guangcong Luo
07ad64a9b1 Gitignore node_modules 2023-10-25 16:51:37 +00:00
Guangcong Luo
4760516ce0 Website: Remove commented-out server URLs from server list
It's cluttering this code a lot for no reason.
2023-10-25 16:51:32 +00:00
Guangcong Luo
7fbb69cc60 Improve downloaded replays
They now support small windows/screens and dark mode.
2023-10-25 16:51:26 +00:00
Guangcong Luo
7d7dca835f Improve readability of Seeking screen
Now that fc00e68231 has made the Seeking screen more common,
it's worth making it more readable.
2023-10-25 16:51:20 +00:00
Guangcong Luo
581c4ae2ee Improve mobile responsiveness
By default, buttons on mobile wait 300ms (to see if you're double
tapping) before they register as pressed.

Adding `touch-action: manipulation` prevents this delay, at the
cost of not being able to zoom in when double-tapping a button,
which I'm sure no one has ever tried to do.
2023-10-25 16:51:14 +00:00
Guangcong Luo
ad4a3ab2ff Update logo
Unfortunately, the my computer crashed, and took with it the PSD
for this updated logo. But fortunately, I managed to upload all
the important versions (like the orange version for "you have a
notification").
2023-10-25 16:51:06 +00:00
Guangcong Luo
f28b1e9bf3 Battle frame: Fix height on small screens
This bug hasn't been noticed because the two main uses of battle
frames (the sim itself, and Replays) both absolutely position
battle frames, so they have nothing "below" them.

But on downloaded replays, on screens smaller than 640px across,
they took up an incorrect height. This is also relevant to New
Replays. This commit fixes that.
2023-10-25 16:50:08 +00:00
Mia
ae5543256a Support starring formats 2023-10-24 19:17:58 -05:00
Karthik
24d4229349
Format Selector: Hide categories with no matches from search (#2169) 2023-10-24 13:20:37 -05:00
Mia
999044d54f
Overhaul the format selector to be more easily used (#2168)
* Overhaul the format selector to be more easily used

* Update js/client-mainmenu.js

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>

* Lower search pop open limit

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2023-10-23 23:17:10 -05:00
Mia
65d387a823 Storage: Account for malformed team names in loading comparisons 2023-10-23 14:06:49 -05:00
Leonard Craft III
afbb31da92 Teambuilder: Fix empty learnsets in oldgen VGC formats again 2023-10-23 00:00:42 -05:00
Mia
68a9694b3a Storage: Properly compare team names 2023-10-22 18:43:41 -05:00
Mia
0647322d4b Storage: Improve handling of local teams versus remote teams
This should help differentiate local teams and remote-loaded teams. When they're initially requested, the client now compares each new team against all the existing teams - if they appear to be similar, it doesn't add it to the builder (so that dupe teams don't show up). It considers them similar if they have the same mons, title, and format. Otherwise, if it finds one that's close, it'll add it but marked as (server version) so people can tell which is which.
2023-10-22 17:43:20 -05:00
Karthik
d6efeb82bd
Fix speed buttons on downloaded replays (#2162) 2023-10-20 00:13:17 -05:00
Karthik
b47c593966
Fix showteam in replays (#2164) 2023-10-20 00:12:34 -05:00
Karthik
ec1ca0e265
Populate Tooltips with information from OTS (#2161) 2023-10-17 21:15:25 -05:00
Mia
dd4108c932 Update memorials 2023-10-08 12:43:27 -05:00
Christopher Monsanto
fe81e1389d Replays: don't add hash to <a> tags 2023-10-07 08:22:30 -04:00
Mia
d8f406390f Teambuilder: Disallow [ and ] in team names 2023-10-05 13:05:38 -05:00
Mia
8202611cf3 Teams: Default uploading to private 2023-10-02 15:29:55 -05:00
Mia
f3969bdc66 Teambuilder: Add a toggle to upload team as private 2023-10-02 15:27:13 -05:00
Mia
ef351ca16b Fix team validation 2023-10-02 12:49:15 -05:00
Mia
89050343f2 Fix crash in searching for battles 2023-10-02 12:03:58 -05:00
Mia
5cf6cfd55f
Support loading teams from server, add button to upload teams (#2157) 2023-10-02 10:38:19 -05:00
Mia
38e1eaa928 Caja: Whitelist custom attribute for formatselect element 2023-10-02 09:47:10 -05:00
Mia
1974428b14 Caja: Fix default format for formatselect element 2023-10-02 09:45:54 -05:00
Leonard Craft III
82ca9ec4a0
Bo3: Add challenge checkbox for VGC formats (#2158) 2023-09-30 23:07:17 -05:00
Mia
fd4c1ead73 Tournaments: Don't crash when tours have pipes in their name 2023-09-27 21:02:24 -05:00
Mia
631f1a36ca Fix checks 2023-09-27 16:30:16 -05:00
Mia
e4f6119e22 Support a custom tag for copying text to the clipboard 2023-09-26 22:14:15 -05:00
Mia
cae879e841
Add a button to allow using the format selector in chat pages (#2155) 2023-09-26 13:30:21 -05:00
Leonard Craft III
d750d9d65d
Support best-of-n room titles (#2154) 2023-09-26 13:23:07 -05:00
Mia
239ec418e8 Update credits 2023-09-20 10:34:48 -05:00
Mia
82822da13b Add a |cantleave| message
Will require users who receive this message in a battle room to forfeit before exiting the room. Need for BO3.
2023-09-16 21:08:43 -05:00
Marty
4a07bd1479 Update Pokemon and item icon sheets 2023-09-16 17:51:05 -04:00
Karthik
4a47347125
Tooltips: Support Ogerpon mask boost (#2151) 2023-09-16 17:26:54 -04:00
Sergio
18f1bed15c
Fix leaveroom when the room no longer exists (#2141) 2023-09-16 12:45:08 -05:00
Karthik
39bb1c553d
Fix Hospitality activation message (#2150) 2023-09-14 22:55:08 -04:00