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

Conflicts:
- `app/javascript/styles/fonts/montserrat.scss`:
  Code style changes upstream, path changes in glitch-soc.
  Applied upstream's code style changes.
- `app/javascript/styles/fonts/roboto-mono.scss`:
  Code style changes upstream, path changes in glitch-soc.
  Applied upstream's code style changes.
- `app/javascript/styles/fonts/roboto.scss`:
  Code style changes upstream, path changes in glitch-soc.
  Applied upstream's code style changes.
- `app/models/account.rb`:
  Textual conflict only caused by glitch-soc using a different value
  for character limits in a nearby line.
  Applied upstream's changes.
- `app/views/statuses/_simple_status.html.haml`:
  Attribute added to a tag modified by glitch-soc.
  Added upstream's attributes.
- `yarn.lock`:
  Upstream added/updated dependencies close to glitch-soc-only ones.
  Updated/added upstream dependencies.
This commit is contained in:
Claire
2022-06-02 09:49:38 +02:00
161 changed files with 2024 additions and 4334 deletions

View File

@ -3,7 +3,7 @@
class NodeInfo::Serializer < ActiveModel::Serializer
include RoutingHelper
attributes :version, :software, :protocols, :usage, :open_registrations
attributes :version, :software, :protocols, :services, :usage, :open_registrations, :metadata
def version
'2.0'
@ -37,6 +37,10 @@ class NodeInfo::Serializer < ActiveModel::Serializer
Setting.registrations_mode != 'none' && !Rails.configuration.x.single_user_mode
end
def metadata
[]
end
private
def instance_presenter

View File

@ -0,0 +1,11 @@
# frozen_string_literal: true
class REST::Admin::DomainBlockSerializer < ActiveModel::Serializer
attributes :id, :domain, :created_at, :severity,
:reject_media, :reject_reports,
:private_comment, :public_comment, :obfuscate
def id
object.id.to_s
end
end

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
class REST::Admin::ExistingDomainBlockErrorSerializer < ActiveModel::Serializer
attributes :error
has_one :existing_domain_block, serializer: REST::Admin::DomainBlockSerializer
def error
I18n.t('admin.domain_blocks.existing_domain_block', name: existing_domain_block.domain)
end
def existing_domain_block
object
end
end