2019-05-25 21:27:00 +02:00
import React from 'react' ;
import { NavLink , withRouter } from 'react-router-dom' ;
import { FormattedMessage } from 'react-intl' ;
import Icon from 'flavours/glitch/components/icon' ;
2019-06-13 00:16:27 +02:00
import { profile _directory } from 'flavours/glitch/util/initial_state' ;
2019-05-25 21:27:00 +02:00
import NotificationsCounterIcon from './notifications_counter_icon' ;
2019-05-26 02:55:37 +02:00
import FollowRequestsNavLink from './follow_requests_nav_link' ;
2019-05-25 21:27:00 +02:00
import ListPanel from './list_panel' ;
2019-06-12 19:38:57 +02:00
const NavigationPanel = ( { onOpenSettings } ) => (
< div className = 'navigation-panel' >
< NavLink className = 'column-link column-link--transparent' to = '/timelines/home' data - preview - title - id = 'column.home' data - preview - icon = 'home' > < Icon className = 'column-link__icon' icon = 'home' fixedWidth / > < FormattedMessage id = 'tabs_bar.home' defaultMessage = 'Home' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' to = '/notifications' data - preview - title - id = 'column.notifications' data - preview - icon = 'bell' > < NotificationsCounterIcon className = 'column-link__icon' / > < FormattedMessage id = 'tabs_bar.notifications' defaultMessage = 'Notifications' / > < / N a v L i n k >
< FollowRequestsNavLink / >
< NavLink className = 'column-link column-link--transparent' to = '/timelines/public/local' data - preview - title - id = 'column.community' data - preview - icon = 'users' > < Icon className = 'column-link__icon' icon = 'users' fixedWidth / > < FormattedMessage id = 'tabs_bar.local_timeline' defaultMessage = 'Local' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' exact to = '/timelines/public' data - preview - title - id = 'column.public' data - preview - icon = 'globe' > < Icon className = 'column-link__icon' icon = 'globe' fixedWidth / > < FormattedMessage id = 'tabs_bar.federated_timeline' defaultMessage = 'Federated' / > < / N a v L i n k >
< NavLink className = 'column-link column-link--transparent' to = '/timelines/direct' > < Icon className = 'column-link__icon' icon = 'envelope' fixedWidth / > < FormattedMessage id = 'navigation_bar.direct' defaultMessage = 'Direct messages' / > < / N a v L i n k >
2019-06-12 20:13:49 +02:00
< NavLink className = 'column-link column-link--transparent' to = '/bookmarks' > < Icon className = 'column-link__icon' icon = 'bookmark' fixedWidth / > < FormattedMessage id = 'navigation_bar.bookmarks' defaultMessage = 'Bookmarks' / > < / N a v L i n k >
2019-06-12 19:38:57 +02:00
< NavLink className = 'column-link column-link--transparent' to = '/lists' > < Icon className = 'column-link__icon' icon = 'list-ul' fixedWidth / > < FormattedMessage id = 'navigation_bar.lists' defaultMessage = 'Lists' / > < / N a v L i n k >
2019-05-25 21:27:00 +02:00
2019-06-12 19:38:57 +02:00
< ListPanel / >
2019-05-25 21:27:00 +02:00
2019-06-12 19:38:57 +02:00
< hr / >
2019-05-25 21:27:00 +02:00
2019-06-12 19:38:57 +02:00
< a className = 'column-link column-link--transparent' href = '/settings/preferences' target = '_blank' > < Icon className = 'column-link__icon' icon = 'cog' fixedWidth / > < FormattedMessage id = 'navigation_bar.preferences' defaultMessage = 'Preferences' / > < / a >
< a className = 'column-link column-link--transparent' href = '#' onClick = { onOpenSettings } > < Icon className = 'column-link__icon' icon = 'cogs' fixedWidth / > < FormattedMessage id = 'navigation_bar.app_settings' defaultMessage = 'App settings' / > < / a >
< a className = 'column-link column-link--transparent' href = '/relationships' target = '_blank' > < Icon className = 'column-link__icon' icon = 'users' fixedWidth / > < FormattedMessage id = 'navigation_bar.follows_and_followers' defaultMessage = 'Follows and followers' / > < / a >
2019-06-13 00:16:27 +02:00
{ ! ! profile _directory && < a className = 'column-link column-link--transparent' href = '/explore' > < Icon className = 'column-link__icon' id = 'address-book-o' fixedWidth / > < FormattedMessage id = 'navigation_bar.profile_directory' defaultMessage = 'Profile directory' / > < / a > }
2019-06-12 19:38:57 +02:00
< / d i v >
) ;
2019-05-25 21:27:00 +02:00
2019-06-12 19:38:57 +02:00
export default withRouter ( NavigationPanel ) ;