mirror of
https://github.com/gurnec/removeddit.git
synced 2026-03-11 08:54:27 +00:00
Added 'you are vering a single comment' and link to full thread
This commit is contained in:
parent
6cbbb528d6
commit
2d45e9295f
6 changed files with 30 additions and 6 deletions
2
TODO
2
TODO
|
|
@ -5,5 +5,3 @@ make sort/filter state local
|
|||
old.removeddit.com
|
||||
|
||||
take utc from thread and limit pushshift comments
|
||||
|
||||
rename show to filter
|
||||
8
dist/main.css
vendored
8
dist/main.css
vendored
|
|
@ -277,6 +277,14 @@ header {
|
|||
color: #828282;
|
||||
margin-right: 4px; }
|
||||
|
||||
.view-rest-of-comment {
|
||||
background-color: #264d73;
|
||||
border-color: #2966a3;
|
||||
font-size: 13px;
|
||||
padding: 10px;
|
||||
color: #cccccc;
|
||||
margin-bottom: 10px; }
|
||||
|
||||
.post-rank {
|
||||
min-width: 20px;
|
||||
color: #505050;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "removeddit",
|
||||
"version": "1.1.2",
|
||||
"version": "1.1.3",
|
||||
"description": "View removed comments from reddit",
|
||||
"main": "src/index.js",
|
||||
"repository": {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { prettyScore, prettyDate, parse } from '../../utils'
|
||||
|
||||
const Comment = (props) => {
|
||||
|
|
@ -34,7 +35,7 @@ const Comment = (props) => {
|
|||
</div>
|
||||
<div className='comment-body' dangerouslySetInnerHTML={{ __html: innerHTML }} />
|
||||
<div className='comment-links'>
|
||||
<a href={permalink}>permalink</a>
|
||||
<Link to={permalink}>permalink</Link>
|
||||
<a href={`https://www.reddit.com${permalink}`}>reddit</a>
|
||||
<a href={`https://snew.github.io${permalink}`}>ceddit</a>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import React from 'react'
|
||||
import { Link } from 'react-router-dom'
|
||||
import {
|
||||
getPost,
|
||||
getComments as getRedditComments
|
||||
|
|
@ -99,9 +100,11 @@ class Thread extends React.Component {
|
|||
|
||||
render () {
|
||||
let root = this.state.post.id
|
||||
let isSingleComment = false
|
||||
|
||||
if (this.props.match.params.commentID !== undefined) {
|
||||
root = this.props.match.params.commentID
|
||||
isSingleComment = true
|
||||
}
|
||||
|
||||
return (
|
||||
|
|
@ -116,6 +119,12 @@ class Thread extends React.Component {
|
|||
deleted={this.state.deleted.length}
|
||||
/>
|
||||
<SortBy />
|
||||
{isSingleComment &&
|
||||
<div class='view-rest-of-comment'>
|
||||
<div>you are viewing a single comment's thread.</div>
|
||||
<Link to={this.state.post.permalink}>view the rest of the comments</Link>
|
||||
</div>
|
||||
}
|
||||
<CommentSection
|
||||
root={root}
|
||||
comments={this.state.pushshiftComments}
|
||||
|
|
|
|||
|
|
@ -127,9 +127,17 @@
|
|||
color: #828282
|
||||
font-size: 10px
|
||||
margin: 4px 0
|
||||
|
||||
|
||||
.grey-link, .grey-link:link, .grey-link:visited, .grey-link:hover, .grey-link:focus, .grey-link:active
|
||||
color: #828282
|
||||
margin-right: 4px
|
||||
|
||||
|
||||
|
||||
.view-rest-of-comment
|
||||
background-color: #264d73
|
||||
border-color: #2966a3
|
||||
font-size: 13px
|
||||
padding: 10px
|
||||
color: rgb(204, 204, 204)
|
||||
margin-bottom: 10px
|
||||
|
||||
Loading…
Reference in a new issue