Commit graph

8 commits

Author SHA1 Message Date
Alexis Reigel
d2256300e5
hint the allowed image formats on favicon upload 2018-06-06 11:28:13 +02:00
Alexis Reigel
197932a222
allow only png, ico for favicon uploads
the related omnibus graphicsmagick package only supports those formats.

see https://gitlab.com/gitlab-org/omnibus-gitlab/merge_requests/1975
2018-06-05 16:20:24 +02:00
Alexis Reigel
9e14f437b6
create favicon overlay on the client
the initial reason for this change was that graphicsmagick does not
support writing to ico files. this fact lead to a chain of changes:

1. use png instead of ico (browser support is good enough)
2. render the overlays on the client using the canvas API. this way we
   only need to store the original favion and generate the overlay versions
   dynamically.
   this change also enables (next step) to simplify the handling of the
   stock favicons as well, as we don't need to generate all the versions
   upfront.
2018-06-05 16:20:21 +02:00
Alexis Reigel
67fe0a17d8
call Gitlab::Favicon.status in serializer
this ways we can keep the `lib/gitlab/ci/status/*` classes to return the
bare favicon name as it was before.

also the favicon uploader versions are now have the same names as the
stock favicons (+ `favicon_` prefix), which makes working with the
status names easier.
2018-06-05 16:20:21 +02:00
Alexis Reigel
85a8e6f26a
whitelist allowed file types for custom favicons 2018-06-05 16:20:20 +02:00
Alexis Reigel
606b23dd39
sort status icon names by name 2018-06-05 16:20:19 +02:00
Alexis Reigel
18d4f121d3
fix carrierwave suffix for different format
when versions have a different file format from the original file
carrierwave constructs a wrong url (with the original file suffix).
2018-06-05 16:20:18 +02:00
Alexis Reigel
c8a4d202c9
favicon uploader generating ci status favicons 2018-06-05 16:20:06 +02:00