Display whitelist information in about/more
This also limits the number of federated instances to the actual whitelist count.master
parent
4255cf0e1e
commit
556e1080a0
|
@ -25,8 +25,16 @@ class InstancePresenter
|
|||
Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) }
|
||||
end
|
||||
|
||||
def whitelist
|
||||
Rails.cache.fetch('whitelist') { DomainWhitelist.all }
|
||||
end
|
||||
|
||||
def domain_count
|
||||
Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
|
||||
if DomainWhitelist.enabled?
|
||||
whitelist.length
|
||||
else
|
||||
Rails.cache.fetch('distinct_domain_count') { Account.distinct.count(:domain) }
|
||||
end
|
||||
end
|
||||
|
||||
def version_number
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
%span= t 'about.status_count_after'
|
||||
.row__mascot
|
||||
.landing-page__mascot
|
||||
= image_tag asset_pack_path('elephant_ui_plane.svg')
|
||||
= image_tag asset_pack_path('awoospacefrontart-small.png')
|
||||
|
||||
- else
|
||||
.column-2.non-preview
|
||||
|
@ -94,7 +94,7 @@
|
|||
%span= t 'about.status_count_after'
|
||||
.row__mascot
|
||||
.landing-page__mascot
|
||||
= image_tag asset_pack_path('elephant_ui_plane.svg')
|
||||
= image_tag asset_pack_path('awoospacefrontart-small.png')
|
||||
|
||||
- if Setting.timeline_preview
|
||||
.column-3
|
||||
|
@ -142,4 +142,4 @@
|
|||
= link_to t('about.source_code'), @instance_presenter.source_url
|
||||
= " (#{@instance_presenter.version_number})"
|
||||
|
||||
#modal-container
|
||||
#modal-container
|
Loading…
Reference in New Issue