Merge branch 'master' into glitch-soc/tentative-merge

Conflicts:
	README.md
	app/controllers/statuses_controller.rb
	app/lib/feed_manager.rb
	config/navigation.rb
	spec/lib/feed_manager_spec.rb

Conflicts were resolved by taking both versions for each change.
This means the two filter systems (glitch-soc's keyword mutes and tootsuite's
custom filters) are in place, which will be changed in a follow-up commit.
This commit is contained in:
Thibaut Girka
2018-07-09 07:05:29 +02:00
3127 changed files with 7554 additions and 3945 deletions

View File

@ -2,6 +2,9 @@
= t('admin.settings.title')
= simple_form_for @admin_settings, url: admin_settings_path, html: { method: :patch } do |f|
.actions.actions--top
= f.button :button, t('generic.save_changes'), type: :submit
.fields-group
= f.input :site_title, placeholder: t('admin.settings.site_title')
= f.input :site_description, wrapper: :with_block_label, as: :text, label: t('admin.settings.site_description.title'), hint: t('admin.settings.site_description.desc_html'), input_html: { rows: 8 }
@ -58,5 +61,8 @@
.fields-group
= f.input :peers_api_enabled, as: :boolean, wrapper: :with_label, label: t('admin.settings.peers_api_enabled.title'), hint: t('admin.settings.peers_api_enabled.desc_html')
.fields-group
= f.input :preview_sensitive_media, as: :boolean, wrapper: :with_label, label: t('admin.settings.preview_sensitive_media.title'), hint: t('admin.settings.preview_sensitive_media.desc_html')
.actions
= f.button :button, t('generic.save_changes'), type: :submit

View File

@ -0,0 +1,14 @@
.fields-group
= f.input :phrase, as: :string, wrapper: :with_block_label
.fields-group
= f.input :context, wrapper: :with_block_label, collection: CustomFilter::VALID_CONTEXTS, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label_method: lambda { |context| I18n.t("filters.contexts.#{context}") }, include_blank: false
.fields-group
= f.input :irreversible, wrapper: :with_label
.fields-group
= f.input :whole_word, wrapper: :with_label
.fields-group
= f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt')

View File

@ -0,0 +1,8 @@
- content_for :page_title do
= t('filters.edit.title')
= simple_form_for @filter, url: filter_path(@filter), method: :put do |f|
= render 'fields', f: f
.actions
= f.button :button, t('generic.save_changes'), type: :submit

View File

@ -0,0 +1,20 @@
- content_for :page_title do
= t('filters.index.title')
.table-wrapper
%table.table
%thead
%tr
%th= t('simple_form.labels.defaults.phrase')
%th= t('simple_form.labels.defaults.context')
%th
%tbody
- @filters.each do |filter|
%tr
%td= filter.phrase
%td= filter.context.map { |context| I18n.t("filters.contexts.#{context}") }.join(', ')
%td
= table_link_to 'pencil', t('filters.edit.title'), edit_filter_path(filter)
= table_link_to 'times', t('filters.index.delete'), filter_path(filter), method: :delete
= link_to t('filters.new.title'), new_filter_path, class: 'button'

View File

@ -0,0 +1,8 @@
- content_for :page_title do
= t('filters.new.title')
= simple_form_for @filter, url: filters_path do |f|
= render 'fields', f: f
.actions
= f.button :button, t('filters.new.title'), type: :submit

View File

@ -1,3 +1,7 @@
- content_for :header_tags do
- if @account.user&.setting_noindex
%meta{ name: 'robots', content: 'noindex' }/
.form-container
.follow-prompt
%h2= t('remote_follow.prompt')
@ -11,3 +15,5 @@
.actions
= f.button :button, t('remote_follow.proceed'), type: :submit
%p.hint.subtle-hint= t('remote_follow.no_account_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')

View File

@ -8,14 +8,9 @@
%p.hint= t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: Doorkeeper.configuration.native_redirect_uri)
.field-group
= f.input :scopes,
label: t('activerecord.attributes.doorkeeper/application.scopes'),
collection: Doorkeeper.configuration.scopes,
wrapper: :with_label,
include_blank: false,
label_method: lambda { |scope| safe_join([scope, content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) },
selected: f.object.scopes.all,
required: false,
as: :check_boxes,
collection_wrapper_tag: 'ul',
item_wrapper_tag: 'li'
.input.with_block_label
%label= t('activerecord.attributes.doorkeeper/application.scopes')
%span.hint= t('simple_form.hints.defaults.scopes')
- Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |k, v|
= f.input :scopes, label: false, hint: false, collection: v.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |scope| safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li'

View File

@ -3,6 +3,4 @@
%div
= t('landing_strip_html', name: content_tag(:span, display_name(account, custom_emojify: true), class: :emojify), link_to_root_path: link_to(content_tag(:strong, site_hostname), root_path))
- if open_registrations?
= t('landing_strip_signup_html', sign_up_path: new_user_registration_path)
= t('landing_strip_signup_html', sign_up_path: open_registrations? ? new_user_registration_path : 'https://joinmastodon.org/#getting-started')

View File

@ -7,12 +7,12 @@
%strong.p-name.emojify= display_name(status.account, custom_emojify: true)
%span= acct(status.account)
- if embedded_view?
= link_to "web+mastodon://follow?uri=#{status.account.local_username_and_domain}", class: 'button button-secondary logo-button', target: '_new' do
- if !user_signed_in? || embedded_view?
= link_to account_remote_follow_path(status.account), class: 'button button-secondary logo-button', target: '_new' do
= render file: Rails.root.join('app', 'javascript', 'images', 'logo.svg')
= t('accounts.follow')
.status__content.p-name.emojify<
.status__content.emojify<
- if status.spoiler_text?
%p{ style: 'margin-bottom: 0' }<
%span.p-summary> #{Formatter.instance.format_spoiler(status)}&nbsp;

View File

@ -1,4 +1,4 @@
- if activity.is_a?(Status) && activity.non_sensitive_with_media?
- if activity.is_a?(Status) && (activity.non_sensitive_with_media? || (activity.with_media? && Setting.preview_sensitive_media))
- player_card = false
- activity.media_attachments.each do |media|
- if media.image?

View File

@ -13,7 +13,7 @@
%strong.p-name.emojify= display_name(status.account, custom_emojify: true)
%span= acct(status.account)
.status__content.p-name.emojify<
.status__content.emojify<
- if status.spoiler_text?
%p{ style: 'margin-bottom: 0' }<
%span.p-summary> #{Formatter.instance.format_spoiler(status)}&nbsp;