This commit is contained in:
mgabdev
2020-05-03 01:22:49 -04:00
parent 196a906cec
commit 055b5a430f
85 changed files with 1110 additions and 1051 deletions

View File

@@ -1,32 +1,33 @@
import Layout from './layout'
export default class DefaultLayout extends PureComponent {
static propTypes = {
actions: PropTypes.array,
tabs: PropTypes.array,
children: PropTypes.node.isRequired,
layout: PropTypes.object,
showBackBtn: PropTypes.bool,
tabs: PropTypes.array,
title: PropTypes.string.isRequired,
children: PropTypes.node.isRequired,
}
render() {
const {
children,
title,
showBackBtn,
layout,
actions,
children,
layout,
showBackBtn,
tabs,
} = this.props
title,
} = this.props
return (
<Layout
title={title}
showBackBtn={showBackBtn}
actions={actions}
tabs={tabs}
layout={layout}
showBackBtn={showBackBtn}
tabs={tabs}
title={title}
>
{children}
</Layout>

View File

@@ -5,32 +5,34 @@ import Layout from './layout'
import GroupHeader from '../components/group_header'
export default class GroupLayout extends ImmutablePureComponent {
static propTypes = {
actions: PropTypes.array,
children: PropTypes.node,
group: ImmutablePropTypes.map,
relationships: ImmutablePropTypes.map,
layout: PropTypes.object,
relationships: ImmutablePropTypes.map,
showBackBtn: PropTypes.bool,
title: PropTypes.string,
}
render() {
const {
group,
children,
layout,
showBackBtn,
actions,
children,
group,
layout,
relationships,
showBackBtn,
title,
} = this.props
const title = !!group ? group.get('title') : undefined
return (
<Layout
noRightSidebar
title={title}
actions={actions}
showBackBtn={showBackBtn}
title={title}
>
<div className={[_s.default, _s.width100PC, _s.pl15].join(' ')}>

View File

@@ -1,52 +1,58 @@
import Sticky from 'react-stickynode'
import Search from '../components/search'
import ColumnHeader from '../components/column_header'
import Sidebar from '../components/sidebar'
import { BREAKPOINT_EXTRA_SMALL } from '../constants'
import NavigationBar from '../components/navigation_bar'
// : todo :
// import Footer from '../components/footer'
import FloatingActionButton from '../components/floating_action_button'
import Responsive from '../features/ui/util/responsive_component'
export default class Layout extends PureComponent {
static propTypes = {
actions: PropTypes.array,
tabs: PropTypes.array,
children: PropTypes.node,
layout: PropTypes.object,
title: PropTypes.string,
showBackBtn: PropTypes.bool,
noSidebar: PropTypes.bool,
noRightSidebar: PropTypes.bool,
noComposeButton: PropTypes.bool,
noRightSidebar: PropTypes.bool,
noSidebar: PropTypes.bool,
showBackBtn: PropTypes.bool,
tabs: PropTypes.array,
title: PropTypes.string,
}
render() {
const {
children,
title,
showBackBtn,
layout,
actions,
tabs,
noSidebar,
noRightSidebar,
children,
layout,
noComposeButton,
noRightSidebar,
noSidebar,
showBackBtn,
tabs,
title,
} = this.props
return (
<div className={[_s.default, _s.width100PC, _s.heightMin100VH, _s.bgTertiary].join(' ')}>
<NavigationBar
title={title}
tabs={tabs}
actions={actions}
tabs={tabs}
title={title}
/>
<div className={[_s.default, _s.flexRow, _s.width100PC].join(' ')}>
{
!noSidebar &&
<Responsive min={BREAKPOINT_EXTRA_SMALL}>
<Sidebar title={title} tabs={tabs} actions={actions} />
<Sidebar
actions={actions}
showBackBtn={showBackBtn}
tabs={tabs}
title={title}
/>
</Responsive>
}

View File

@@ -1,17 +1,16 @@
import ImmutablePropTypes from 'react-immutable-proptypes'
import ImmutablePureComponent from 'react-immutable-pure-component'
import Sticky from 'react-stickynode'
import ProfileHeader from '../components/profile_header'
import NavigationBar from '../components/navigation_bar'
import ProfileHeader from '../components/profile_header'
export default class ProfileLayout extends ImmutablePureComponent {
static propTypes = {
children: PropTypes.node.isRequired,
account: ImmutablePropTypes.map,
children: PropTypes.node.isRequired,
layout: PropTypes.object,
title: PropTypes.string,
showBackBtn: PropTypes.bool,
}
render() {
@@ -20,7 +19,6 @@ export default class ProfileLayout extends ImmutablePureComponent {
children,
layout,
title,
showBackBtn,
} = this.props
return (