Commit Graph

2744 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
e2ea9e5267 Tweak teambuilder appearance 2015-12-15 21:51:35 -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
1cbd514343 Set X-Frame-Options header for crossprotocol.html
There apparently exist very bad security software that MitMs HTTPS
connections to set X-Frame-Options when I didn't want that at all
and actually crossprotocol.html is intended for embedding in an
iframe.

Hopefully this header will allow aforementioned software to take
the hint.
2015-12-15 05:49:44 -05:00
Guangcong Luo
d9faf3e7e6 Update crossdomain.php to support main server
This is a job currently done by crossprotocol.html, but this is in
case we add an update for which a static file isn't enough.
2015-12-15 05:49:44 -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
59f0eb7395 Merge pull request #578 from bumbadadabum/images
Run optipng on fx/
2015-12-14 08:44:44 +00:00
Bär Halberkamp
6612e7037f Run optipng on fx/ 2015-12-14 07:20:04 +01:00
Guangcong Luo
10fe888d59 Merge pull request #577 from bumbadadabum/images
Add a missing image for the gallows and run optipng
2015-12-14 06:07:03 +00:00
Bär Halberkamp
622866dbe3 Run optipng on crobat's sprites 2015-12-14 06:58:46 +01:00
Bär Halberkamp
be37e69dab Add the gallows for hangman 2015-12-14 06:46:32 +01: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
1bcc75e750 Use relative URIs in CSS where possible
This replaces the previous protocol-relative URIs, which should allow
testclient to work much better.
2015-12-13 13:25:41 -05:00
Guangcong Luo
ec05062525 Make sure disabled buttons stay light gray 2015-12-12 23:09:43 -05:00
Guangcong Luo
6924cf98d6 Make the main menu footer easier to see
It was kind of hard to make out on certain backgrounds.
2015-12-12 23:09:15 -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
72ff236cef Hardcode logo img dimensions
Very minor optimization to layout performance, but I'll take it.
2015-12-12 23:04:29 -05:00
Guangcong Luo
2e467f2436 Merge pull request #576 from bumbadadabum/images
Add the images for hangman and mafia to the client
2015-12-13 03:55:27 +00:00
Bär Halberkamp
6265c623e7 Add the images for hangman and mafia 2015-12-13 04:40:19 +01: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
159f71c7ac Remove old client background files 2015-12-12 04:05:03 -06: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
c93847fdbe Merge pull request #572 from Ridaz/patch-2
New Close Combat animation
2015-12-09 21:19:52 +00:00
Ridaz
61245f6625 New Close Combat animation
It's used by Superpower too.
2015-12-09 11:46:09 +00: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