parent
f820edb463
commit
337462aa5e
@ -1,50 +0,0 @@ |
|||||||
import ColumnsArea from './columns_area'; |
|
||||||
import Column from './column'; |
|
||||||
import Drawer from './drawer'; |
|
||||||
import ComposeFormContainer from '../containers/compose_form_container'; |
|
||||||
import FollowFormContainer from '../containers/follow_form_container'; |
|
||||||
import UploadFormContainer from '../containers/upload_form_container'; |
|
||||||
import StatusListContainer from '../containers/status_list_container'; |
|
||||||
import NotificationsContainer from '../containers/notifications_container'; |
|
||||||
import NavigationContainer from '../containers/navigation_container'; |
|
||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
|
||||||
|
|
||||||
const Frontend = React.createClass({ |
|
||||||
|
|
||||||
mixins: [PureRenderMixin], |
|
||||||
|
|
||||||
render () { |
|
||||||
return ( |
|
||||||
<div style={{ flex: '0 0 auto', display: 'flex', width: '100%', height: '100%', background: '#1a1c23' }}> |
|
||||||
<Drawer> |
|
||||||
<div style={{ flex: '1 1 auto' }}> |
|
||||||
<NavigationContainer /> |
|
||||||
<ComposeFormContainer /> |
|
||||||
<UploadFormContainer /> |
|
||||||
</div> |
|
||||||
|
|
||||||
<FollowFormContainer /> |
|
||||||
</Drawer> |
|
||||||
|
|
||||||
<ColumnsArea> |
|
||||||
<Column icon='home' heading='Home'> |
|
||||||
<StatusListContainer type='home' /> |
|
||||||
</Column> |
|
||||||
|
|
||||||
<Column icon='at' heading='Mentions'> |
|
||||||
<StatusListContainer type='mentions' /> |
|
||||||
</Column> |
|
||||||
|
|
||||||
<Column> |
|
||||||
{this.props.children} |
|
||||||
</Column> |
|
||||||
</ColumnsArea> |
|
||||||
|
|
||||||
<NotificationsContainer /> |
|
||||||
</div> |
|
||||||
); |
|
||||||
} |
|
||||||
|
|
||||||
}); |
|
||||||
|
|
||||||
export default Frontend; |
|
@ -1,5 +1,5 @@ |
|||||||
import CharacterCounter from './character_counter'; |
import CharacterCounter from './character_counter'; |
||||||
import Button from './button'; |
import Button from '../../../components/button'; |
||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'; |
import ImmutablePropTypes from 'react-immutable-proptypes'; |
||||||
import ReplyIndicator from './reply_indicator'; |
import ReplyIndicator from './reply_indicator'; |
@ -1,4 +1,4 @@ |
|||||||
import IconButton from './icon_button'; |
import IconButton from '../../../components/icon_button'; |
||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
|
|
||||||
const FollowForm = React.createClass({ |
const FollowForm = React.createClass({ |
@ -1,8 +1,8 @@ |
|||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'; |
import ImmutablePropTypes from 'react-immutable-proptypes'; |
||||||
import Avatar from './avatar'; |
import Avatar from '../../../components/avatar'; |
||||||
import IconButton from './icon_button'; |
import IconButton from '../../../components/icon_button'; |
||||||
import DisplayName from './display_name'; |
import DisplayName from '../../../components/display_name'; |
||||||
import { Link } from 'react-router'; |
import { Link } from 'react-router'; |
||||||
|
|
||||||
const NavigationBar = React.createClass({ |
const NavigationBar = React.createClass({ |
@ -1,8 +1,8 @@ |
|||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'; |
import ImmutablePropTypes from 'react-immutable-proptypes'; |
||||||
import Avatar from './avatar'; |
import Avatar from '../../../components/avatar'; |
||||||
import IconButton from './icon_button'; |
import IconButton from '../../../components/icon_button'; |
||||||
import DisplayName from './display_name'; |
import DisplayName from '../../../components/display_name'; |
||||||
|
|
||||||
const ReplyIndicator = React.createClass({ |
const ReplyIndicator = React.createClass({ |
||||||
|
|
@ -1,5 +1,5 @@ |
|||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
import Button from './button'; |
import Button from '../../../components/button'; |
||||||
|
|
||||||
const UploadButton = React.createClass({ |
const UploadButton = React.createClass({ |
||||||
|
|
@ -1,7 +1,7 @@ |
|||||||
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
import ImmutablePropTypes from 'react-immutable-proptypes'; |
import ImmutablePropTypes from 'react-immutable-proptypes'; |
||||||
import UploadButton from './upload_button'; |
import UploadButton from './upload_button'; |
||||||
import IconButton from './icon_button'; |
import IconButton from '../../../components/icon_button'; |
||||||
|
|
||||||
const UploadForm = React.createClass({ |
const UploadForm = React.createClass({ |
||||||
|
|
@ -1,6 +1,6 @@ |
|||||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||||
import ComposeForm from '../components/compose_form'; |
import ComposeForm from '../components/compose_form'; |
||||||
import { changeCompose, submitCompose, cancelReplyCompose } from '../actions/compose'; |
import { changeCompose, submitCompose, cancelReplyCompose } from '../../../actions/compose'; |
||||||
|
|
||||||
function selectStatus(state) { |
function selectStatus(state) { |
||||||
let statusId = state.getIn(['compose', 'in_reply_to'], null); |
let statusId = state.getIn(['compose', 'in_reply_to'], null); |
@ -1,6 +1,6 @@ |
|||||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||||
import FollowForm from '../components/follow_form'; |
import FollowForm from '../components/follow_form'; |
||||||
import { changeFollow, submitFollow } from '../actions/follow'; |
import { changeFollow, submitFollow } from '../../../actions/follow'; |
||||||
|
|
||||||
const mapStateToProps = function (state, props) { |
const mapStateToProps = function (state, props) { |
||||||
return { |
return { |
@ -1,6 +1,6 @@ |
|||||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||||
import { NotificationStack } from 'react-notification'; |
import { NotificationStack } from 'react-notification'; |
||||||
import { dismissNotification } from '../actions/notifications'; |
import { dismissNotification } from '../../../actions/notifications'; |
||||||
|
|
||||||
const mapStateToProps = (state, props) => { |
const mapStateToProps = (state, props) => { |
||||||
return { |
return { |
@ -1,8 +1,8 @@ |
|||||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||||
import StatusList from '../components/status_list'; |
import StatusList from '../../../components/status_list'; |
||||||
import { replyCompose } from '../actions/compose'; |
import { replyCompose } from '../../../actions/compose'; |
||||||
import { reblog, favourite } from '../actions/interactions'; |
import { reblog, favourite } from '../../../actions/interactions'; |
||||||
import { selectStatus } from '../reducers/timelines'; |
import { selectStatus } from '../../../reducers/timelines'; |
||||||
|
|
||||||
const mapStateToProps = function (state, props) { |
const mapStateToProps = function (state, props) { |
||||||
return { |
return { |
@ -1,6 +1,6 @@ |
|||||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||||
import UploadForm from '../components/upload_form'; |
import UploadForm from '../components/upload_form'; |
||||||
import { uploadCompose, undoUploadCompose } from '../actions/compose'; |
import { uploadCompose, undoUploadCompose } from '../../../actions/compose'; |
||||||
|
|
||||||
const mapStateToProps = function (state, props) { |
const mapStateToProps = function (state, props) { |
||||||
return { |
return { |
@ -0,0 +1,56 @@ |
|||||||
|
import ColumnsArea from './components/columns_area'; |
||||||
|
import Column from './components/column'; |
||||||
|
import Drawer from './components/drawer'; |
||||||
|
import ComposeFormContainer from './containers/compose_form_container'; |
||||||
|
import FollowFormContainer from './containers/follow_form_container'; |
||||||
|
import UploadFormContainer from './containers/upload_form_container'; |
||||||
|
import StatusListContainer from './containers/status_list_container'; |
||||||
|
import NotificationsContainer from './containers/notifications_container'; |
||||||
|
import NavigationContainer from './containers/navigation_container'; |
||||||
|
import PureRenderMixin from 'react-addons-pure-render-mixin'; |
||||||
|
import LoadingBar from 'react-redux-loading-bar'; |
||||||
|
|
||||||
|
const UI = React.createClass({ |
||||||
|
|
||||||
|
propTypes: { |
||||||
|
router: React.PropTypes.object |
||||||
|
}, |
||||||
|
|
||||||
|
mixins: [PureRenderMixin], |
||||||
|
|
||||||
|
render () { |
||||||
|
return ( |
||||||
|
<div style={{ flex: '0 0 auto', display: 'flex', width: '100%', height: '100%', background: '#1a1c23' }}> |
||||||
|
<Drawer> |
||||||
|
<div style={{ flex: '1 1 auto' }}> |
||||||
|
<NavigationContainer /> |
||||||
|
<ComposeFormContainer /> |
||||||
|
<UploadFormContainer /> |
||||||
|
</div> |
||||||
|
|
||||||
|
<FollowFormContainer /> |
||||||
|
</Drawer> |
||||||
|
|
||||||
|
<ColumnsArea> |
||||||
|
<Column icon='home' heading='Home'> |
||||||
|
<StatusListContainer type='home' /> |
||||||
|
</Column> |
||||||
|
|
||||||
|
<Column icon='at' heading='Mentions'> |
||||||
|
<StatusListContainer type='mentions' /> |
||||||
|
</Column> |
||||||
|
|
||||||
|
<Column> |
||||||
|
{this.props.children} |
||||||
|
</Column> |
||||||
|
</ColumnsArea> |
||||||
|
|
||||||
|
<NotificationsContainer /> |
||||||
|
<LoadingBar style={{ backgroundColor: '#2b90d9', left: '0', top: '0' }} /> |
||||||
|
</div> |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
}); |
||||||
|
|
||||||
|
export default UI; |
@ -1,14 +1,16 @@ |
|||||||
import { combineReducers } from 'redux-immutable'; |
import { combineReducers } from 'redux-immutable'; |
||||||
import timelines from './timelines'; |
import timelines from './timelines'; |
||||||
import meta from './meta'; |
import meta from './meta'; |
||||||
import compose from './compose'; |
import compose from './compose'; |
||||||
import follow from './follow'; |
import follow from './follow'; |
||||||
import notifications from './notifications'; |
import notifications from './notifications'; |
||||||
|
import { loadingBarReducer } from 'react-redux-loading-bar'; |
||||||
|
|
||||||
export default combineReducers({ |
export default combineReducers({ |
||||||
timelines, |
timelines, |
||||||
meta, |
meta, |
||||||
compose, |
compose, |
||||||
follow, |
follow, |
||||||
notifications |
notifications, |
||||||
|
loadingBar: loadingBarReducer, |
||||||
}); |
}); |
||||||
|
@ -1,7 +1,10 @@ |
|||||||
import { createStore, applyMiddleware, compose } from 'redux'; |
import { createStore, applyMiddleware, compose } from 'redux'; |
||||||
import thunk from 'redux-thunk'; |
import thunk from 'redux-thunk'; |
||||||
import appReducer from '../reducers'; |
import appReducer from '../reducers'; |
||||||
|
import { loadingBarMiddleware } from 'react-redux-loading-bar'; |
||||||
|
|
||||||
export default function configureStore(initialState) { |
export default function configureStore(initialState) { |
||||||
return createStore(appReducer, initialState, compose(applyMiddleware(thunk), window.devToolsExtension ? window.devToolsExtension() : f => f)); |
return createStore(appReducer, initialState, compose(applyMiddleware(thunk, loadingBarMiddleware({ |
||||||
} |
promiseTypeSuffixes: ['REQUEST', 'SUCCESS', 'FAIL'], |
||||||
|
})), window.devToolsExtension ? window.devToolsExtension() : f => f)); |
||||||
|
}; |
||||||
|
@ -1 +1 @@ |
|||||||
= react_component 'Root', default_props, class: 'app-holder', prerender: false |
= react_component 'Mastodon', default_props, class: 'app-holder', prerender: false |
||||||
|
Loading…
Reference in new issue