Commit Graph

1811 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
c00e4088d7 Teambuilder: Support dragging teams onto folders
This was ridiculous, or, in other words, par for the course when
you're dealing with HTML5 drag-and-drop.

Folders are now clickable divs instead of buttons. This turned out
not to be necessary as it was a different issue that was causing
drag-and-drop to fail, but I'd already changed everything over when
I discovered the real bug. Oh well, some things are slightly nicer
this way.
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
a8c3b54006 Tweak some button appearances 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
04246a51fb Redesign teambuilder folders
This didn't come out looking nearly as perfect as I hoped, but
honestly it looks pretty good and I don't know how to make it
better.
2015-12-15 20:01:05 -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
3a41c51c37 Basic teambuilder 'folders'
The folders are really just format filter views, but in theory, this
should be all people need.

This implementation is very basic but I'm pretty sure I've gotten all
the bugs out. On small screens, the folders simply don't appear, on
the assumption that this will only happen on mobile, where people
shouldn't be creating enough teams to need folders, anyway. (I'll
fully support mobile later.)

Third-party servers may need to re-style the Edit and Delete buttons,
since they're black on transparent, which may interact poorly with
certain edgy background styles.
2015-12-15 17:34:53 -05:00
Ivo Julca
0309413762 Fix crashing Resume button showing in rejoined battles 2015-12-15 09:40:35 -05:00
Guangcong Luo
3b87789736 Fix style error in replay-embed.js 2015-12-15 07:39:04 -05:00
Guangcong Luo
cecc1b641e Center custom backgrounds
Default backgrounds are still left-aligned, mainly for Horizon and
Waterfall which are designed for their left side to be visible, but
custom backgrounds are now centered on the assumption that that's
what most users want.
2015-12-15 05:49:44 -05:00
Guangcong Luo
525f422d11 Fix sound settings not appearing in replays
Sound Manager really doesn't make it easy to do something when it
loads, so this is a kind-of-complicated workaround.
2015-12-15 05:49:44 -05:00
Marty-D
c401d8303a Fix Struggle's display with -ate Abilities 2015-12-14 10:23:10 -05:00
Guangcong Luo
b9c92bae92 Wrap localStorage calls in try blocks 2015-12-13 13:29:00 -05:00
Guangcong Luo
db416b7d52 Make the random background button bigger
(Some people didn't notice the previous one.)
2015-12-13 13:28:46 -05:00
Guangcong Luo
c33cfdfece Rewrite protocol-relative images to http: if necessary
This makes protocol-relative images in sanitized HTML work in
testclient, by manually setting the protocol to http:
2015-12-13 13:27:04 -05:00
Guangcong Luo
43b77c069c Improve main menu colors for default backgrounds 2015-12-12 23:08:11 -05:00
Guangcong Luo
a038fc9631 Fix 'Default' background button for alt servers 2015-12-12 23:06:58 -05:00
Guangcong Luo
c4899e2673 Fix background image upload too big feedback
It used to be inconsistent about whether or not the custom background
setting succeeded.
2015-12-12 23:06:33 -05:00
Guangcong Luo
53d9a2853d Make the avatar's clickable area in Options clearer 2015-12-12 23:05:48 -05:00
Guangcong Luo
d0ffc16089 Prevent Opt+Cmd+I from italicizing text 2015-12-12 23:05:10 -05:00
Guangcong Luo
62e0723724 Fix style 2015-12-12 12:22:20 -05:00
Guangcong Luo
0e55e7fab2 Add back Solid Blue background option 2015-12-12 05:23:59 -05:00
Guangcong Luo
d429ea3797 New background popup
This replaces the old background dropdown with a background popup
that does everything the old one does, but fancier.
2015-12-12 04:04:10 -06: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
acdd253081 Fix style issue 2015-12-11 05:06:44 -05:00
Guangcong Luo
40e88616dc Add Storage.createReplayFileHref
This splits out createReplayFile to focus on the file contents,
which could then be output elsewhere, such as for instance the
desktop client.
2015-12-11 03:10:04 -05:00
Guangcong Luo
ea077721a8 Add back Upload Replay button 2015-12-11 03:10:04 -05:00
The Immortal
bae1b84fb0 Teambuilder: Update VGC 2015-12-10 03:56:29 +04:00
Guangcong Luo
9ca60829d9 Fix Sleep Talk message 2015-12-07 05:00:10 -05:00
Guangcong Luo
06a403d148 Merge pull request #546 from augmt/tighten-dnd
Tighten up drag and drop code
2015-12-07 08:34:33 +00: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
Guangcong Luo
6dfc0bdabf Fix various bugs found by eslint 2015-12-07 03:20:30 -05:00
Guangcong Luo
cea3623dac Downloadable replays!
Replays can now be downloaded into .html files.

The .html files mainly contain replay log data; the actual replay
player is downloaded online. Also included is a textual log and
some minimal CSS to make it look pretty, for offline viewing.

This strategy helps keep the replay file reasonably small; of
the 30 KB or so for a 50-turn battle, around 10 KB is the log
data, and around 20 KB is the textual log.
2015-12-07 03:19:46 -05:00
Guangcong Luo
a3968af8e6 Fix bug with newer Sturdy activations 2015-12-07 02:52:46 -05:00
Marty-D
fe2aa5ede5 Mark moves used by Sleep Talk 2015-12-06 19:01:51 -05:00
Quite Quiet
bb28b0cac4 Add electrify tag 2015-12-05 15:16:01 +01:00
Guangcong Luo
d0f0949e63 Fix code style 2015-12-05 02:07:17 -05:00
Guangcong Luo
d66e7a43b1 Improve battle animations
- Ability activations are now handled consistently
- Ability activations now look different, the ability name appears
  under other result anims and doesn't move
- Replace animDelay with the same animationDelay system we use for
  everything else in the engine
- Group multiple stat boosts/drops
- Group damage when possible in spread moves in doubles/triples
2015-12-05 01:39:50 -05:00
Ivo Julca
d694099484 Implement basic linting 2015-12-03 03:36:01 -05:00
Ivo Julca
96b4d3a6b0 Fix trainer sprite parsing in battles 2015-12-03 02:39:26 -05:00
Guangcong Luo
89a736ecf8 Ignore |N| and |n| in battles
This brings battles more inline with chatrooms, in preparation for more
code-sharing server-side
2015-12-03 02:39:41 -05:00
Ivo Julca
8bb6f48223 Fix several global variable leaks 2015-12-03 02:26:29 -05:00
Ivo Julca
1d514bc6ec Miscellaneous style fixes for better alignment to server code style 2015-12-03 02:25:57 -05:00
Ivo Julca
adc57f5467 Move generation inference from utilichart to battledata 2015-12-03 01:01:27 -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
26d4adcac2 Support new |disconnect| message 2015-12-01 15:25:21 -05:00
Guangcong Luo
3cac636298 Drop symbols from end of name when tab completing
Now that the symbols at the end aren't necessary for highlighting,
dropping them from tab completion should make talking to people with
emoticons at the end of their name less annoying.
2015-12-01 15:25:21 -05:00