diff --git a/client/coral-admin/src/AppRouter.js b/client/coral-admin/src/AppRouter.js
new file mode 100644
index 000000000..40465bd19
--- /dev/null
+++ b/client/coral-admin/src/AppRouter.js
@@ -0,0 +1,23 @@
+import React from 'react'
+import { Router, Route, Redirect, IndexRoute, browserHistory } from 'react-router'
+
+import ModerationQueue from 'containers/ModerationQueue'
+import CommentStream from 'containers/CommentStream'
+import EmbedLink from 'components/EmbedLink'
+import Configure from 'containers/Configure'
+import CommunityContainer from 'containers/CommunityContainer'
+import LayoutContainer from 'containers/LayoutContainer'
+
+const routes = (
+
+
+
+
+
+
+
+)
+
+const AppRouter = () =>
+
+export default AppRouter
diff --git a/client/coral-admin/src/components/App.js b/client/coral-admin/src/components/App.js
index 81eea850f..1fbbe1448 100644
--- a/client/coral-admin/src/components/App.js
+++ b/client/coral-admin/src/components/App.js
@@ -1,24 +1,16 @@
-
import React from 'react'
import { Provider } from 'react-redux'
import 'material-design-lite'
-import { Router, Route, browserHistory } from 'react-router'
-import ModerationQueue from 'containers/ModerationQueue'
+import { Layout } from 'react-mdl'
import store from 'services/store'
-import CommentStream from 'containers/CommentStream'
-import EmbedLink from 'components/EmbedLink'
-import Configure from 'containers/Configure'
+
+import AppRouter from '../AppRouter'
export default class App extends React.Component {
render (props) {
return (
-
-
-
-
-
-
+
)
}
diff --git a/client/coral-admin/src/components/Header.js b/client/coral-admin/src/components/Header.js
deleted file mode 100644
index ea268108e..000000000
--- a/client/coral-admin/src/components/Header.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import React from 'react'
-import { Layout, Navigation, Drawer, Header } from 'react-mdl'
-import { Link } from 'react-router'
-import styles from './Header.css'
-import config from 'services/config'
-
-// App header. If we add a navbar it should be here
-export default (props) => (
-
-
-
- Moderate
- Configure
-
-
-
-
- Moderate
- Configure
-
-
- {props.children}
-
-)
diff --git a/client/coral-admin/src/components/Page.js b/client/coral-admin/src/components/Page.js
deleted file mode 100644
index 733cec677..000000000
--- a/client/coral-admin/src/components/Page.js
+++ /dev/null
@@ -1,12 +0,0 @@
-import React from 'react'
-import {Layout} from 'react-mdl'
-import 'material-design-lite'
-import Header from 'components/Header'
-
-export default (props) => (
-
-
-
-)
diff --git a/client/coral-admin/src/components/ui/Drawer.js b/client/coral-admin/src/components/ui/Drawer.js
new file mode 100644
index 000000000..b1c87baaf
--- /dev/null
+++ b/client/coral-admin/src/components/ui/Drawer.js
@@ -0,0 +1,14 @@
+import React from 'react'
+import { Navigation, Drawer } from 'react-mdl'
+import { Link } from 'react-router'
+import styles from './Header.css'
+
+export default () => (
+
+
+ Moderate
+ Community
+ Configure
+
+
+)
diff --git a/client/coral-admin/src/components/Header.css b/client/coral-admin/src/components/ui/Header.css
similarity index 100%
rename from client/coral-admin/src/components/Header.css
rename to client/coral-admin/src/components/ui/Header.css
diff --git a/client/coral-admin/src/components/ui/Header.js b/client/coral-admin/src/components/ui/Header.js
new file mode 100644
index 000000000..1455721d8
--- /dev/null
+++ b/client/coral-admin/src/components/ui/Header.js
@@ -0,0 +1,14 @@
+import React from 'react'
+import { Navigation, Header } from 'react-mdl'
+import { Link } from 'react-router'
+import styles from './Header.css'
+
+export default () => (
+
+
+ Moderate
+ Community
+ Configure
+
+
+)
diff --git a/client/coral-admin/src/components/ui/Layout.js b/client/coral-admin/src/components/ui/Layout.js
new file mode 100644
index 000000000..fd963b667
--- /dev/null
+++ b/client/coral-admin/src/components/ui/Layout.js
@@ -0,0 +1,12 @@
+import React from 'react'
+import { Layout as LayoutMDL} from 'react-mdl'
+import Header from './Header'
+import Drawer from './Drawer'
+
+export const Layout = ({ children }) => (
+
+
+
+ {children}
+
+)
\ No newline at end of file
diff --git a/client/coral-admin/src/containers/CommentStream.js b/client/coral-admin/src/containers/CommentStream.js
index 4f0a03698..33963f422 100644
--- a/client/coral-admin/src/containers/CommentStream.js
+++ b/client/coral-admin/src/containers/CommentStream.js
@@ -6,7 +6,6 @@ import { connect } from 'react-redux'
import { createComment, flagComment } from 'actions/comments'
import CommentList from 'components/CommentList'
import CommentBox from 'components/CommentBox'
-import Page from 'components/Page'
/**
* Renders a comment stream using a CommentList component
@@ -44,19 +43,17 @@ class CommentStream extends React.Component {
// Render the comment box along with the CommentList
render ({ comments }, { snackbar, snackbarMsg }) {
return (
-
-
-
-
- {snackbarMsg}
-
-
+
+
+
+ {snackbarMsg}
+
)
}
}
diff --git a/client/coral-admin/src/containers/CommunityContainer.js b/client/coral-admin/src/containers/CommunityContainer.js
new file mode 100644
index 000000000..bd13ca04b
--- /dev/null
+++ b/client/coral-admin/src/containers/CommunityContainer.js
@@ -0,0 +1,14 @@
+import React, { Component } from 'react'
+import { connect } from 'react-redux'
+import I18n from 'coral-framework/i18n/i18n'
+import translations from '../translations'
+
+export default class CommunityContainer extends Component {
+ render() {
+ return (
+
+
Community
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/client/coral-admin/src/containers/Configure.js b/client/coral-admin/src/containers/Configure.js
index f90e8c747..5c86019c8 100644
--- a/client/coral-admin/src/containers/Configure.js
+++ b/client/coral-admin/src/containers/Configure.js
@@ -10,7 +10,6 @@ import {
Button,
Icon
} from 'react-mdl'
-import Page from 'components/Page'
import styles from './Configure.css'
import I18n from 'coral-framework/i18n/i18n'
import translations from '../translations'
@@ -78,7 +77,6 @@ class Configure extends React.Component {
: 'Embed Comment Stream'
return (
-
@@ -106,7 +104,6 @@ class Configure extends React.Component {
}
-
)
}
}
diff --git a/client/coral-admin/src/containers/LayoutContainer.js b/client/coral-admin/src/containers/LayoutContainer.js
new file mode 100644
index 000000000..7373c30c2
--- /dev/null
+++ b/client/coral-admin/src/containers/LayoutContainer.js
@@ -0,0 +1,19 @@
+import React, { Component }from 'react'
+import { connect } from 'react-redux'
+
+import { Layout } from '../components/ui/Layout'
+
+class LayoutContainer extends Component {
+ render () {
+ return
+ }
+}
+
+LayoutContainer.propTypes = {}
+
+const mapStateToProps = state => ({ data: {} })
+
+const mapDispatchToProps = (dispatch, ownProps) => ({ dispatch })
+
+export default connect(mapStateToProps, mapDispatchToProps)(LayoutContainer)
+
diff --git a/client/coral-admin/src/containers/ModerationQueue.js b/client/coral-admin/src/containers/ModerationQueue.js
index 061786543..d051e5639 100644
--- a/client/coral-admin/src/containers/ModerationQueue.js
+++ b/client/coral-admin/src/containers/ModerationQueue.js
@@ -2,7 +2,6 @@
import React from 'react'
import { connect } from 'react-redux'
import ModerationKeysModal from 'components/ModerationKeysModal'
-import Page from 'components/Page'
import CommentList from 'components/CommentList'
import { updateStatus } from 'actions/comments'
import styles from './ModerationQueue.css'
@@ -20,8 +19,6 @@ class ModerationQueue extends React.Component {
constructor (props) {
super(props)
- console.log('ModerationQueue', props)
-
this.state = { activeTab: 'pending', singleView: false, modalOpen: false }
}
@@ -60,10 +57,9 @@ class ModerationQueue extends React.Component {
render () {
const { comments } = this.props
const { activeTab, singleView, modalOpen } = this.state
- console.log('moderation queue', styles)
return (
-
+
)
}
}
diff --git a/views/admin.ejs b/views/admin.ejs
index 9b5fe84bf..038fb58d7 100644
--- a/views/admin.ejs
+++ b/views/admin.ejs
@@ -10,8 +10,8 @@
body, #root {
width: 100%;
height: 100%;
- margin: 0;
- background: #fff;
+ margin: 0;
+ background: #fff;
}
diff --git a/views/admin.ejs~HEAD b/views/admin.ejs~HEAD
new file mode 100644
index 000000000..038fb58d7
--- /dev/null
+++ b/views/admin.ejs~HEAD
@@ -0,0 +1,22 @@
+
+
+
+
+
+
Talk - Coral Admin
+
+
+
+
+
+
+
+
+
diff --git a/webpack.config.js b/webpack.config.js
index d28ca9d14..434da160d 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -7,7 +7,8 @@ devConfig.devtool = null;
devConfig.plugins = devConfig.plugins.concat([
new webpack.DefinePlugin({
'process.env': {
- 'NODE_ENV': JSON.stringify('production')
+ 'NODE_ENV': `"${'production'}"`,
+ 'VERSION': `"${require('./package.json')}"`
}
}),
new webpack.optimize.UglifyJsPlugin({