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

Conflicts:
- `app/javascript/packs/public.js`:
  Upstream removed an unused function in code that has
  been refactored a bit. Removed that function in the corresponding
  places.
This commit is contained in:
Thibaut Girka
2020-01-20 18:31:11 +01:00
35 changed files with 165 additions and 202 deletions

View File

@@ -22,7 +22,7 @@
= form_tag admin_accounts_url, method: 'GET', class: 'simple_form' do
.fields-group
- Admin::FilterHelper::ACCOUNT_FILTERS.each do |key|
- AccountFilter::KEYS.each do |key|
- if params[key].present?
= hidden_field_tag key, params[key]

View File

@@ -139,12 +139,12 @@
%time.formatted{ datetime: @account.created_at.iso8601, title: l(@account.created_at) }= l @account.created_at
%td
%tr
%th= t('admin.accounts.most_recent_ip')
%td= @account.user_current_sign_in_ip
%td
- if @account.user_current_sign_in_ip
= table_link_to 'search', t('admin.accounts.search_same_ip'), admin_accounts_path(ip: @account.user_current_sign_in_ip)
- @account.user.recent_ips.each_with_index do |(_, ip), i|
%tr
- if i.zero?
%th{ rowspan: @account.user.recent_ips.size }= t('admin.accounts.most_recent_ip')
%td= ip
%td= table_link_to 'search', t('admin.accounts.search_same_ip'), admin_accounts_path(ip: ip)
%tr
%th= t('admin.accounts.most_recent_activity')

View File

@@ -22,7 +22,7 @@
= form_tag admin_custom_emojis_url, method: 'GET', class: 'simple_form' do
.fields-group
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
- CustomEmojiFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
- %i(shortcode by_domain).each do |key|
@@ -36,7 +36,7 @@
= form_for(@form, url: batch_admin_custom_emojis_path) do |f|
= hidden_field_tag :page, params[:page] || 1
- Admin::FilterHelper::CUSTOM_EMOJI_FILTERS.each do |key|
- CustomEmojiFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
.batch-table

View File

@@ -4,7 +4,7 @@
- content_for :heading_actions do
= link_to t('admin.email_domain_blocks.add_new'), new_admin_email_domain_block_path, class: 'button'
- if @email_domain_blocks.count == 0
- if @email_domain_blocks.empty?
%div.muted-hint.center-text=t 'admin.email_domain_blocks.empty'
- else
.table-wrapper

View File

@@ -19,9 +19,8 @@
- unless whitelist_mode?
= form_tag admin_instances_url, method: 'GET', class: 'simple_form' do
.fields-group
- Admin::FilterHelper::INSTANCES_FILTERS.each do |key|
- if params[key].present?
= hidden_field_tag key, params[key]
- InstanceFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
- %i(by_domain).each do |key|
.input.string.optional

View File

@@ -15,7 +15,7 @@
- if status.proper.media_attachments.first.video?
- video = status.proper.media_attachments.first
= react_component :video, src: video.file.url(:original), preview: video.file.url(:small), blurhash: video.blurhash, sensitive: status.proper.sensitive?, visible: false, width: 610, height: 343, inline: true, alt: video.description
- elsif status.media_attachments.first.audio?
- elsif status.proper.media_attachments.first.audio?
- audio = status.proper.media_attachments.first
= react_component :audio, src: audio.file.url(:original), height: 110, alt: audio.description, duration: audio.file.meta.dig(:original, :duration)
- else

View File

@@ -10,9 +10,8 @@
= form_tag admin_reports_url, method: 'GET', class: 'simple_form' do
.fields-group
- Admin::FilterHelper::REPORT_FILTERS.each do |key|
- if params[key].present?
= hidden_field_tag key, params[key]
- ReportFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
- %i(by_target_domain).each do |key|
.input.string.optional

View File

@@ -25,7 +25,7 @@
= form_tag admin_tags_url, method: 'GET', class: 'simple_form' do
.fields-group
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
- TagFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
- %i(name).each do |key|
@@ -40,9 +40,8 @@
= form_for(@form, url: batch_admin_tags_path) do |f|
= hidden_field_tag :page, params[:page] || 1
= hidden_field_tag :name, params[:name] if params[:name].present?
- Admin::FilterHelper::TAGS_FILTERS.each do |key|
- TagFilter::KEYS.each do |key|
= hidden_field_tag key, params[key] if params[key].present?
.batch-table.optional