Commit Graph

167 Commits

Author SHA1 Message Date
Guangcong Luo
69cb27b596 Keep newly opened format folders visible
Normally, when navigating away from an empty format folder, it'll
disappear from the folder list. This keeps the folder visible if you
just opened it from a team selector or the 'New format folder'
button, so you can drag teams from other folders to that folder.
2015-12-16 01:23:39 -05:00
Guangcong Luo
e1f3ac0001 Use the Format dropdown for teambuilder formats
You can now add formats to the teambuilder folderbar and select
teambuilder formats using the same Formats dropdown previously
used for challenges and searches.

It is no longer to move a team back to Uncategorized. A future
update will fix this.
2015-12-16 01:23:39 -05:00
Guangcong Luo
d2f7327c74 Choose default team using teambuilderFormat
Before, 'UU (suspect test)' was treated differently from 'UU' when
choosing the default team in the dropdown. It no longer is.
2015-12-15 20:20:20 -05:00
Guangcong Luo
b5647d409a Improve team selector
The team selector now hides teams that aren't for the format, by
default. Other teams can still be selected with a 'more' button.

There's now a Teambuilder button to be taken straight to making
or editing teams for that format.
2015-12-15 18:37:01 -05:00
Guangcong Luo
1858de3c1b Default to no team if user has no team for format
Before, we used to default to the first team if the user had no team
explicitly for a format. Now, it defaults to no team.
2015-12-15 17:40:09 -05:00
Guangcong Luo
d0ffc16089 Prevent Opt+Cmd+I from italicizing text 2015-12-12 23:05:10 -05:00
Guangcong Luo
211da6e8b1 Major update to background storage and menu colors
When loading a background, we use Color Thief to get a six-color
palette from the image, for use on the main menu buttons.

Only hue and lightness are extracted.

https://github.com/lokesh/color-thief/

Backgrounds are now stored in localStorage in the current origin,
rather than the prefs origin. This allows faster loading, as well
as different backgrounds for different origins, which other
servers should like since it means their backgrounds get seen
at least once before possibly being replaced.

Special thanks to Joim for the base code.
2015-12-12 04:01:00 -06:00
Guangcong Luo
6491a7dba6 Redesign 'Look for a battle' button 2015-12-11 23:34:04 -05:00
Guangcong Luo
e24775bd7a Merge pull request #564 from urkerab/bold-italic-ignore-alt-key
Don't trigger bold or italic on Alt+B or Alt+I
2015-12-07 08:29:40 +00:00
Ivo Julca
1d514bc6ec Miscellaneous style fixes for better alignment to server code style 2015-12-03 02:25:57 -05:00
urkerab
c1f1224008 Don't trigger bold or italic on Alt+B or Alt+I 2015-12-02 12:32:42 +00:00
Guangcong Luo
f2b7747674 Make News start minimized on cell phones 2015-12-01 12:45:59 -06:00
Guangcong Luo
b718a335a2 News tracking 2015-11-30 02:11:27 -05:00
Guangcong Luo
c218046b77 Better support for 'working offline'
PS's UI is now updated to make it clearer whether or not you're
connected to a server, and which features are and aren't
available while disconnected.

The Reconnect? popup's "close" button has been renamed "Work offline",
to make it clearer that it's for people who want to continue using
the teambuilder or whatever while disconnected.

The button is a slight misnomer since some features, like the
Ladder, don't work without an internet connection.
2015-11-29 20:16:26 -05:00
Guangcong Luo
789acecf54 Remove unused code 2015-11-28 04:08:45 -05:00
Guangcong Luo
fefc779c04 Merge pull request #541 from augmt/patch-1
Pass roomid when adding TeamPopup from TournamentBox
2015-11-05 04:08:39 -06:00
Guangcong Luo
44526f7863 Move toggleFormatChar from Tools to ConsoleRoom
The name is a bit unfortunate, but Tools is specifically for data
access for game stats/mechanics and other things relevant to
battles, it's not supposed to be a generic place to stick
miscellaneous functions.
2015-11-05 03:29:42 -05:00
Hector Garcia
0b8e862506 Pass roomid when adding TeamPopup from TournamentBox 2015-11-05 06:30:16 +00:00
Hector Garcia
4c3df24c69 Adjust curTeamIndex for each room accordingly
Rooms with `button.teamselect` present have their `curTeamIndex`
adjusted on various Teambuilder operations
2015-10-31 14:31:24 +00:00
Ivo Julca
7c18127ddf More consistently escape formats 2015-10-07 01:31:09 -04:00
Guangcong Luo
bdcbded0bb Update Font Awesome to 4.4.0
Font Awesome 3 -> 4 was a backwards-incompatible change, so this
update is pretty invasive. I tested everything we use it for and it
still works, though. Including supporting both Font Awesome versions
in battle.js.
2015-09-25 02:46:34 -05:00
Guangcong Luo
b38b06f6ab Merge pull request #479 from urkerab/pm-chatbox-history
Support chat history in PM chatboxes
2015-09-24 03:53:32 -05:00
urkerab
6e861e535e Support chat history in PM chatboxes 2015-09-24 09:46:15 +01:00
Guangcong Luo
447d11bd8a Improve visual appearance of PM header
Specifically, provide visual feedback that clicking it expands
and collapses PMs.
2015-09-23 20:23:01 -04:00
Guangcong Luo
e232b988d7 Turn PM windows orange on new message until focused
Before, only minimized PM windows turn orange when receiving a new
message. Now, all unfocused PM windows do until focused.
2015-09-23 01:29:03 -04:00
Joimer
6350f33eb9 Update credits 2015-09-22 00:35:07 +02:00
urkerab
969f77e2e7 Support additional keys in PM chatboxes 2015-09-17 14:09:21 +01:00
urkerab
a1c674851a Make it possible to minimise the Latest News box 2015-09-09 12:33:09 +01:00
urkerab
4238e9a3e4 Display battle formats in groups 2015-08-31 16:43:15 +01:00
Ivo Julca
804b6b7b5d Don't hide suppressed spoilers in notifications 2015-08-05 21:13:52 -05:00
Ivo Julca
ada7385bb4 Unify chat message parsing in rooms and PMs
Most notably, this adds support for /announce and /mee in battle rooms, and /html in chat rooms.
A better user group inference is now used for PMs and chat rooms.

This is done by implementing a general Tools.parseChatMessage method.
2015-08-05 21:07:28 -05:00
Guangcong Luo
8b7fe71049 Support /ignore in PM boxes 2015-07-20 21:32:25 -04:00
Guangcong Luo
cfbff0571c Update Credits 2015-07-18 14:22:25 -04:00
Guangcong Luo
d50f07c188 Highlight own messages
Your own messages are now sent with a slightly darker background.

PS actually originally had a feature that made your own messages gray,
which stopped working during the redesign two years ago. I only just
realized this and brought it back, but since the redesign, the
background has gotten darker and gray text is harder to read, so
I'm trying out this new approach with the background.

I personally think design-wise, gray text is better, but readability
is more important. Maybe I'll have a better idea later, but for now,
this doesn't look all that bad.
2015-07-15 17:29:38 -04:00
Guangcong Luo
698b413801 Revert mode changes from recent style fixes 2015-07-14 19:00:58 -04:00
Freigeist
4d242777c1 Miscellaneous style changes 2015-07-14 21:17:22 +02:00
Freigeist
87b94e7284 Fix spaces on string concatenation 2015-07-14 21:15:04 +02:00
Freigeist
993e8911ac Put spaces before anon function's opening parenthesis 2015-07-14 21:12:58 +02:00
Konrad Borowski
4a2cb72ce4 Link to Showdown dex in /data 2015-07-11 21:22:51 +02:00
Guangcong Luo
bbc2188a40 Refactor teambuilder to use packed teams
This is a major refactor that changes the teambuilder to store
teams in packed format whenever possible, for approximately 50%
less memory usage for team storage.

The only visible change here is that pokemon nicknames have been
replaced with pokemon icons in the teambuilder team list, to
match the team selector in the main menu, which simplifies
extracting information from packed teams.
2015-06-30 02:16:55 -05:00
Guangcong Luo
1eea2b3f45 Prevent 'Find a user' from finding Zarel
It has been deemed to cause too much spam for Zarel :(
2015-06-28 00:50:17 -04:00
Guangcong Luo
50c8273d03 Support /error in PMs
It's like /text, except the text is red.
2015-06-28 00:50:17 -04:00
Guangcong Luo
ec43507738 New 'Find a user' button in Main Menu
Should make it easier for players arranging battles outside of PS
to challenge each other.
2015-06-25 20:14:00 -04:00
Guangcong Luo
fa6f20d352 Watch Battle window: Move Close button to top right 2015-06-25 19:07:46 -04:00
Guangcong Luo
9a9c7010de Open semimodal popups next to opener
Before, only nonmodal popups would appear next to the button that
opens them. Now, semimodal popups do as well. This should make certain
operations faster and more intuitive.

Watch Battle is now modal instead of semimodal, because it doesn't
work well in this kind of presentation.
2015-06-25 19:05:09 -04:00
Guangcong Luo
5803513cb6 Default 'PMs in chat rooms' to false
This feature is a holdover from the old days before we had PM boxes.
I'm pretty sure most people don't like it.
2015-06-15 18:07:25 -04:00
Guangcong Luo
3ab229fa1a Revert "Make sure Staff and Upper Staff are first"
Now that autojoin saves the position of Staff and Upper Staff, this
is no longer necessary.

This reverts commit e5b3326703.
2015-06-12 14:27:47 -04:00
Guangcong Luo
e5b3326703 Make sure Staff and Upper Staff are first
This is a dumb hack to make sure that Staff and Upper Staff are to
the left of any autojoined rooms. They're excluded from autojoin, so
without this, they would be all the way on the right.
2015-06-11 18:40:11 -04:00
Guangcong Luo
0d9d56a98a Remove unused code 2015-06-07 23:43:53 -04:00
Ivo Julca
f7a37a3537 Improve support for searching battles in multiple formats
- `|updatesearch|{searching}` now allows an array of formats as a `searching` value.
- Old gen sprite data will be loaded based on the data sent by the server rather than the current DOM state
2015-06-05 13:28:54 -05:00