2016-11-18 15:19:57 -08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module SettingsHelper
|
2017-09-08 03:32:22 -07:00
|
|
|
def filterable_languages
|
2022-02-07 17:41:17 -08:00
|
|
|
LanguagesHelper::SUPPORTED_LOCALES.keys
|
2017-09-08 03:32:22 -07:00
|
|
|
end
|
|
|
|
|
2017-06-25 07:54:30 -07:00
|
|
|
def session_device_icon(session)
|
|
|
|
device = session.detection.device
|
|
|
|
|
|
|
|
if device.mobile?
|
|
|
|
'mobile'
|
|
|
|
elsif device.tablet?
|
|
|
|
'tablet'
|
|
|
|
else
|
|
|
|
'desktop'
|
|
|
|
end
|
|
|
|
end
|
2019-09-19 11:58:19 -07:00
|
|
|
|
|
|
|
def compact_account_link_to(account)
|
|
|
|
return if account.nil?
|
|
|
|
|
|
|
|
link_to ActivityPub::TagManager.instance.url_for(account), class: 'name-tag', title: account.acct do
|
|
|
|
safe_join([image_tag(account.avatar.url, width: 15, height: 15, alt: display_name(account), class: 'avatar'), content_tag(:span, account.acct, class: 'username')], ' ')
|
|
|
|
end
|
|
|
|
end
|
2016-11-18 15:19:57 -08:00
|
|
|
end
|