diff options
author | ThibG <thib@sitedethib.com> | 2020-06-26 16:36:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-26 16:36:55 +0200 |
commit | 10ede3eb27c5de5d4e3a283e333af2a54da6177d (patch) | |
tree | 2e88bb2d667a416770a098915d8b3ea16ff9c208 /app/helpers/application_helper.rb | |
parent | 8f4aff9b6fe638b26b9d0bf0fe4151c2cc214d6d (diff) | |
parent | de735286cd62acd9d0fbb0dd54c82098cc3a4993 (diff) |
Merge pull request #1364 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2f11ccb6f..9ca11d573 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -77,6 +77,18 @@ module ApplicationHelper content_tag(:i, nil, attributes.merge(class: class_names.join(' '))) end + def visibility_icon(status) + if status.public_visibility? + fa_icon('globe', title: I18n.t('statuses.visibilities.public')) + elsif status.unlisted_visibility? + fa_icon('unlock', title: I18n.t('statuses.visibilities.unlisted')) + elsif status.private_visibility? || status.limited_visibility? + fa_icon('lock', title: I18n.t('statuses.visibilities.private')) + elsif status.direct_visibility? + fa_icon('envelope', title: I18n.t('statuses.visibilities.direct')) + end + end + def custom_emoji_tag(custom_emoji, animate = true) if animate image_tag(custom_emoji.image.url, class: 'emojione', alt: ":#{custom_emoji.shortcode}:") |