Add icon
field to instance endpoint (#30205)
This commit is contained in:
parent
376088f6da
commit
4a968cb7a9
6 changed files with 60 additions and 47 deletions
|
@ -13,6 +13,22 @@ module InstanceHelper
|
|||
safe_join([description_prefix(invite), I18n.t('auth.description.suffix')], ' ')
|
||||
end
|
||||
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
||||
def favicon_path(size = '48')
|
||||
instance_presenter.favicon&.file&.url(size)
|
||||
end
|
||||
|
||||
def app_icon_path(size = '48')
|
||||
instance_presenter.app_icon&.file&.url(size)
|
||||
end
|
||||
|
||||
def use_mask_icon?
|
||||
instance_presenter.app_icon.blank?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def description_prefix(invite)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue