Remove fa_
prefix from status visibility icon method (#31846)
This commit is contained in:
parent
a3215c0f88
commit
cee71b9892
4 changed files with 20 additions and 22 deletions
|
@ -4,6 +4,13 @@ module StatusesHelper
|
|||
EMBEDDED_CONTROLLER = 'statuses'
|
||||
EMBEDDED_ACTION = 'embed'
|
||||
|
||||
VISIBLITY_ICONS = {
|
||||
public: 'globe',
|
||||
unlisted: 'lock_open',
|
||||
private: 'lock',
|
||||
direct: 'alternate_email',
|
||||
}.freeze
|
||||
|
||||
def nothing_here(extra_classes = '')
|
||||
content_tag(:div, class: "nothing-here #{extra_classes}") do
|
||||
t('accounts.nothing_here')
|
||||
|
@ -57,17 +64,8 @@ module StatusesHelper
|
|||
embedded_view? ? '_blank' : nil
|
||||
end
|
||||
|
||||
def fa_visibility_icon(status)
|
||||
case status.visibility
|
||||
when 'public'
|
||||
material_symbol 'globe'
|
||||
when 'unlisted'
|
||||
material_symbol 'lock_open'
|
||||
when 'private'
|
||||
material_symbol 'lock'
|
||||
when 'direct'
|
||||
material_symbol 'alternate_email'
|
||||
end
|
||||
def visibility_icon(status)
|
||||
VISIBLITY_ICONS[status.visibility.to_sym]
|
||||
end
|
||||
|
||||
def embedded_view?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue