Progress and testing status w comments
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Fragment } from 'react'
|
||||
import { openModal } from '../actions/modal'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import PageTitle from '../features/ui/util/page_title'
|
||||
import GroupsPanel from '../components/panel/groups_panel'
|
||||
import ListsPanel from '../components/panel/lists_panel'
|
||||
@@ -13,6 +14,14 @@ import DefaultLayout from '../layouts/default_layout'
|
||||
import TimelineComposeBlock from '../components/timeline_compose_block'
|
||||
import Divider from '../components/divider'
|
||||
|
||||
const messages = defineMessages({
|
||||
home: { id: 'home', defaultMessage: 'Home' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state) => ({
|
||||
totalQueuedItemsCount: state.getIn(['timelines', 'home', 'totalQueuedItemsCount']),
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onOpenHomePageSettingsModal() {
|
||||
dispatch(openModal('HOME_TIMELINE_SETTINGS'))
|
||||
@@ -20,23 +29,28 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(null, mapDispatchToProps)
|
||||
@injectIntl
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
class HomePage extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
totalQueuedItemsCount: PropTypes.number.isRequired,
|
||||
onOpenHomePageSettingsModal: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.title = '(1) Home - Gab'
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, onOpenHomePageSettingsModal } = this.props
|
||||
const {
|
||||
intl,
|
||||
children,
|
||||
totalQueuedItemsCount,
|
||||
onOpenHomePageSettingsModal,
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<DefaultLayout
|
||||
title='Home'
|
||||
title={intl.formatMessage(messages.home)}
|
||||
actions={[
|
||||
{
|
||||
icon: 'ellipsis',
|
||||
@@ -56,6 +70,10 @@ class HomePage extends PureComponent {
|
||||
</Fragment>
|
||||
)}
|
||||
>
|
||||
<PageTitle
|
||||
path={intl.formatMessage(messages.home)}
|
||||
badge={totalQueuedItemsCount}
|
||||
/>
|
||||
<TimelineComposeBlock autoFocus={false} />
|
||||
<Divider />
|
||||
{children}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Fragment } from 'react'
|
||||
import ImmutablePropTypes from 'react-immutable-proptypes'
|
||||
import ImmutablePureComponent from 'react-immutable-pure-component'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import { openModal } from '../actions/modal'
|
||||
import PageTitle from '../features/ui/util/page_title'
|
||||
import LinkFooter from '../components/link_footer'
|
||||
@@ -9,6 +10,10 @@ import ListDetailsPanel from '../components/panel/list_details_panel'
|
||||
import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
|
||||
import TrendsPanel from '../components/panel/trends_panel'
|
||||
|
||||
const messages = defineMessages({
|
||||
list: { id: 'list', defaultMessage: 'List' },
|
||||
})
|
||||
|
||||
const mapStateToProps = (state, props) => ({
|
||||
list: state.getIn(['lists', props.params.id]),
|
||||
})
|
||||
@@ -25,23 +30,21 @@ const mapDispatchToProps = (dispatch, { list }) => ({
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
@connect(mapStateToProps, mapDispatchToProps)
|
||||
class ListPage extends ImmutablePureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
list: ImmutablePropTypes.map,
|
||||
children: PropTypes.node.isRequired,
|
||||
onOpenListEditModal: PropTypes.func.isRequired,
|
||||
onOpenListTimelineSettingsModal: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { list } = this.props
|
||||
const listTitle = !list ? '...' : list.get('title')
|
||||
document.title = `List / ${listTitle} - Gab`
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
intl,
|
||||
children,
|
||||
list,
|
||||
onOpenListEditModal,
|
||||
@@ -73,6 +76,7 @@ class ListPage extends ImmutablePureComponent {
|
||||
)}
|
||||
showBackBtn
|
||||
>
|
||||
<PageTitle path={[title, intl.formatMessage(messages.list)]} />
|
||||
{ children }
|
||||
</DefaultLayout>
|
||||
)
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
import { Fragment } from 'react'
|
||||
import { openModal } from '../actions/modal'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import PageTitle from '../features/ui/util/page_title'
|
||||
import LinkFooter from '../components/link_footer'
|
||||
import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
|
||||
import TrendsPanel from '../components/panel/trends_panel'
|
||||
import DefaultLayout from '../layouts/default_layout'
|
||||
|
||||
const messages = defineMessages({
|
||||
lists: { id: 'lists', defaultMessage: 'Lists' },
|
||||
})
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onOpenListCreateModal() {
|
||||
dispatch(openModal('LIST_CREATE'))
|
||||
@@ -13,23 +18,26 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
@connect(null, mapDispatchToProps)
|
||||
class ListsPage extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
onOpenListCreateModal: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.title = 'Lists - Gab'
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, onOpenListCreateModal } = this.props
|
||||
const {
|
||||
intl,
|
||||
children,
|
||||
onOpenListCreateModal,
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<DefaultLayout
|
||||
title='Lists'
|
||||
title={intl.formatMessage(messages.lists)}
|
||||
actions={[
|
||||
{
|
||||
icon: 'add',
|
||||
@@ -45,6 +53,7 @@ class ListsPage extends PureComponent {
|
||||
)}
|
||||
showBackBtn
|
||||
>
|
||||
<PageTitle path={intl.formatMessage(messages.lists)} />
|
||||
{children}
|
||||
</DefaultLayout>
|
||||
)
|
||||
|
||||
@@ -2,7 +2,6 @@ import { Fragment } from 'react'
|
||||
import PageTitle from '../features/ui/util/page_title'
|
||||
import LinkFooter from '../components/link_footer'
|
||||
import WhoToFollowPanel from '../components/panel/who_to_follow_panel'
|
||||
// import TrendsPanel from '../components/panel/trends_panel'
|
||||
import DefaultLayout from '../layouts/default_layout'
|
||||
|
||||
export default class ModalPage extends PureComponent {
|
||||
@@ -25,6 +24,7 @@ export default class ModalPage extends PureComponent {
|
||||
)}
|
||||
showBackBtn
|
||||
>
|
||||
<PageTitle path={title} />
|
||||
{children}
|
||||
</DefaultLayout>
|
||||
)
|
||||
|
||||
@@ -61,8 +61,6 @@ class ProfilePage extends ImmutablePureComponent {
|
||||
params: { username },
|
||||
} = this.props
|
||||
|
||||
console.log("acount:", account)
|
||||
|
||||
const title = !!account ? account.get('display_name') : username
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,15 +1,28 @@
|
||||
import { Fragment } from 'react'
|
||||
import { defineMessages, injectIntl } from 'react-intl'
|
||||
import PageTitle from '../features/ui/util/page_title'
|
||||
import LinkFooter from '../components/link_footer'
|
||||
import SearchFilterPanel from '../components/panel/search_filter_panel'
|
||||
import SearchLayout from '../layouts/search_layout'
|
||||
|
||||
export default class SearchPage extends PureComponent {
|
||||
componentDidMount() {
|
||||
document.title = `Search - Gab`
|
||||
const messages = defineMessages({
|
||||
search: { id: 'search', defaultMessage: 'Search' },
|
||||
})
|
||||
|
||||
export default
|
||||
@injectIntl
|
||||
class SearchPage extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
intl: PropTypes.object.isRequired,
|
||||
children: PropTypes.node.isRequired,
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children } = this.props
|
||||
const {
|
||||
intl,
|
||||
children,
|
||||
} = this.props
|
||||
|
||||
return (
|
||||
<SearchLayout
|
||||
@@ -21,8 +34,10 @@ export default class SearchPage extends PureComponent {
|
||||
</Fragment>
|
||||
)}
|
||||
>
|
||||
<PageTitle path={intl.formatMessage(messages.search)} />
|
||||
{children}
|
||||
</SearchLayout>
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,39 +8,17 @@ import UserPanel from '../components/panel/user_panel'
|
||||
import TrendsPanel from '../components/panel/trends_panel'
|
||||
import HashtagsPanel from '../components/panel/hashtags_panel'
|
||||
import DefaultLayout from '../layouts/default_layout'
|
||||
import TimelineComposeBlock from '../components/timeline_compose_block'
|
||||
import Divider from '../components/divider'
|
||||
|
||||
const mapDispatchToProps = (dispatch) => ({
|
||||
onOpenHomePageSettingsModal() {
|
||||
dispatch(openModal('HOME_TIMELINE_SETTINGS'))
|
||||
},
|
||||
})
|
||||
|
||||
export default
|
||||
@connect(null, mapDispatchToProps)
|
||||
class ShortcutsPage extends PureComponent {
|
||||
|
||||
static propTypes = {
|
||||
onOpenHomePageSettingsModal: PropTypes.func.isRequired,
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.title = '(1) Home - Gab'
|
||||
}
|
||||
|
||||
render() {
|
||||
const { children, onOpenHomePageSettingsModal } = this.props
|
||||
const { children } = this.props
|
||||
|
||||
return (
|
||||
<DefaultLayout
|
||||
title='Shortcuts'
|
||||
actions={[
|
||||
{
|
||||
icon: 'ellipsis',
|
||||
onClick: onOpenHomePageSettingsModal,
|
||||
},
|
||||
]}
|
||||
actions={[]}
|
||||
layout={(
|
||||
<Fragment>
|
||||
<UserPanel />
|
||||
@@ -53,8 +31,6 @@ class ShortcutsPage extends PureComponent {
|
||||
</Fragment>
|
||||
)}
|
||||
>
|
||||
<TimelineComposeBlock autoFocus={false} />
|
||||
<Divider />
|
||||
{children}
|
||||
</DefaultLayout>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user