Commit Graph

6126 Commits

Author SHA1 Message Date
Guangcong Luo
610c33dfa4 Preact: Refactor room args
- custom room info is now in `room.args`
- rooms not compatible with URLs can be marked with `noURL`
- PMs renamed to DMs, and are now `dm-[userid]` instead of
  `pm-[userid1]-[userid2]`
- custom popups now supported
- find-user popup now supported
- popups no longer come with padding, making them behave more like
  other panels
2025-04-07 20:15:47 -07:00
Guangcong Luo
1572b07cb4 Preact: Misc fixes
- Don't clear PM contents when rearranging
- Don't show "Chat self" on others' usercards while not logged in
- Direct usercard URLs to Preact client
- Fix mini window collapse/expand
- Fix dark mode mini window and focused mini window styles
- Set titles for more readable history
- Stub PS.alert / PS.prompt
- Document RoomOptions
- Infer parentRoomid from parentElem
- Fix room focus issues
- Fix browser back/forward history
- Keep default format up to date
2025-04-07 20:15:25 -07:00
Guangcong Luo
f272d9526b Preact: Support logging in
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-07 20:04:49 +00:00
Guangcong Luo
5c2beea822 Update intro comment
Unfortunately it seems like the console is the new hot place to say
hi to devs, rather than the source, but we're actually using the
console. So it's gotta be here.

ASCII art circle was outlined with

https://www.asciiart.eu/ascii-draw-studio

and the exclamation mark was done by tracing the old one. The rest,
including the anti-aliasing was entirely by hand, though.
2025-04-07 17:14:22 +00:00
Guangcong Luo
d8cd5d6d9f Replays: Support easier ways of getting inputlogs 2025-04-06 17:58:29 +00:00
Guangcong Luo
a82991268f Preact: Catch errors that only affect one room
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-06 08:46:46 -07:00
Guangcong Luo
89c9a78e1e Preact: Refactor registering room types
Room type data is now nearly all in the Panel class, which should make
it much easier to add custom room types.
2025-04-06 08:46:46 -07:00
Guangcong Luo
0dddb2844d Preact: More minor fixes
- New subroom link style
- New-style format list button
- Fix router (accidentally deploying Preact client to
  play.pokemonshowdown.com)
- Support omitting redundant `data-name` on username elements
2025-04-06 08:46:46 -07:00
Guangcong Luo
7f1c0c6ffc Fix ability listing in PSdex
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-05 21:59:19 +00:00
Guangcong Luo
d2b33464ec Preact: Support dragging rooms into mini-windows
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
Also fixes a whole bunch of bugs related to dragging rooms around.

Also renames:

- `activePanel` to `panel`
- `leftRoom` to `leftPanel`
- `rightRoom` to `rightPanel`
- `leftRoomWidth` to `leftPanelWidth`

Which should hopefully make the relationship between `panel` and
`leftPanel` more intuitive.
2025-04-04 19:38:02 -07:00
Guangcong Luo
0ace4b1b90 Refactor styling
- move big and small buttons to battle-log.css (so they can be used in
  custom HTML)
- sync Preact header styling with regular header (from the design
  refresh #2175)
- rearrange client.css and client2.css to move main menu and format
  dropdown styling out of the header section
- lighten light .button.cur to match header bar
- add active styling to blocklinks
2025-04-04 19:38:02 -07:00
Guangcong Luo
5a6e935747 Preact: Open console when pressing / in Main Menu
There's no easy way to enter a command in PS if you're not logged in.
This adds one.

This also standardizes the room ID for the console as `pm-`.

I'm still mulling whether `pm-[userid1]-[userid2]` should be the roomid,
or `pm-[pmtarget]`. Arguably it's nice for PMs to have the same roomid
for both sides of the conversation, but also arguably it's nice for
PMs not to change roomid when you change your own name (it'd still
change if your PM target changed name).
2025-04-04 19:38:02 -07:00
Guangcong Luo
4bb0242872 Restore switched-viewpoint featured replay links
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-04 14:43:38 +00:00
Guangcong Luo
0f916106e9 Preact: Misc updates
- Support `viewuser-` panels (no-interaction versions of user panels)
  for Ladder
- Fix bugs with hiding right panel
- Fix crashes in battle panel
- Fix close button in battles panel
2025-04-03 21:27:16 -07:00
Guangcong Luo
ca12fe943a Preact: Redesign Ladder
- Now supports COIL
- Now works in testclient due to using web-API
- Design looks a lot nicer
2025-04-03 18:56:51 -07:00
Guangcong Luo
4dcecc9fc8 Preact: Make client usable again
A few updates seem to have made the Preact client stop working, but this
restores it to working state again.
2025-04-03 18:56:51 -07:00
John Adams
4044099b9b
Added a volume slider to the replay client (#2344)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-03 17:04:58 -07:00
Guangcong Luo
a08f2a68d5 Support COIL in ladder web-API 2025-04-03 22:49:35 +00:00
Karthik Bandagonda
f85e5657d6
Implement Flame/Toxic orb texts (#2343)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-03 10:33:47 -07:00
Mia
d944f3100e Add custom name color for Hecate 2025-04-03 17:23:35 +00:00
Guangcong Luo
af487c1345 Don't crash when afdMode is set in Replays 2025-04-03 16:57:29 +00:00
Guangcong Luo
f4dd07879a Document Dex.afdMode 2025-04-03 16:47:46 +00:00
Guangcong Luo
f673603011 Improve Replays testclient documentation 2025-04-03 16:38:44 +00:00
Guangcong Luo
03c16b09a0 Add a testclient for Replays 2025-04-03 09:33:25 -07:00
Guangcong Luo
c5b146f41b April Fool's DLC: Add link
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-02 21:18:43 +00:00
Guangcong Luo
5e5578a140 Bring back Replays build script 2025-04-02 21:17:16 +00:00
HiZo
03992bd8f9
Client support for Relay Race (#2342)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
* Client support for Relay Race

* Update play.pokemonshowdown.com/src/battle.ts

* lint

* pain

* pain x2
2025-04-02 02:06:59 -06:00
Guangcong Luo
5b783ec7f3 Restore AFD code 2025-04-02 04:42:24 +00:00
Guangcong Luo
399289a3f7 April Fool's 2025 updates
The main new joke is #2337, but I made a number of other tweaks.
In particular:

- Bringing back some text from AFD 2019, and adding some more
- Showing the Taunt and Chilly Reception jokes in `/afd sprites`
2025-04-02 04:36:17 +00:00
Mia
cf2ef91360 Client: Remove default-on AFD setting 2025-04-01 23:28:19 -05:00
Guangcong Luo
76218b7926 Redesign Terastal/Mega/etc checkboxes
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-01 18:47:02 +00:00
Guangcong Luo
77977872ca Refactor AFD functionality
Having `Config.server.afd` and `Dex.prefs('afd')` do different things
was always a little confusing. Instead of removing either of these,
I'm adding a third variable, `Dex.afdMode` which --

*gets pelted by tomatoes*

look, it'll make sense once you see it!
2025-04-01 18:46:27 +00:00
Guangcong Luo
6ea51483fb Directory index: Support icon view
This is a questionably useful view that lets you see more files
at a time:

https://play.pokemonshowdown.com/sprites/?view=icons
2025-04-01 18:28:46 +00:00
Guangcong Luo
5a1cec202b Redesign website top navigation
The topbar in pokemonshowdown.com (and all not-in-sim pages)
has gotten revised in three ways:

1. Ladder has been replaced with Strategy, a link to the Smogon
   Strategydex.
2. Strategy and Forum now open in new tabs, because they don't
   share top nav with PS.
3. Strategy and Forum are now purple, to signal that they lead
   to Smogon and open in new tabs.

I'm way more a fan of the new look than I expected to be. Purple
and blue matches the "Horizon" art used on the main page quite
well, it turns out.

Ladder was always kind of useless - there's a better Ladder button
in-sim that keeps way more up-to-date with tier additions/removals,
and finding users can be done by clicking on the "X users online"
button.
2025-04-01 18:21:04 +00:00
Mia
6513b580bc Battle-dex: Ensure sprite parsing respects AFD settings
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-01 13:07:36 -05:00
HoeenHero
91e55e7947 AFD messages should respect AFD preferences
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-04-01 00:55:42 -04:00
Karthik Bandagonda
ee858aa006
Teambuilder: Show Restricted Legendaries for VGC/BSS Reg I (#2341)
Some checks are pending
Node.js CI / build (22.x) (push) Waiting to run
2025-03-31 18:37:07 -05:00
Kris Johnson
3ff157b736
Allow for multiple checkboxes to appear for mods (#2340)
* Allow for multiple checkboxes to appear for mods

* Fix visual styling

---------

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2025-03-31 16:50:54 -06:00
Guangcong Luo
56d0d9ba62 Add <<calc>>/<<damagecalc>> shortlink 2025-03-31 21:31:07 +00:00
Guangcong Luo
2db2b9bcc2 Directory listing: Support colored icons
We're using Font Awesome 5 Pro on the live site for duotone icons,
but I'm still retaining support for Font Awesome 4 for licensing
reasons.

Both are colored now, which makes for a better look, too.
2025-03-31 13:22:55 +00:00
Guangcong Luo
19a9ea5b26 Add Smogon shortlinks
New: <<smogdex>> <<smogcord>> <<forums>>

I also improved some things to make it easier to correctly add
shortlinks in the future.

Remember: psim.us/smogdex always works for shortlinks when outside
of PS.
2025-03-31 13:22:55 +00:00
Guangcong Luo
0e5ea674f2 Remove downloadable app links
These are really old; I've been meaning to do something about them
for quite some time but these probably shouldn't still be linked
in the meantime.
2025-03-31 13:22:55 +00:00
Guangcong Luo
1c760ccabc Refactor sprite views
Any directory that supports sprite view now also supports
directory view.

For instance:

https://play.pokemonshowdown.com/sprites/afd/?view=dir

Many more directories now support sprite view.

For instance:

https://play.pokemonshowdown.com/sprites/digimon/sprites/pokemonani/?view=sprites
2025-03-31 13:22:55 +00:00
Guangcong Luo
e3e90076d3 Random Unowns in 404 page 2025-03-31 13:22:55 +00:00
Kris Johnson
0938bc6a25 SSB: Update some tooltips
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-03-30 15:10:39 -06:00
Guangcong Luo
2d7a9c81d4 Improve directory indexes and 404 pages
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
We now have a custom look for directory indexes, so you can go dig
through PS's back closets in style:

https://play.pokemonshowdown.com/sprites/

Additionally, the 404 page everywhere is now as nice as the custom
404 page in Replays.

https://pokemonshowdown.com/404
2025-03-29 13:11:44 +00:00
ACakeWearingAHat
7cab679501
Implement April Fools' 2025 new jokes (#2337)
adds ~325 bad jokes to be randomly sampled from whenever
Chilly Reception is used, and adds ~50 new Yo Mama jokes for
Taunt.
2025-03-29 05:27:10 -07:00
Guangcong Luo
b90195346c Hide ugly error when PHP is installed
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-03-24 04:23:30 -07:00
Guangcong Luo
301252f53e Fix bugs in April Fool's message implementation 2025-03-24 03:32:55 -07:00
HoeenHero
8ce2e274ec Update administrator symbol in rules popup
Some checks failed
Node.js CI / build (22.x) (push) Has been cancelled
2025-03-22 15:26:12 -04:00