diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2019-01-07 23:59:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-07 23:59:06 +0100 |
commit | 8b976c3479a329f730fcd35651aa1a046581ebe8 (patch) | |
tree | 93329a0339c20c355b3787aba35710e721d3fa34 /app/javascript | |
parent | 28b482874ab4393639a77fdd895658096bcbfd57 (diff) |
Move profile directory link in web UI from footer to discover section (#9745)
Diffstat (limited to 'app/javascript')
-rw-r--r-- | app/javascript/mastodon/features/getting_started/index.js | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/app/javascript/mastodon/features/getting_started/index.js b/app/javascript/mastodon/features/getting_started/index.js index feecfd0e4..d56e7f142 100644 --- a/app/javascript/mastodon/features/getting_started/index.js +++ b/app/javascript/mastodon/features/getting_started/index.js @@ -32,6 +32,7 @@ const messages = defineMessages({ personal: { id: 'navigation_bar.personal', defaultMessage: 'Personal' }, security: { id: 'navigation_bar.security', defaultMessage: 'Security' }, menu: { id: 'getting_started.heading', defaultMessage: 'Getting started' }, + profile_directory: { id: 'getting_started.directory', defaultMessage: 'Profile directory' }, }); const mapStateToProps = state => ({ @@ -87,10 +88,30 @@ class GettingStarted extends ImmutablePureComponent { <ColumnSubheading key={i++} text={intl.formatMessage(messages.discover)} />, <ColumnLink key={i++} icon='users' text={intl.formatMessage(messages.community_timeline)} to='/timelines/public/local' />, <ColumnLink key={i++} icon='globe' text={intl.formatMessage(messages.public_timeline)} to='/timelines/public' />, + ); + + height += 34 + 48*2; + + if (profile_directory) { + navItems.push( + <ColumnLink key={i++} icon='address-book' text={intl.formatMessage(messages.profile_directory)} href='/explore' />, + ); + + height += 48; + } + + navItems.push( <ColumnSubheading key={i++} text={intl.formatMessage(messages.personal)} /> ); - height += 34*2 + 48*2; + height += 34; + } else if (profile_directory) { + navItems.push( + <ColumnSubheading key={i++} text={intl.formatMessage(messages.discover)} />, + <ColumnLink key={i++} icon='address-book' text={intl.formatMessage(messages.profile_directory)} href='/explore' />, + ); + + height += 34 + 48; } navItems.push( @@ -136,7 +157,6 @@ class GettingStarted extends ImmutablePureComponent { <div className='getting-started__footer'> <ul> - {profile_directory && <li><a href='/explore' target='_blank'><FormattedMessage id='getting_started.directory' defaultMessage='Profile directory' /></a> · </li>} {invitesEnabled && <li><a href='/invites' target='_blank'><FormattedMessage id='getting_started.invite' defaultMessage='Invite people' /></a> · </li>} {multiColumn && <li><Link to='/keyboard-shortcuts'><FormattedMessage id='navigation_bar.keyboard_shortcuts' defaultMessage='Hotkeys' /></Link> · </li>} <li><a href='/auth/edit'><FormattedMessage id='getting_started.security' defaultMessage='Security' /></a> · </li> |