From: Claire Date: Fri, 7 May 2021 16:21:59 +0000 (+0200) Subject: Merge branch 'main' into glitch-soc/merge-upstream X-Git-Url: https://git.xn--scling-oua.cat.family/?a=commitdiff_plain;h=50b430d9a2857edf8ab44e9b94c7bcb14ecd2117;p=mastodon.git Merge branch 'main' into glitch-soc/merge-upstream - `app/views/statuses/_simple_status.html.haml`: Small markup change in glitch-soc, on a line that has been modified by upstream. Ported upstream changes. --- 50b430d9a2857edf8ab44e9b94c7bcb14ecd2117 diff --cc Gemfile.lock index a43a2c1fe,8cd4a97f1..6a3c990fc --- a/Gemfile.lock +++ b/Gemfile.lock @@@ -772,9 -762,9 +763,10 @@@ DEPENDENCIE rails-i18n (~> 6.0) rails-settings-cached (~> 0.6) rdf-normalize (~> 0.4) + redcarpet (~> 3.5) redis (~> 4.2) redis-namespace (~> 1.8) + resolv (~> 0.1.0) rqrcode (~> 1.2) rspec-rails (~> 5.0) rspec-sidekiq (~> 3.1) diff --cc app/controllers/auth/confirmations_controller.rb index 4e89446c7,1475bbcef..0b5a2f3c9 --- a/app/controllers/auth/confirmations_controller.rb +++ b/app/controllers/auth/confirmations_controller.rb @@@ -17,12 -16,10 +17,14 @@@ class Auth::ConfirmationsController < D private + def set_pack + use_pack 'auth' + end + def require_unconfirmed! - redirect_to edit_user_registration_path if user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank? + if user_signed_in? && current_user.confirmed? && current_user.unconfirmed_email.blank? + redirect_to(current_user.approved? ? root_path : edit_user_registration_path) + end end def set_body_classes diff --cc app/controllers/directories_controller.rb index 549c6a39e,f28c5b2af..2263f286b --- a/app/controllers/directories_controller.rb +++ b/app/controllers/directories_controller.rb @@@ -6,9 -6,7 +6,8 @@@ class DirectoriesController < Applicati before_action :authenticate_user!, if: :whitelist_mode? before_action :require_enabled! before_action :set_instance_presenter - before_action :set_tag, only: :show before_action :set_accounts + before_action :set_pack skip_before_action :require_functional!, unless: :whitelist_mode? @@@ -16,16 -14,8 +15,12 @@@ render :index end - def show - render :index - end - private + def set_pack + use_pack 'share' + end + def require_enabled! return not_found unless Setting.profile_directory end diff --cc app/models/form/admin_settings.rb index 558a906d2,6fc7c56fd..0276ec058 --- a/app/models/form/admin_settings.rb +++ b/app/models/form/admin_settings.rb @@@ -16,10 -16,8 +16,9 @@@ class Form::AdminSetting open_deletion timeline_preview show_staff_badge - enable_bootstrap_timeline_accounts bootstrap_timeline_accounts - theme + flavour + skin min_invite_role activity_api_enabled peers_api_enabled diff --cc app/views/admin/tags/index.html.haml index 72eef18a9,d78f3c6d1..e25b0ae84 --- a/app/views/admin/tags/index.html.haml +++ b/app/views/admin/tags/index.html.haml @@@ -1,13 -1,10 +1,7 @@@ - content_for :page_title do = t('admin.tags.title') -- content_for :header_tags do - = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' - .filters - .filter-subset - %strong= t('admin.tags.context') - %ul - %li= filter_link_to t('generic.all'), directory: nil - %li= filter_link_to t('admin.tags.directory'), directory: '1' - .filter-subset %strong= t('admin.tags.review') %ul diff --cc app/views/media/player.html.haml index 191586248,f00c8f040..c1d630a63 --- a/app/views/media/player.html.haml +++ b/app/views/media/player.html.haml @@@ -1,16 -1,12 +1,19 @@@ - content_for :header_tags do = render_initial_state - = javascript_pack_tag 'public', crossorigin: 'anonymous' + = javascript_pack_tag "locales", crossorigin: 'anonymous' + - if @theme + - if @theme[:supported_locales].include? I18n.locale.to_s + = javascript_pack_tag "locales/#{@theme[:flavour]}/#{I18n.locale}", crossorigin: 'anonymous' + - elsif @theme[:supported_locales].include? 'en' + = javascript_pack_tag "locales/#{@theme[:flavour]}/en", crossorigin: 'anonymous' + = render partial: 'layouts/theme', object: @core + = render partial: 'layouts/theme', object: @theme + :ruby + meta = @media_attachment.file.meta || {} + - if @media_attachment.video? - = react_component :video, src: @media_attachment.file.url(:original), preview: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.file.url(:small), frameRate: @media_attachment.file.meta.dig('original', 'frame_rate'), blurhash: @media_attachment.blurhash, width: 670, height: 380, editable: true, detailed: true, inline: true, alt: @media_attachment.description, media: [ActiveModelSerializers::SerializableResource.new(@media_attachment, serializer: REST::MediaAttachmentSerializer)].as_json do + = react_component :video, src: @media_attachment.file.url(:original), preview: @media_attachment.thumbnail.present? ? @media_attachment.thumbnail.url : @media_attachment.file.url(:small), frameRate: meta.dig('original', 'frame_rate'), blurhash: @media_attachment.blurhash, width: 670, height: 380, editable: true, detailed: true, inline: true, alt: @media_attachment.description, media: [ActiveModelSerializers::SerializableResource.new(@media_attachment, serializer: REST::MediaAttachmentSerializer)].as_json do %video{ controls: 'controls' } %source{ src: @media_attachment.file.url(:original) } - elsif @media_attachment.gifv? diff --cc app/views/statuses/_simple_status.html.haml index ab163245d,728e6b9b0..a7c78b997 --- a/app/views/statuses/_simple_status.html.haml +++ b/app/views/statuses/_simple_status.html.haml @@@ -27,13 -27,12 +27,12 @@@ .status__content.emojify{ :data => ({ spoiler: current_account&.user&.setting_expand_spoilers ? 'expanded' : 'folded' } if status.spoiler_text?) }< - if status.spoiler_text? %p< - %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: autoplay)}  + %span.p-summary> #{Formatter.instance.format_spoiler(status, autoplay: prefers_autoplay?)}  %button.status__content__spoiler-link= t('statuses.show_more') - .e-content + .e-content< - = Formatter.instance.format(status, custom_emojify: true, autoplay: autoplay) + = Formatter.instance.format(status, custom_emojify: true, autoplay: prefers_autoplay?) - if status.preloadable_poll - = react_component :poll, disabled: true, poll: ActiveModelSerializers::SerializableResource.new(status.preloadable_poll, serializer: REST::PollSerializer, scope: current_user, scope_name: :current_user).as_json do - = render partial: 'statuses/poll', locals: { status: status, poll: status.preloadable_poll, autoplay: autoplay } + = render_poll_component(status) - if !status.media_attachments.empty? - if status.media_attachments.first.video?