docbrown/app/views/admin
Nick Taylor 3f2569b938
Forem Creation: Logo Upload & Resizing (#15499)
* wip - Got logo upload working

* Now have the logo rendering in the header and in the admin image config section.

* Small layout tweak for admin -> config -> images -> logo.

* feat: create a logo uploader with some tests

* feat: use the logoUploader instead of the ArticleImageUploader

* feat: return early because svg's do not contain exif or gps data

* chore: we can move the raise outside the transaction as the rest of the transaction won't execute if we raise an error

* feat: add a size range

* WIP: resize an image to a random number for now

* hid the logo behind a feature flag and kept logo_svg as is in the site header.

* Added the jpe file type to the logo uploader.

* Skipped the resizing of an image if it's an SVG in the logo uploader.

* Added content types to the content type logo uploader allow list.

* Synced logo validation with frontend and backend.

* Removed unnecessary ALLOWED_PARAMS elements.

* feat: update the logo upoader and tests

* chore: remove comments

* chore: remove comments

* feat: update the resizing for the images + add the correct content type

* spec: test the versions

* fix: update the Constant

* feat: add the versions of the logo

* feat: populate the settings correctly and consistently

* feat: add an random string to the file name to avoid caching issues

* feat: amend the logo layout

* chore: remove comments

* spec: update

* feat: image type whitelist

* feat: update the logo css and  also just use resized_logo and remove mobile resize

* feat: add a max-height

* only add site-logo if the feature flag is off

* Renamed IMAGE_TYPE_WHITELIST to IMAGE_TYPE_ALLOWLIST

* Update app/controllers/admin/creator_settings_controller.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update app/uploaders/logo_uploader.rb

Co-authored-by: Michael Kohl <citizen428@forem.com>

* Update spec/uploaders/logo_uploader_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* Update spec/uploaders/logo_uploader_spec.rb

Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>

* chore: revert admin change

* refactor: use a static value for directory

* feat: freeze constants

* feat: remove the logo requirement

* chore: spacing

* remove logo requirement

Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
Co-authored-by: Michael Kohl <citizen428@forem.com>
Co-authored-by: Julianna Tetreault <32834804+juliannatetreault@users.noreply.github.com>
2021-12-02 09:49:09 +02:00
..
articles Fix: cannot unpin articles using checkbox (#15090) 2021-11-02 13:50:56 -04:00
badge_achievements Heavy Confirmation Flow for Broadcast-Destroy (#14819) 2021-09-29 07:43:00 -04:00
badges Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
broadcasts Heavy Confirmation Flow for Broadcast-Destroy (#14819) 2021-09-29 07:43:00 -04:00
comments Add loading=lazy to image tags (#10888) 2021-05-27 19:01:21 +02:00
consumer_apps Make Consumer Apps dictate aasa results (#14015) 2021-06-24 08:36:11 -06:00
creator_settings Forem Creation: Logo Upload & Resizing (#15499) 2021-12-02 09:49:09 +02:00
data_update_scripts Admin DataUpdateScripts: fix Re-run button label (#13825) 2021-05-21 17:35:09 +02:00
display_ads Upgrade Stimulus to 3.0 (#14869) 2021-10-05 20:00:37 +02:00
email_messages Look for <html> tags instead of <body> for other emails (#14547) 2021-08-19 16:53:45 -04:00
feedback_messages Look for <html> tags instead of <body> for other emails (#14547) 2021-08-19 16:53:45 -04:00
html_variants Titles & subtitles cleanup (#10508) 2020-10-02 12:37:39 +02:00
invitations Only enable user invitations page when SMTP is enabled (#15219) 2021-10-29 17:41:30 +02:00
listing_categories RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
listings [15-min-fix] Add org id to admin listings form (#14162) 2021-07-08 09:23:10 -04:00
moderator_actions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
mods Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
navigation_links Escape the backslash in the string (#15232) 2021-11-01 08:59:20 -05:00
organizations Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
overview [15-min fix] Small tweaks for small screen usage in Admin (#14341) 2021-08-04 12:21:57 -06:00
pages Only tech admins can manage page feature flags (#14618) 2021-08-31 15:35:42 -04:00
permissions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
podcasts Fix and clean up podcast pages (#15004) 2021-10-15 17:38:57 -04:00
privileged_reactions Override specified line break behaviour on the ID column (#12076) 2021-01-04 16:17:38 -05:00
profile_fields improve keyboard accessibility of modals 12427 10610 (#12511) 2021-02-24 16:01:10 +00:00
response_templates RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
secrets RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
settings Enable Forem (Passport) Auth (#15141) 2021-11-23 14:59:00 -06:00
shared Heavy Confirmation Flow for Broadcast-Destroy (#14819) 2021-09-29 07:43:00 -04:00
sponsorships RFC#50-P5 Prepares the admin restructure to be tested (#13114) 2021-04-15 14:53:46 +02:00
tags Update tag's style (#15266) 2021-11-11 14:03:31 -05:00
tools [deploy] Add a simple image uploader partial (#10884) 2020-10-21 16:41:50 +02:00
users Replacing User#warned with User#warned? (#15628) 2021-12-01 13:14:16 -05:00
webhook_endpoints [deploy] Adding Crayons to Admin (#10015) 2020-08-31 10:29:06 -04:00
welcome Titles & subtitles cleanup (#10508) 2020-10-02 12:37:39 +02:00