Added list functionality to home page, updated column header buttons for list

This commit is contained in:
mgabdev
2019-07-19 00:03:57 -04:00
parent 3ec39ee7c9
commit 94566e0ab4
5 changed files with 107 additions and 16 deletions

View File

@@ -70,10 +70,7 @@ class HomeTimeline extends React.PureComponent {
return (
<Column label={intl.formatMessage(messages.title)}>
<HomeColumnHeader
activeItem='home'
active={hasUnread}
>
<HomeColumnHeader activeItem='home' active={hasUnread}>
<ColumnSettingsContainer />
</HomeColumnHeader>
<StatusListContainer

View File

@@ -12,6 +12,8 @@ import { openModal } from '../../actions/modal';
import MissingIndicator from '../../components/missing_indicator';
import LoadingIndicator from '../../components/loading_indicator';
import Icon from 'gabsocial/components/icon';
import HomeColumnHeader from '../../components/home_column_header';
import { Link } from 'react-router-dom';
const messages = defineMessages({
deleteMessage: { id: 'confirmations.delete_list.message', defaultMessage: 'Are you sure you want to permanently delete this list?' },
@@ -102,7 +104,7 @@ class ListTimeline extends React.PureComponent {
return (
<Column label={title}>
<ColumnHeader icon='list-ul' active={hasUnread} title={title} >
<HomeColumnHeader activeItem='lists' activeSubItem={id} active={hasUnread}>
<div className='column-header__links'>
<button className='text-btn column-header__setting-btn' tabIndex='0' onClick={this.handleEditClick}>
<Icon id='pencil' /> <FormattedMessage id='lists.edit' defaultMessage='Edit list' />
@@ -111,10 +113,15 @@ class ListTimeline extends React.PureComponent {
<button className='text-btn column-header__setting-btn' tabIndex='0' onClick={this.handleDeleteClick}>
<Icon id='trash' /> <FormattedMessage id='lists.delete' defaultMessage='Delete list' />
</button>
</div>
<hr />
</ColumnHeader>
<hr/>
<Link to='/lists' className='text-btn column-header__setting-btn column-header__setting-btn--link'>
<FormattedMessage id='lists.view_all' defaultMessage='View all lists' />
<Icon id='arrow-right' />
</Link>
</div>
</HomeColumnHeader>
<StatusListContainer
scrollKey='list_timeline'

View File

@@ -53,6 +53,8 @@ import {
Explore,
Groups,
GroupTimeline,
ListTimeline,
Lists,
} from './util/async-components';
import { me, meUsername } from '../../initial_state';
import { previewState as previewMediaState } from './components/media_modal';
@@ -177,8 +179,8 @@ class SwitchingColumnsArea extends React.PureComponent {
<WrappedRoute path='/tags/:id' component={HashtagTimeline} content={children} />
<Redirect from='/lists' to='/home' />
<Redirect from='/list' to='/home' />
<WrappedRoute path='/lists' layout={LAYOUT.DEFAULT} component={Lists} content={children} />
<WrappedRoute path='/list/:id' page={HomePage} component={ListTimeline} content={children} />
<WrappedRoute path='/notifications' layout={LAYOUT.DEFAULT} component={Notifications} content={children} />