diff --git a/app/controllers/auth/omniauth_callbacks_controller.rb b/app/controllers/auth/omniauth_callbacks_controller.rb index f9cf6d655..3d7962de5 100644 --- a/app/controllers/auth/omniauth_callbacks_controller.rb +++ b/app/controllers/auth/omniauth_callbacks_controller.rb @@ -18,7 +18,8 @@ class Auth::OmniauthCallbacksController < Devise::OmniauthCallbacksController ) sign_in_and_redirect @user, event: :authentication - set_flash_message(:notice, :success, kind: Devise.omniauth_configs[provider].strategy.display_name.capitalize) if is_navigational_format? + label = Devise.omniauth_configs[provider]&.strategy&.display_name.presence || I18n.t("auth.providers.#{provider}", default: provider.to_s.chomp('_oauth2').capitalize) + set_flash_message(:notice, :success, kind: label) if is_navigational_format? else session["devise.#{provider}_data"] = request.env['omniauth.auth'] redirect_to new_user_registration_url diff --git a/app/javascript/mastodon/components/status_content.js b/app/javascript/mastodon/components/status_content.js index 3e3ba7d0f..139e8ed16 100644 --- a/app/javascript/mastodon/components/status_content.js +++ b/app/javascript/mastodon/components/status_content.js @@ -258,7 +258,7 @@ class StatusContent extends React.PureComponent { {mentionsPlaceholder} diff --git a/app/javascript/mastodon/features/ui/components/focal_point_modal.js b/app/javascript/mastodon/features/ui/components/focal_point_modal.js index a2e6b3d16..ba8aa8f03 100644 --- a/app/javascript/mastodon/features/ui/components/focal_point_modal.js +++ b/app/javascript/mastodon/features/ui/components/focal_point_modal.js @@ -176,14 +176,14 @@ class FocalPointModal extends ImmutablePureComponent { handleKeyDown = (e) => { if (e.keyCode === 13 && (e.ctrlKey || e.metaKey)) { - e.preventDefault(); - e.stopPropagation(); this.props.onChangeDescription(e.target.value); - this.handleSubmit(); + this.handleSubmit(e); } } - handleSubmit = () => { + handleSubmit = (e) => { + e.preventDefault(); + e.stopPropagation(); this.props.onSave(this.props.description, this.props.focusX, this.props.focusY); } @@ -313,7 +313,7 @@ class FocalPointModal extends ImmutablePureComponent {
-
+
{focals &&

} {thumbnailable && ( @@ -361,12 +361,23 @@ class FocalPointModal extends ImmutablePureComponent {
- +
-
+