aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Renard 2019-09-15 21:37:33 -0300
committerLibravatar Renard 2019-09-15 21:37:33 -0300
commitc643e5a6a4d2e97d8986245898b84f32e91c70c1 (patch)
tree9215bb4572cd56a0f885151af75d306683a75ba5
parent9ac9b9805779a504c9904bb6e81b579cfdb79c28 (diff)
downloadbai-client-c643e5a6a4d2e97d8986245898b84f32e91c70c1.tar.gz
bai-client-c643e5a6a4d2e97d8986245898b84f32e91c70c1.tar.xz
bai-client-c643e5a6a4d2e97d8986245898b84f32e91c70c1.zip
Manejo de post eliminados
-rw-r--r--src/App.css5
-rw-r--r--src/Post.js17
-rw-r--r--src/Thread.js6
3 files changed, 21 insertions, 7 deletions
diff --git a/src/App.css b/src/App.css
index 9777452..16aba4d 100644
--- a/src/App.css
+++ b/src/App.css
@@ -72,4 +72,9 @@
.ui.comments {
max-width: none !important;
+}
+
+.deleted {
+ color: rgba(0, 0, 0, 0.4);
+ font-style: italic;
} \ No newline at end of file
diff --git a/src/Post.js b/src/Post.js
index e175f91..3ff524b 100644
--- a/src/Post.js
+++ b/src/Post.js
@@ -15,7 +15,20 @@ const ImageModal = ({ href, trigger }) => (
const Post = ({ index, post, locked, dir, threadId }) => {
if (post.IS_DELETED > 0) {
- return null;
+ return (
+ <Comment>
+ <Comment.Avatar src={`https://bienvenidoainternet.org/static/css/img/picnicbdy.gif`} />
+ <Comment.Content>
+ <Comment.Author as='a'>#{index + 1}</Comment.Author>
+ <Comment.Metadata>
+ <div><Moment fromNow unix locale="es" date={post.timestamp} /></div>
+ </Comment.Metadata>
+ <Comment.Text>
+ <span className="deleted">Eliminado por el {post.IS_DELETED === 1 ? "usuario." : "Staff."}</span>
+ </Comment.Text>
+ </Comment.Content>
+ </Comment>
+ );
}
console.log(post);
const filesize = require('filesize');
@@ -33,7 +46,7 @@ const Post = ({ index, post, locked, dir, threadId }) => {
<Comment.Author as='a'>#{index + 1} <span className={post.email === "sage" ? "username sage" : "username"}>{post.name}</span><span className="tripcode">{post.tripcode}</span></Comment.Author>
<Comment.Metadata>
<div><Moment fromNow unix locale="es" date={post.timestamp} /></div>
- <div><Icon name="star" />{user_id}</div>
+ <div><Icon name="star" color={user_id === "CAP_USER*" ? "yellow" : "grey"} />{user_id}</div>
</Comment.Metadata>
<Comment.Text>
{post.file !== "" ?
diff --git a/src/Thread.js b/src/Thread.js
index eb9d63a..be73903 100644
--- a/src/Thread.js
+++ b/src/Thread.js
@@ -76,11 +76,7 @@ class Thread extends Component {
<Comment.Group>
{posts.map((post, index) =>
- post.IS_DELETED === 0 ?
- (<Post key={index} index={index} post={post} locked={locked} dir={this.props.dir} threadId={id} />) :
- (<Segment secondary>
- #{index} Eliminado <Moment fromNow unix locale="es" date={post.timestamp} />
- </Segment>)
+ <Post key={index} index={index} post={post} locked={locked} dir={this.props.dir} threadId={id} />
)
}
</Comment.Group>