Commit Graph

3411 Commits

Author SHA1 Message Date
Mia
626ececf17 Storage: Add colors to all 6 mainmenu buttons
Previously, it was only doing 5, which was hardcoded. I made this a top-level variable for future changes because this one took a while (finding all the references took a bit, numbers are not easily searched in this file.)
2023-11-13 09:13:47 -06:00
Mia
8750d6b985 Add home button for friends list
Z said this was fine.
2023-11-10 09:12:04 -06:00
Guangcong Luo
9219fb31b2 Fix another oversight from design refresh 2023-11-10 01:03:07 +00:00
Guangcong Luo
910be168ed Clearer error message for teams corruption 2023-11-10 00:59:11 +00:00
Guangcong Luo
7c18649859 Workaround for large cookies
The FCCDCF cookie frequently goes oversize, and has recently
been causing people to be unable to access PS because their total
cookie size is going over 8KB, above Apache's default maximum.

https://business.safety.google/adscookies/

It looks like this cookie is set by Google and, according to the
internet, sometimes gets filled with junk? I don't know of an
easy way to fix this, but I'm hoping this does it.
2023-11-10 00:59:11 +00:00
Mia
fb049bef90 Storage: Ensure teams of nonstandard length don't duplicate on load 2023-11-05 18:36:55 -06:00
Guangcong Luo
befbf585e6 Fix more design refresh bugs
- Teams in folders in the team dropdown were unstyled

- `.button.disabled` wasn't taking precedence over `.button.notifying`
2023-11-04 23:22:59 +00:00
Guangcong Luo
6ca49c5178 Teambuilder: Fix desync bugs
Fixes #1991

(Removing a move by clicking on it in search didn't actually
remove it from the set.)

Fixes #2134

(Sorting and clicking on a filter would clear the currently
selected pokemon/move textbox, but this was only supposed to
happen when searching for a filter.)
2023-11-04 17:26:43 +00:00
Guangcong Luo
fb41336f9a Improve design
- Updates New Replays for the design refresh
- Updates STYLING.html for the design refresh

Fixes #2177
2023-11-04 16:20:50 +00:00
Guangcong Luo
e7814d3c6d
Design refresh (#2175)
Mostly this makes dark mode darker, but it does come with a whole suite
of other design improvements.
2023-11-03 20:40:16 -07:00
Mia
b64f89149d Account for custom challenges with best of default checks 2023-11-02 00:47:30 -05:00
Leonard Craft III
463948fa73
Support more variable best-of challenges (#2173) 2023-11-01 23:24:15 -05:00
Guangcong Luo
177e3e97a0 New Replays: Support sorting by rating
This also includes some refactors. Polyfills are now gone from
utils.ts (I'm not sure why they were ever there; they're redundant
with ps-polyfill.js) and there's a new Net.decodeQuery.
2023-10-29 17:39:15 +00:00
Guangcong Luo
7305b5892b Rename switchSides -> switchViewpoint
New name is a lot clearer.
2023-10-29 04:51:14 +00:00
Guangcong Luo
44becdddbf Minor improvements to downtime messages 2023-10-25 16:51:41 +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
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
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
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
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
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
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
Sergio
18f1bed15c
Fix leaveroom when the room no longer exists (#2141) 2023-09-16 12:45:08 -05:00
Karthik
bb09e4c562
Fix Tera Type shown when exporting Ogerpon set (#2149) 2023-09-13 22:32:23 -04:00
Kris Johnson
bdb35e097e
Add Pre-DLC client support (#2146) 2023-09-13 16:59:55 -04:00
Karthik
a4d4762332
Support Teal Mask DLC changes (#2147) 2023-09-13 16:59:41 -04:00
Kris Johnson
4e596e9a29
Fix level setting for LC variants (#2145) 2023-09-01 12:34:21 -04:00
Andrew Werner
2451f24bb6 Revert "Fixed IV defaults for generations with hypertraining (#2140)"
This reverts commit 105ee1690e.
2023-08-28 22:33:23 -04:00
Kris Johnson
5fd9defd92
Fix LC teambuilder level setting (#2138) 2023-08-28 16:22:07 -04:00
EvGym
105ee1690e
Fixed IV defaults for generations with hypertraining (#2140) 2023-08-28 11:55:43 -04:00
Kris Johnson
b8c64b3c9d
Add Monothreat client support (#2136) 2023-08-13 21:53:41 -07:00
Dylan
399aee9f74
Hide username on screens smaller than 500px (#1973) 2023-07-18 16:04:41 -07:00
Leonard Craft III
f0d9f53ded
Update raw team length restriction to 25 KB (#2125) 2023-06-16 01:28:17 -04:00
Guangcong Luo
fc00e68231 Fix performance on long battles
1000-turn battles often took over a minute to load, but they should now
be loaded in a few seconds. In addition, loading no longer freezes tabs,
and skipping several turns back should be a lot more performant.

There are two tricks here:

1. Every 300ms, we rest for 1ms to let the event loop run, which doesn't
   provide _that_ much UI responsiveness, but enough for the tab not to
   freeze entirely, and allows things like leaving the battle or clicking
   "Prev turn" multiple times in a row.

2. Instead of writing every single turn to the battle log when skipping
   to the end of a replay (such as when joining a battle), we only write
   the most recent 100 turns. This drastically speeds up loading.
2023-03-27 04:42:46 -04:00
Kris Johnson
6418607ed0
Teambuilder: Fix National Dex BH EVs (#2105) 2023-03-14 19:39:55 -04:00
Guangcong Luo
a78f3c049e Fix crash from #2005 2023-03-14 02:13:18 -04:00