Skip to content

Commit

Permalink
Do not show timeline preview or directory widgets if they are disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent a997211 commit a1e1df9
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions app/views/about/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@
= render 'registration'

.directory
.directory__tag{ class: Setting.profile_directory ? nil : 'disabled' }
= optional_link_to Setting.profile_directory, explore_path do
%h4
= fa_icon 'address-book fw'
= t('about.discover_users')
%small= t('about.browse_directory')
- if Setting.profile_directory
.directory__tag
= optional_link_to Setting.profile_directory, explore_path do
%h4
= fa_icon 'address-book fw'
= t('about.discover_users')
%small= t('about.browse_directory')

.avatar-stack
- @instance_presenter.sample_accounts.each do |account|
= image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'
.avatar-stack
- @instance_presenter.sample_accounts.each do |account|
= image_tag current_account&.user&.setting_auto_play_gif ? account.avatar_original_url : account.avatar_static_url, width: 48, height: 48, alt: '', class: 'account__avatar'

.directory__tag{ class: Setting.timeline_preview ? nil : 'disabled' }
= optional_link_to Setting.timeline_preview, public_timeline_path do
%h4
= fa_icon 'globe fw'
= t('about.see_whats_happening')
%small= t('about.browse_public_posts')
- if Setting.timeline_preview
.directory__tag
= optional_link_to Setting.timeline_preview, public_timeline_path do
%h4
= fa_icon 'globe fw'
= t('about.see_whats_happening')
%small= t('about.browse_public_posts')

.directory__tag
= link_to 'https://joinmastodon.org/apps', target: '_blank', rel: 'noopener' do
Expand Down

0 comments on commit a1e1df9

Please sign in to comment.