Merge remote-tracking branch 'parent/main' into upstream-20240913

This commit is contained in:
KMY 2024-09-13 10:31:48 +09:00
commit fc9d27ff91
392 changed files with 3757 additions and 3233 deletions

View file

@ -4,6 +4,16 @@ module StatusesHelper
EMBEDDED_CONTROLLER = 'statuses'
EMBEDDED_ACTION = 'embed'
VISIBLITY_ICONS = {
public: 'globe',
unlisted: 'lock_open',
private: 'lock',
direct: 'alternate_email',
public_unlisted: 'cloud',
login: 'key',
limited: 'shield',
}.freeze
def nothing_here(extra_classes = '')
content_tag(:div, class: "nothing-here #{extra_classes}") do
t('accounts.nothing_here')
@ -57,23 +67,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 'public_unlisted'
material_symbol 'cloud'
when 'login'
material_symbol 'key'
when 'private'
material_symbol 'lock'
when 'limited'
material_symbol 'shield'
when 'direct'
material_symbol 'alternate_email'
end
def visibility_icon(status)
VISIBLITY_ICONS[status.visibility.to_sym]
end
def embedded_view?