Commit Graph

5298 Commits

Author SHA1 Message Date
Kris Johnson
8e56a4dfcc Add teambuilder support for Gen 1 NU (#1730) 2021-03-15 14:40:23 -04:00
Kris Johnson
0f1db74ca4 Fix support for OMs in the teambuilder (#1725) 2021-03-15 14:40:11 -04:00
Mia
95bbe72129 Add a button to copy/paste password reset urls (#1728) 2021-03-15 07:54:45 -07:00
Annika
359f0915ec Website: Add Spanish translation for FAQ and Staff 2021-03-09 09:50:26 -08:00
Leonard Craft III
de908c70d4 Display Mental Herb cure text (#1724) 2021-03-07 17:35:09 -05:00
Marty-D
cff921d991 Tooltips: Fix Heat Crash and Heavy Slam 2021-03-07 17:25:36 -05:00
Annika
8f1b3120c6 Remove objectionable replays from the homepage (#1727)
Removes replays with slurs, inappropriate usernames, permabanned users, and/or runMinor errors from the homepage
2021-03-04 18:31:12 -05:00
Kris Johnson
8cd74fc707 Teambuilder: Don't recommend 252 all EVs in Gen 6 (#1723) 2021-02-15 01:36:16 -08:00
Kris Johnson
83bd792b1b Don't autofill EVs in Gen 6 Hackmons metas (#1722) 2021-02-13 14:56:37 -05:00
Annika
8e81d19b45 Credits: Move The Immortal to Retired Staff 2021-02-10 12:35:05 -08:00
Guangcong Luo
c607b2a507 Support more compound words in search 2021-02-08 23:14:47 -05:00
Guangcong Luo
c3a2ea92cb Fix data-href and <a><button> buttons
This adds support for more server-side Pages, and also moves support
for back buttons (in Ladder and Teambuilder) back into the router for
easier use.
2021-02-08 23:14:47 -05:00
Guangcong Luo
f4edbef2f7 Improve indications of PS loading
New PS now makes it much clearer when it's still connecting to the server,
and when it's connected.
2021-02-08 23:14:47 -05:00
Guangcong Luo
62a20cade2 Fix crash in ladder panel 2021-02-08 23:14:46 -05:00
Guangcong Luo
0635dd4342 Implement Logout button 2021-02-08 23:14:46 -05:00
Guangcong Luo
7670b51b1b Use /hidenext for the hide checkbox
(This matches the tooltip help and should have been done a long time ago.)
2021-02-05 20:38:48 -05:00
Mia
0e3c80238c Support a twitch embed (#1720) 2021-02-05 16:02:17 -08:00
Guangcong Luo
aa82e72e9a Partial drag/drop panel tab rearranging (#1641)
Not full support, but basic rearranging is now possible!

Supported:

- Rearranging the topbar
- Dragging PMs from the Main Menu to the topbar

Not supported:

- Dragging things from the topbar to the Main Menu
2021-02-01 23:40:20 -08:00
Mia
868244d49f Improve banning servers (#1719) 2021-02-01 13:18:38 -08:00
Mia
b3239205fc Fix broadcasting /help (#1715) 2021-01-31 00:36:56 -08:00
Guangcong Luo
e9bc53d899 Fix crash in sorting users
Reported here: https://www.smogon.com/forums/threads/make-command-to-undo-ioo.3677346/#post-8736801
2021-01-31 01:23:53 -05:00
Guangcong Luo
f94d89887e Improve design of "Show password" button 2021-01-31 01:23:44 -05:00
urkerab
c621da6a01 Explicitly mark more non-submit buttons with their type (#1718) 2021-01-30 22:13:23 -08:00
Adam Tran
ba2b18d012 Preact: Page Panel (#1716) 2021-01-29 18:53:35 -08:00
SirKira(!Uzumaki)
d52c29d485 Add "Show password" button (#1704) 2021-01-29 12:06:47 -08:00
Adam Tran
a9f8adfa39 Preact Client: Ladder (#1709) 2021-01-29 08:10:36 -08:00
Guangcong Luo
3e4b83298c Update Battle class API (#1686)
The client Battle class API has been pretty old and crusty, so this
updates it to be saner.

The constructor now takes an options object. Any setting you'd want to
initialize with is now a constructor option, instead of needing to call
methods after the constructor.

(Deprecated settings `roomid` and `joinButtons` still need to be set
separately.)

The old callback system is removed. It's replaced with a subscription
system vaguely resembling `PSStreamModel`. Any callbacks only intended
to be used by the warstory generator are removed (anyone who wants to
write their own warstory generator should extend `BattleSceneStub`
instead).

Battles no longer start paused. You can still start them paused by
passing `paused: true` as an option.

Playback state tracking had a bunch of rearrangement:

- `playbackState` no longer exists; state should be directly read from
  `paused`, `atQueueEnd`, `turn`, and `seeking`.

- `turn` is now initialized to `-1`. `-1` now means "we haven't reached
  `|teampreview|` or `|start|` yet". Reaching those sets turn to `0`.

- "Fast forwarding" and "seeking" are now consistently named "seeking".
  - `seeking` tracks seek state; changes from `fastForward`:
    - `null` means not seeking (replaces `0`)
    - `0` means seeking the start (replaces `0.5`)
    - `Infinity` means seeking the end (replaces `-1`)
  - `fastForward` deprecated and replaced with `seeking`
  - `fastForwardTo()` deprecated and replaced with `seekTurn()`

- `resultWaiting` is removed (it's unused)

- The "activity queue" has been renamed the "step queue", which means
  some renamed properties:
  - `activityQueue` to `stepQueue`
  - `activityStep` to `currentStep`
  - `nextActivity()` to `nextStep()`

- new property: `atQueueEnd` to track if animation has caught up to the
  end of the step queue (replaces checking `playbackState`)

- new property/option: `isReplay` - will automatically set `ended` when
  reaching the end of a replay (stopping music and showing a message),
  if the replay was saved before the end of the battle

- both replay players (`replay.pokemonshowdown.com` and downloaded
  files) have been rewritten to use an observer system, instead of the
  previous manual updating

- `reset(true)` has been renamed `resetStep()`
2021-01-23 13:17:23 -08:00
Konrad Borowski
0005f1f79f Use JSON.parse for parsing teambuilder tables (#1714)
This optimizes JavaScript parsing performance. V8 developers
recommend applying this optimization for objects of 10 kB or
larger, see <https://v8.dev/blog/cost-of-javascript-2019#json>
for more details. Teambuilder tables are 3.5 MBs which is much
more than 10 kB.
2021-01-23 09:45:20 -08:00
Guangcong Luo
934eb7be2c Update ladders and docs 2021-01-22 12:38:50 -05:00
Guangcong Luo
abc5bffa65 Port Net library over
We can't share code because the client uses XHR and the server uses Node's
HTTP/HTTPS libraries, but we're now sharing a lot of the API, which should
make it more familiar.
2021-01-20 09:59:18 -05:00
Adam Tran
1d9fadde06 Tooling: Preact Client server by URL; tslint (#1711) 2021-01-20 04:44:36 -08:00
Kris Johnson
1693ccfe06 Remove LC Uber references (#1712)
And (Uber) from National Dex teambuilder.
2021-01-19 03:34:01 +04:00
Kris Johnson
5e26ecf5fd Add custom filters for Gmax formes (#1710) 2021-01-19 02:31:17 +04:00
Adam Tran
4b92869c96 Add support for Preact fragments (#1708) 2021-01-16 07:06:16 -08:00
Guangcong Luo
ab26ad9023 Update to Preact 10.5.10
Duplicating #1708, but for security reasons I always take binary blobs
directly from trusted sources.
2021-01-16 07:03:50 -08:00
Adam Tran
1f3c8cf450 Add sourceMaps and vscode debug configurations (#1707)
* launch json

* vscode updates

* clientUrl rename
2021-01-10 16:58:28 -08:00
Kris Johnson
e1ab227783 Refactor /highlight (#1702)
* Refactor /highlight

* oops

* v

* apply suggestions
2021-01-05 14:14:24 -08:00
Leonard Craft III
af44ff326a Disable Max Guard choice on Taunt / Assault Vest (#1701) 2021-01-03 09:47:33 -05:00
Marcell
646c07efc1 Translate RNG article to German (#1604)
* Translate rng faq to german

I translated the rng faq to german.

* Improve german RNG article phrasing
2020-12-30 17:47:59 -08:00
Marcell
222caf2e80 Improve RNG article phrasing (#1605) 2020-12-29 08:41:41 -08:00
Marty-D
65cdb2a889 Add Miasmite minisprite 2020-12-28 11:06:00 -05:00
Distrib
55fadf4361 Improve /help challenge for custom rules (#1695)
* Add /battlerules for help challenge

I added the /battlerules for the help challenge and an alias for help (h) 
https://www.smogon.com/forums/threads/add-custom-rules-page-to-help-challenge.3674780/

* Update js/client-chat.js

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update js/client-chat.js

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-12-25 04:07:48 -08:00
Mia
c7a536632f Fix conflict with local fixes (#1700) 2020-12-24 03:08:30 -05:00
Mia
f3a77dc28a Comply with Google API ToS properly (#1698)
* Update compliance

* Add note to the rules page

* OK

* Update src/battle-log.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update battle-log.ts

* Update website/pages/privacy.md

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update website/pages/rules.md

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

* Update src/battle-log.ts

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>

Co-authored-by: Guangcong Luo <guangcongluo@gmail.com>
2020-12-23 00:27:02 -08:00
SirKira(!Uzumaki)
036f1dd062 Add a horizontal scroll bar for "infobox-limited" class (#1699)
Ig infobox-limited class is in room intros and in the event box. On mobile phones, it is hard to check the whole room intro or event and you can slide because overflow for the x axis is hidden. So just removing overflow-x: hidden.
2020-12-22 23:55:29 -08:00
Leonard Craft III
b952f1afaa Update forme cries (#1696) 2020-12-19 18:48:54 -05:00
Mia
b761cc3656 Youtube tag: Fix regex (#1694) 2020-12-13 11:56:23 -08:00
Annika
871817ec81 BattleRoom: Fix bug with autotimer (#1693) 2020-12-12 16:05:37 -08:00
MacChaeger
bfdcc946a9 Desktop client: Save boxes as boxes (#1692) 2020-12-05 07:58:19 -08:00
MacChaeger
073750b5d9 Max Guard is always Normal Type (#1691) 2020-12-04 16:23:52 -08:00