diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-18 10:25:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 10:25:44 +0100 |
commit | a492a9bcd355d4f0998990905177ac4f9699cc3c (patch) | |
tree | 6760121a236e9846ac65f94ec1b8253b3195f77f /app | |
parent | 4699cf853c8533cfca1f356d6c9e430c16b75335 (diff) |
Add information about how to opt-in to the directory on the directory (#9834)
Fix #9833
Diffstat (limited to 'app')
-rw-r--r-- | app/javascript/styles/mastodon/widgets.scss | 27 | ||||
-rw-r--r-- | app/views/directories/index.html.haml | 18 |
2 files changed, 43 insertions, 2 deletions
diff --git a/app/javascript/styles/mastodon/widgets.scss b/app/javascript/styles/mastodon/widgets.scss index d44a1ef06..0699900dc 100644 --- a/app/javascript/styles/mastodon/widgets.scss +++ b/app/javascript/styles/mastodon/widgets.scss @@ -480,3 +480,30 @@ $fluid-breakpoint: $maximum-width + 20px; } } } + +.notice-widget { + margin-bottom: 10px; + color: $darker-text-color; + + p { + margin-bottom: 10px; + + &:last-child { + margin-bottom: 0; + } + } + + a { + font-size: 14px; + line-height: 20px; + text-decoration: none; + font-weight: 500; + color: $ui-highlight-color; + + &:hover, + &:focus, + &:active { + text-decoration: underline; + } + } +} diff --git a/app/views/directories/index.html.haml b/app/views/directories/index.html.haml index 88706def7..a8aa68cc4 100644 --- a/app/views/directories/index.html.haml +++ b/app/views/directories/index.html.haml @@ -41,8 +41,22 @@ = paginate @accounts .column-1 - - if @tags.empty? - .nothing-here.nothing-here--flexible + - if user_signed_in? + .box-widget.notice-widget + - if current_account.discoverable? + - if current_account.followers_count < Account::MIN_FOLLOWERS_DISCOVERY + %p= t('directories.enabled_but_waiting', min_followers: Account::MIN_FOLLOWERS_DISCOVERY) + - else + %p= t('directories.enabled') + - else + %p= t('directories.how_to_enable') + + = link_to settings_profile_path do + = t('settings.edit_profile') + = fa_icon 'chevron-right fw' + + - if @tags.empty? && !user_signed_in? + .nothing-here - else - @tags.each do |tag| .directory__tag{ class: tag.id == @tag&.id ? 'active' : nil } |