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)
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
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?
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
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
- 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
- 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?
.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?