diff --git a/.env.nanobox b/.env.nanobox index 8e0af6a8a8a..b60b6ee6897 100644 --- a/.env.nanobox +++ b/.env.nanobox @@ -136,8 +136,8 @@ SMTP_FROM_ADDRESS=notifications@${APP_NAME}.nanoapp.io # Defaults to 60 seconds. Set to 0 to disable # SWIFT_CACHE_TTL= -# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front -# S3_CLOUDFRONT_HOST= +# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare) +# S3_ALIAS_HOST= # Streaming API integration # STREAMING_API_BASE_URL= diff --git a/.env.production.sample b/.env.production.sample index 235b192078e..efb5661fdd3 100644 --- a/.env.production.sample +++ b/.env.production.sample @@ -134,8 +134,8 @@ SMTP_FROM_ADDRESS=notifications@example.com # Defaults to 60 seconds. Set to 0 to disable # SWIFT_CACHE_TTL= -# Optional alias for S3 if you want to use Cloudfront or Cloudflare in front -# S3_CLOUDFRONT_HOST= +# Optional alias for S3 (e.g. to serve files on a custom domain, possibly using Cloudfront or Cloudflare) +# S3_ALIAS_HOST= # Streaming API integration # STREAMING_API_BASE_URL= diff --git a/Gemfile b/Gemfile index 760ecbc7c53..e781da8aeb4 100644 --- a/Gemfile +++ b/Gemfile @@ -41,7 +41,7 @@ gem 'omniauth-cas', '~> 1.1' gem 'omniauth-saml', '~> 1.10' gem 'omniauth', '~> 1.2' -gem 'doorkeeper', '~> 4.4' +gem 'doorkeeper', '~> 5.0' gem 'fast_blank', '~> 1.0' gem 'fastimage' gem 'goldfinger', '~> 2.1' diff --git a/Gemfile.lock b/Gemfile.lock index 4c03ffc5ef8..6d48bf83fdc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -174,14 +174,14 @@ GEM devise (~> 4.0) railties (< 5.3) rotp (~> 2.0) - devise_pam_authenticatable2 (9.1.0) + devise_pam_authenticatable2 (9.1.1) devise (>= 4.0.0) rpam2 (~> 4.0) diff-lcs (1.3) docile (1.3.0) domain_name (0.5.20180417) unf (>= 0.0.5, < 1.0.0) - doorkeeper (4.4.2) + doorkeeper (5.0.0) railties (>= 4.2) dotenv (2.2.2) dotenv-rails (2.2.2) @@ -672,7 +672,7 @@ DEPENDENCIES devise (~> 4.4) devise-two-factor (~> 3.0) devise_pam_authenticatable2 (~> 9.1) - doorkeeper (~> 4.4) + doorkeeper (~> 5.0) dotenv-rails (~> 2.2, < 2.3) fabrication (~> 2.20) faker (~> 1.8) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 327901e4e2d..cf6f8aa70cc 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -27,11 +27,6 @@ module ApplicationHelper Setting.open_deletion end - def add_rtl_body_class(other_classes) - other_classes = "#{other_classes} rtl" if locale_direction == 'rtl' - other_classes - end - def locale_direction if [:ar, :fa, :he].include?(I18n.locale) 'rtl' @@ -77,4 +72,14 @@ module ApplicationHelper def react_component(name, props = {}) content_tag(:div, nil, data: { component: name.to_s.camelcase, props: Oj.dump(props) }) end + + def body_classes + output = (@body_classes || '').split(' ') + output << "flavour-#{current_flavour.parameterize}" + output << "skin-#{current_skin.parameterize}" + output << 'system-font' if current_account&.user&.setting_system_font_ui + output << current_account&.user&.setting_reduce_motion ? 'reduce-motion' : 'no-reduce-motion' + output << 'rtl' if locale_direction == 'rtl' + output.reject(&:blank?).join(' ') + end end diff --git a/app/javascript/core/admin.js b/app/javascript/core/admin.js index 28f27fbc620..0c26dc18db8 100644 --- a/app/javascript/core/admin.js +++ b/app/javascript/core/admin.js @@ -41,3 +41,10 @@ delegate(document, '.media-spoiler-hide-button', 'click', () => { element.click(); }); }); + +delegate(document, '#domain_block_severity', 'change', ({ target }) => { + const rejectMediaDiv = document.querySelector('.input.with_label.domain_block_reject_media'); + if (rejectMediaDiv) { + rejectMediaDiv.style.display = (target.value === 'suspend') ? 'none' : 'block'; + } +}); diff --git a/app/javascript/mastodon/components/extended_video_player.js b/app/javascript/mastodon/components/extended_video_player.js index 9e2f6835a8b..009c0d559ad 100644 --- a/app/javascript/mastodon/components/extended_video_player.js +++ b/app/javascript/mastodon/components/extended_video_player.js @@ -50,6 +50,7 @@ export default class ExtendedVideoPlayer extends React.PureComponent { role='button' tabIndex='0' aria-label={alt} + title={alt} muted={muted} controls={controls} loop={!controls} diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 63bc4a59b48..6e1310cd65c 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -154,6 +154,7 @@ class Item extends React.PureComponent {