moved connected components to containers folder

This commit is contained in:
bill bittner 2018-03-07 20:31:10 -08:00
parent 1a5a1ba11e
commit 4f26857ed5
23 changed files with 62 additions and 64 deletions

View file

@ -1,5 +1,5 @@
import React from 'react'; import React from 'react';
import ProgressBar from 'components/ProgressBar'; import ProgressBar from 'components/ProgressBar/index';
import { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states'; import { LOCAL_CHECK, UNAVAILABLE, ERROR, AVAILABLE } from 'constants/asset_display_states';
class AssetDisplay extends React.Component { class AssetDisplay extends React.Component {

View file

@ -3,9 +3,7 @@ import View from './view';
import { selectAsset } from 'selectors/show'; import { selectAsset } from 'selectors/show';
const mapStateToProps = ({ show }) => { const mapStateToProps = ({ show }) => {
// select title
const { claimData: { title } } = selectAsset(show); const { claimData: { title } } = selectAsset(show);
// return props
return { return {
title, title,
}; };

View file

@ -24,7 +24,7 @@ class ChannelClaimsDisplay extends React.Component {
render () { render () {
const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props; const { channel: { claimsData: { claims, currentPage, totalPages } } } = this.props;
return ( return (
<div className="row row--tall"> <div className='row row--tall'>
{(claims.length > 0) ? ( {(claims.length > 0) ? (
<div> <div>
{claims.map((claim, index) => <AssetPreview {claims.map((claim, index) => <AssetPreview

View file

@ -54,15 +54,15 @@ class NavBar extends React.Component {
} }
render () { render () {
return ( return (
<div className="row row--wide nav-bar"> <div className='row row--wide nav-bar'>
<div className="row row--padded row--short flex-container--row flex-container--space-between-center"> <div className='row row--padded row--short flex-container--row flex-container--space-between-center'>
<Logo /> <Logo />
<div className="nav-bar--center"> <div className='nav-bar--center'>
<span className="nav-bar-tagline">Open-source, decentralized image and video sharing.</span> <span className='nav-bar-tagline'>Open-source, decentralized image and video sharing.</span>
</div> </div>
<div className="nav-bar--right"> <div className='nav-bar--right'>
<NavLink className="nav-bar-link link--nav" activeClassName="link--nav-active" to="/" exact={true}>Publish</NavLink> <NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/' exact>Publish</NavLink>
<NavLink className="nav-bar-link link--nav" activeClassName="link--nav-active" to="/about">About</NavLink> <NavLink className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/about'>About</NavLink>
{ this.props.channelName ? ( { this.props.channelName ? (
<NavBarChannelDropdown <NavBarChannelDropdown
channelName={this.props.channelName} channelName={this.props.channelName}
@ -72,7 +72,7 @@ class NavBar extends React.Component {
LOGOUT={LOGOUT} LOGOUT={LOGOUT}
/> />
) : ( ) : (
<NavLink id="nav-bar-login-link" className="nav-bar-link link--nav" activeClassName="link--nav-active" to="/login">Channel</NavLink> <NavLink id='nav-bar-login-link' className='nav-bar-link link--nav' activeClassName='link--nav-active' to='/login'>Channel</NavLink>
)} )}
</div> </div>
</div> </div>

View file

@ -24,48 +24,48 @@ class PublishMetadataInputs extends React.Component {
} }
render () { render () {
return ( return (
<div id="publish-details" className="row row--padded row--no-top row--wide"> <div id='publish-details' className='row row--padded row--no-top row--wide'>
{this.props.showMetadataInputs && ( {this.props.showMetadataInputs && (
<div> <div>
<div className="row row--no-top"> <div className='row row--no-top'>
<div className="column column--3 column--med-10 align-content-top"> <div className='column column--3 column--med-10 align-content-top'>
<label htmlFor="publish-license" className="label">Description:</label> <label htmlFor='publish-license' className='label'>Description:</label>
</div><div className="column column--7 column--sml-10"> </div><div className='column column--7 column--sml-10'>
<ExpandingTextArea <ExpandingTextArea
id="publish-description" id='publish-description'
className="textarea textarea--primary textarea--full-width" className='textarea textarea--primary textarea--full-width'
rows={1} rows={1}
maxLength={2000} maxLength={2000}
style={{ maxHeight: 200 }} style={{ maxHeight: 200 }}
name="description" name='description'
placeholder="Optional description" placeholder='Optional description'
value={this.props.description} value={this.props.description}
onChange={this.handleInput} /> onChange={this.handleInput} />
</div> </div>
</div> </div>
<div className="row row--no-top"> <div className='row row--no-top'>
<div className="column column--3 column--med-10"> <div className='column column--3 column--med-10'>
<label htmlFor="publish-license" className="label">License:</label> <label htmlFor='publish-license' className='label'>License:</label>
</div><div className="column column--7 column--sml-10"> </div><div className='column column--7 column--sml-10'>
<select type="text" name="license" id="publish-license" className="select select--primary" onChange={this.handleSelect}> <select type='text' name='license' id='publish-license' className='select select--primary' onChange={this.handleSelect}>
<option value=" ">Unspecified</option> <option value=' '>Unspecified</option>
<option value="Public Domain">Public Domain</option> <option value='Public Domain'>Public Domain</option>
<option value="Creative Commons">Creative Commons</option> <option value='Creative Commons'>Creative Commons</option>
</select> </select>
</div> </div>
</div> </div>
<div className="row row--no-top"> <div className='row row--no-top'>
<div className="column column--3"> <div className='column column--3'>
<label htmlFor="publish-nsfw" className="label">Mature:</label> <label htmlFor='publish-nsfw' className='label'>Mature:</label>
</div><div className="column column--7"> </div><div className='column column--7'>
<input className="input-checkbox" type="checkbox" id="publish-nsfw" name="nsfw" value={this.props.nsfw} onChange={this.handleInput} /> <input className='input-checkbox' type='checkbox' id='publish-nsfw' name='nsfw' value={this.props.nsfw} onChange={this.handleInput} />
</div> </div>
</div> </div>
</div> </div>
)} )}
<button className="button--secondary" onClick={this.toggleShowInputs}>{this.props.showMetadataInputs ? 'less' : 'more'}</button> <button className='button--secondary' onClick={this.toggleShowInputs}>{this.props.showMetadataInputs ? 'less' : 'more'}</button>
</div> </div>
); );
} }

View file

@ -12,7 +12,7 @@ class PublishTitleInput extends React.Component {
} }
render () { render () {
return ( return (
<input type="text" id="publish-title" className="input-text text--large input-text--full-width" name="title" placeholder="Give your post a title..." onChange={this.handleInput} value={this.props.title}/> <input type='text' id='publish-title' className='input-text text--large input-text--full-width' name='title' placeholder='Give your post a title...' onChange={this.handleInput} value={this.props.title} />
); );
} }
} }

View file

@ -1,10 +1,10 @@
import React from 'react'; import React from 'react';
import SEO from 'components/SEO'; import SEO from 'components/SEO/index';
import NavBar from 'containers/NavBar'; import NavBar from 'containers/NavBar/index';
import ErrorPage from 'components/ErrorPage'; import ErrorPage from 'components/ErrorPage/index';
import AssetTitle from 'components/AssetTitle'; import AssetTitle from 'containers/AssetTitle/index';
import AssetDisplay from 'components/AssetDisplay'; import AssetDisplay from 'containers/AssetDisplay/index';
import AssetInfo from 'components/AssetInfo'; import AssetInfo from 'containers/AssetInfo/index';
class ShowAssetDetails extends React.Component { class ShowAssetDetails extends React.Component {
render () { render () {

View file

@ -1,7 +1,7 @@
import React from 'react'; import React from 'react';
import SEO from 'components/SEO'; import SEO from 'components/SEO/index';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import AssetDisplay from 'components/AssetDisplay'; import AssetDisplay from 'containers/AssetDisplay/index';
class ShowLite extends React.Component { class ShowLite extends React.Component {
render () { render () {

View file

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import SEO from 'components/SEO'; import SEO from 'components/SEO/index';
import ErrorPage from 'components/ErrorPage'; import ErrorPage from 'components/ErrorPage/index';
import NavBar from 'containers/NavBar'; import NavBar from 'containers/NavBar/index';
import ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay'; import ChannelClaimsDisplay from 'containers/ChannelClaimsDisplay/index';
class ShowChannel extends React.Component { class ShowChannel extends React.Component {
render () { render () {

View file

@ -1,8 +1,8 @@
import React from 'react'; import React from 'react';
import ErrorPage from 'components/ErrorPage'; import ErrorPage from 'components/ErrorPage';
import ShowAssetLite from 'components/ShowAssetLite'; import ShowAssetLite from 'containers/ShowAssetLite';
import ShowAssetDetails from 'components/ShowAssetDetails'; import ShowAssetDetails from 'containers/ShowAssetDetails';
import ShowChannel from 'components/ShowChannel'; import ShowChannel from 'containers/ShowChannel';
import { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types'; import { CHANNEL, ASSET_LITE, ASSET_DETAILS } from 'constants/show_request_types';