Display customized mascot in web UI and fix admin form for it (#8964)
Follow-up to #8766
This commit is contained in:
parent
22de24b8ca
commit
9d4541c612
4 changed files with 12 additions and 1 deletions
|
@ -16,6 +16,7 @@ class InitialStateSerializer < ActiveModel::Serializer
|
|||
search_enabled: Chewy.enabled?,
|
||||
version: Mastodon::Version.to_s,
|
||||
invites_enabled: Setting.min_invite_role == 'user',
|
||||
mascot: instance_presenter.mascot&.file&.url,
|
||||
}
|
||||
|
||||
if object.current_account
|
||||
|
@ -56,4 +57,10 @@ class InitialStateSerializer < ActiveModel::Serializer
|
|||
def media_attachments
|
||||
{ accept_content_types: MediaAttachment::IMAGE_FILE_EXTENSIONS + MediaAttachment::VIDEO_FILE_EXTENSIONS + MediaAttachment::IMAGE_MIME_TYPES + MediaAttachment::VIDEO_MIME_TYPES }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue