Merge tootsuite/master at 3023725936
This commit is contained in:
@@ -55,4 +55,8 @@
|
||||
.container
|
||||
%p
|
||||
= link_to t('about.source_code'), @instance_presenter.source_url
|
||||
= " (#{@instance_presenter.version_number})"
|
||||
- if @instance_presenter.commit_hash == ""
|
||||
%strong= " (#{@instance_presenter.version_number})"
|
||||
- else
|
||||
%strong= "#{@instance_presenter.version_number}, "
|
||||
%strong= "#{@instance_presenter.commit_hash}"
|
||||
|
@@ -47,6 +47,13 @@
|
||||
%p= t('about.closed_registrations')
|
||||
- else
|
||||
= @instance_presenter.closed_registrations_message.html_safe
|
||||
|
||||
= simple_form_for(:user, html: { style: 'margin-left: -20px' }, url: session_path(:user)) do |f|
|
||||
= f.input :email, autofocus: true, placeholder: t('simple_form.labels.defaults.email'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.email') }
|
||||
= f.input :password, placeholder: t('simple_form.labels.defaults.password'), required: true, input_html: { 'aria-label' => t('simple_form.labels.defaults.password'), :autocomplete => 'off' }
|
||||
|
||||
.actions
|
||||
= f.button :button, t('auth.login'), type: :submit
|
||||
= link_to t('about.find_another_instance'), 'https://joinmastodon.org/', class: 'button button-alternative button--block'
|
||||
|
||||
.about-short
|
||||
@@ -68,4 +75,8 @@
|
||||
.container
|
||||
%p
|
||||
= link_to t('about.source_code'), @instance_presenter.source_url
|
||||
= " (#{@instance_presenter.version_number})"
|
||||
- if @instance_presenter.commit_hash == ""
|
||||
%strong= " (#{@instance_presenter.version_number})"
|
||||
- else
|
||||
%strong= " (#{@instance_presenter.version_number}, "
|
||||
%strong= " #{@instance_presenter.commit_hash})"
|
||||
|
@@ -1,3 +1,4 @@
|
||||
- processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format account
|
||||
.card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
|
||||
.card__illustration
|
||||
- unless account.memorial?
|
||||
@@ -31,9 +32,14 @@
|
||||
.roles
|
||||
.account-role
|
||||
= t 'accounts.roles.admin'
|
||||
|
||||
.bio
|
||||
.account__header__content.p-note.emojify= Formatter.instance.simplified_format(account)
|
||||
.account__header__content.p-note.emojify!=processed_bio[:text]
|
||||
- if processed_bio[:metadata].length > 0
|
||||
%table.metadata<
|
||||
- processed_bio[:metadata].each do |i|
|
||||
%tr.metadata-item><
|
||||
%th.emojify>!=i[0]
|
||||
%td.emojify>!=i[1]
|
||||
|
||||
.details-counters
|
||||
.counter{ class: active_nav_class(short_account_url(account)) }
|
||||
|
@@ -6,7 +6,8 @@
|
||||
%meta{name: 'applicationServerKey', content: Rails.configuration.x.vapid_public_key}
|
||||
%script#initial-state{ type: 'application/json' }!= json_escape(@initial_state_json)
|
||||
|
||||
= javascript_pack_tag 'application', integrity: true, crossorigin: 'anonymous'
|
||||
= javascript_pack_tag "themes/#{current_theme}", integrity: true, crossorigin: 'anonymous'
|
||||
= stylesheet_pack_tag "themes/#{current_theme}", integrity: true, media: 'all'
|
||||
|
||||
.app-holder#mastodon{ data: { props: Oj.dump(default_props) } }
|
||||
%noscript
|
||||
|
@@ -19,11 +19,13 @@
|
||||
= title
|
||||
|
||||
= stylesheet_pack_tag 'common', media: 'all'
|
||||
= stylesheet_pack_tag current_theme, media: 'all'
|
||||
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
|
||||
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
|
||||
= csrf_meta_tags
|
||||
|
||||
- if controller_name != 'home'
|
||||
= stylesheet_pack_tag 'application', integrity: true, media: 'all'
|
||||
|
||||
= yield :header_tags
|
||||
|
||||
- body_classes ||= @body_classes || ''
|
||||
|
@@ -5,8 +5,8 @@
|
||||
%meta{ name: 'robots', content: 'noindex' }/
|
||||
|
||||
= stylesheet_pack_tag 'common', media: 'all'
|
||||
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all'
|
||||
= javascript_pack_tag 'common', integrity: true, crossorigin: 'anonymous'
|
||||
= stylesheet_pack_tag 'application', integrity: true, media: 'all'
|
||||
= javascript_pack_tag "locale_#{I18n.locale}", integrity: true, crossorigin: 'anonymous'
|
||||
= javascript_pack_tag 'public', integrity: true, crossorigin: 'anonymous'
|
||||
%body.embed
|
||||
|
@@ -6,7 +6,7 @@
|
||||
%title= safe_join([yield(:page_title), Setting.default_settings['site_title']], ' - ')
|
||||
%meta{ content: 'width=device-width,initial-scale=1', name: 'viewport' }/
|
||||
= stylesheet_pack_tag 'common', media: 'all'
|
||||
= stylesheet_pack_tag Setting.default_settings['theme'], media: 'all'
|
||||
= stylesheet_pack_tag 'application', integrity: true, media: 'all'
|
||||
%body.error
|
||||
.dialog
|
||||
%img{ alt: Setting.default_settings['site_title'], src: '/oops.gif' }/
|
||||
|
11
app/views/settings/keyword_mutes/_fields.html.haml
Normal file
11
app/views/settings/keyword_mutes/_fields.html.haml
Normal file
@@ -0,0 +1,11 @@
|
||||
.fields-group
|
||||
= f.input :keyword
|
||||
= f.check_box :whole_word
|
||||
= f.label :whole_word, t('keyword_mutes.match_whole_word')
|
||||
|
||||
.actions
|
||||
- if f.object.persisted?
|
||||
= f.button :button, t('generic.save_changes'), type: :submit
|
||||
= link_to t('keyword_mutes.remove'), settings_keyword_mute_path(f.object), class: 'negative button', method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
||||
- else
|
||||
= f.button :button, t('keyword_mutes.add_keyword'), type: :submit
|
10
app/views/settings/keyword_mutes/_keyword_mute.html.haml
Normal file
10
app/views/settings/keyword_mutes/_keyword_mute.html.haml
Normal file
@@ -0,0 +1,10 @@
|
||||
%tr
|
||||
%td
|
||||
= keyword_mute.keyword
|
||||
%td
|
||||
- if keyword_mute.whole_word
|
||||
%i.fa.fa-check
|
||||
%td
|
||||
= table_link_to 'edit', t('keyword_mutes.edit'), edit_settings_keyword_mute_path(keyword_mute)
|
||||
%td
|
||||
= table_link_to 'times', t('keyword_mutes.remove'), settings_keyword_mute_path(keyword_mute), method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
6
app/views/settings/keyword_mutes/edit.html.haml
Normal file
6
app/views/settings/keyword_mutes/edit.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= t('keyword_mutes.edit_keyword')
|
||||
|
||||
= simple_form_for @keyword_mute, url: settings_keyword_mute_path(@keyword_mute), as: :keyword_mute do |f|
|
||||
= render 'shared/error_messages', object: @keyword_mute
|
||||
= render 'fields', f: f
|
18
app/views/settings/keyword_mutes/index.html.haml
Normal file
18
app/views/settings/keyword_mutes/index.html.haml
Normal file
@@ -0,0 +1,18 @@
|
||||
- content_for :page_title do
|
||||
= t('settings.keyword_mutes')
|
||||
|
||||
.table-wrapper
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th= t('keyword_mutes.keyword')
|
||||
%th= t('keyword_mutes.match_whole_word')
|
||||
%th
|
||||
%th
|
||||
%tbody
|
||||
= render partial: 'keyword_mute', collection: @keyword_mutes, as: :keyword_mute
|
||||
|
||||
= paginate @keyword_mutes
|
||||
.simple_form
|
||||
= link_to t('keyword_mutes.add_keyword'), new_settings_keyword_mute_path, class: 'button'
|
||||
= link_to t('keyword_mutes.remove_all'), destroy_all_settings_keyword_mutes_path, class: 'button negative', method: :delete, data: { confirm: t('admin.accounts.are_you_sure') }
|
6
app/views/settings/keyword_mutes/new.html.haml
Normal file
6
app/views/settings/keyword_mutes/new.html.haml
Normal file
@@ -0,0 +1,6 @@
|
||||
- content_for :page_title do
|
||||
= t('keyword_mutes.add_keyword')
|
||||
|
||||
= simple_form_for @keyword_mute, url: settings_keyword_mutes_path, as: :keyword_mute do |f|
|
||||
= render 'shared/error_messages', object: @keyword_mute
|
||||
= render 'fields', f: f
|
@@ -6,7 +6,7 @@
|
||||
|
||||
.fields-group
|
||||
= f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name'), hint: t('simple_form.hints.defaults.display_name', count: 30 - @account.display_name.size).html_safe
|
||||
= f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: 160 - @account.note.size).html_safe
|
||||
= f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: 500 - @account.note.size).html_safe
|
||||
|
||||
.card.compact{ style: "background-image: url(#{@account.header.url(:original)})", data: { original_src: @account.header.url(:original) } }
|
||||
.avatar= image_tag @account.avatar.url(:original), data: { original_src: @account.avatar.url(:original) }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.media-spoiler-wrapper{ class: sensitive == false && 'media-spoiler-wrapper__visible' }
|
||||
.media-spoiler-wrapper{ class: sensitive == false && 'media-spoiler-wrapper__visible' }><
|
||||
.spoiler-button
|
||||
.icon-button.overlayed
|
||||
%i.fa.fa-fw.fa-eye
|
||||
|
@@ -17,16 +17,16 @@
|
||||
%p{ style: 'margin-bottom: 0' }<
|
||||
%span.p-summary> #{Formatter.instance.format_spoiler(status)}
|
||||
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
|
||||
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true)
|
||||
|
||||
- if !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380) }}
|
||||
- else
|
||||
%div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
|
||||
- elsif status.preview_cards.first
|
||||
%div{ data: { component: 'Card', props: Oj.dump('maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json) }}
|
||||
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }<
|
||||
= Formatter.instance.format(status, custom_emojify: true)
|
||||
- if !status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380) }}<
|
||||
- else
|
||||
%div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive?, standalone: true, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, 'reduceMotion': current_account&.user&.setting_reduce_motion, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}<
|
||||
- elsif status.preview_cards.first
|
||||
%div{ data: { component: 'Card', props: Oj.dump('maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json) }}<
|
||||
|
||||
.detailed-status__meta
|
||||
%data.dt-published{ value: status.created_at.to_time.iso8601 }
|
||||
|
@@ -1,4 +1,4 @@
|
||||
.media-item
|
||||
.media-item><
|
||||
= link_to media.remote_url.blank? ? media.file.url(:original) : media.remote_url, style: media.image? ? "background-image: url(#{media.file.url(:original)})" : '', target: '_blank', rel: 'noopener', class: "u-#{media.video? || media.gifv? ? 'video' : 'photo'}" do
|
||||
- unless media.image?
|
||||
%video{ src: media.file.url(:original), autoplay: true, loop: true }/
|
||||
|
@@ -18,11 +18,12 @@
|
||||
%p{ style: 'margin-bottom: 0' }<
|
||||
%span.p-summary> #{Formatter.instance.format_spoiler(status)}
|
||||
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
|
||||
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true)
|
||||
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }<
|
||||
= Formatter.instance.format(status, custom_emojify: true)
|
||||
|
||||
- unless status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 610, height: 343) }}
|
||||
- else
|
||||
%div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, sensitive: status.sensitive?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
|
||||
- unless status.media_attachments.empty?
|
||||
- if status.media_attachments.first.video?
|
||||
- video = status.media_attachments.first
|
||||
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 610, height: 343) }}><
|
||||
- else
|
||||
%div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, sensitive: status.sensitive?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}><
|
||||
|
Reference in New Issue
Block a user