diff --git a/webapp/app.jsx b/webapp/app.jsx index 96aa233..461eea3 100644 --- a/webapp/app.jsx +++ b/webapp/app.jsx @@ -28,6 +28,7 @@ var Settings = require('settings.jsx')(boards) var Profile = require('profile.jsx')(boards) var Board = require('board.jsx')(boards) var PostPage = require('postpage.jsx')(boards) +var CommentPage = require('commentpage.jsx')(boards) // Define Main Components @@ -81,12 +82,15 @@ ReactDOM.render( - - + + - + + + + diff --git a/webapp/components/clock.jsx b/webapp/components/clock.jsx index 798ba39..2c241a8 100644 --- a/webapp/components/clock.jsx +++ b/webapp/components/clock.jsx @@ -30,6 +30,6 @@ module.exports = React.createClass({ return }, render: function(){ - return
{this.getDate()}
+ return
{this.getDate()}
} }) diff --git a/webapp/components/comment.jsx b/webapp/components/comment.jsx index b999ed9..f4dee22 100644 --- a/webapp/components/comment.jsx +++ b/webapp/components/comment.jsx @@ -2,6 +2,7 @@ var React = require('react') var Markdown = require('markdown.jsx') var Icon = require('icon.jsx') var Clock = require('clock.jsx') +var Link = require('react-router').Link module.exports = function(boardsAPI){ var UserID = require('userID.jsx')(boardsAPI) @@ -14,6 +15,20 @@ module.exports = function(boardsAPI){ if(this.isMounted()) this.setState({ moment: require('moment') }) }) }, + getPermalink: function(){ + if(this.props.adminID && this.props.board && this.props.post && this.props.comment.hash){ + return
+ Permalink +
+ } + }, + getParentlink: function(){ + if(this.props.showParent && this.props.comment.parent && this.props.comment.parent !== this.props.post){ + return
+ Parent +
+ } + }, render: function(){ if(this.props.comment){ var Comments = this.props.comment.comments || require('comments.jsx')(boardsAPI) @@ -21,9 +36,11 @@ module.exports = function(boardsAPI){
+ {this.getPermalink()} + {this.getParentlink()}
- +
} else { return

Invalid Comment
diff --git a/webapp/components/comments.jsx b/webapp/components/comments.jsx index f898ad6..b2ebc24 100644 --- a/webapp/components/comments.jsx +++ b/webapp/components/comments.jsx @@ -22,7 +22,7 @@ module.exports = function(boardsAPI){ }, getComments: function(){ if(this.state.comments.length > 0) - return this.state.comments.map(cmnt => () ) + return this.state.comments.map(cmnt => () ) else return
}, render: function(){ diff --git a/webapp/components/postpage.jsx b/webapp/components/postpage.jsx index eea44ab..411c571 100644 --- a/webapp/components/postpage.jsx +++ b/webapp/components/postpage.jsx @@ -35,7 +35,7 @@ module.exports = function(boardsAPI){ } }) }, - getContext(){ + getContext: function(){ if(this.props.params.userid){ if(this.props.params.boardname) return
Posted by in #{this.props.params.boardname}
@@ -50,7 +50,7 @@ module.exports = function(boardsAPI){ {this.getContext()} - + else return } diff --git a/webapp/style.css b/webapp/style.css index 3f45bef..c5b9e44 100644 --- a/webapp/style.css +++ b/webapp/style.css @@ -20,7 +20,7 @@ a { text-decoration: none; } -.clock { +.inline { display: inline } @@ -83,19 +83,19 @@ a:hover { margin: 2rem; } -.post .icons .fa, .comment .icons .fa { +.icons .fa, .comment .icons .fa { color: #707070; } -.post .icons .a { +.icons .a { color: #707070; } -.post .icons .user-id { - display: inline-block; +.icons .user-id { + display: inline; } -.post .icons .not-first{ +.icons .not-first{ margin-left: 1rem; } @@ -103,6 +103,10 @@ a:hover { display: inline } +.comment-page .user-id { + display: inline +} + .comment .icons { margin-bottom: 1rem; }