@@ -146,16 +232,14 @@ class PostRelativeTime extends React.PureComponent {
}
render() {
- const { post, showPublishedStatus } = this.props;
+ const { showPublishedStatus, post } = this.props;
const timeText = this.getTimeText();
- const statusText = this.getStatusText();
- const relativeTimeClass = timeText ? 'post-relative-time-status' : null;
- const time = this.getTimestamp();
-
let innerText = (
- { timeText }
- { ( post.status === 'future' || showPublishedStatus ) && statusText }
+ { showPublishedStatus ? this.getStatus() : timeText }
+ { post.status === 'pending' && this.getPendingLabel() }
+ { post.status === 'private' && this.getPrivateLabel() }
+ { post.sticky && this.getStickyLabel() }
);
@@ -174,6 +258,8 @@ class PostRelativeTime extends React.PureComponent {
);
}
+ const relativeTimeClass = timeText ? 'post-relative-time-status' : null;
+ const time = this.getTimestamp();
return (
{ innerText }
diff --git a/client/my-sites/post-relative-time-status/style.scss b/client/my-sites/post-relative-time-status/style.scss
index 1518eea4c7611..7efc8321a5124 100644
--- a/client/my-sites/post-relative-time-status/style.scss
+++ b/client/my-sites/post-relative-time-status/style.scss
@@ -21,6 +21,9 @@
.is-trash {
color: var( --color-error );
}
+ .is-private {
+ color: var( --color-primary-dark );
+ }
}
a.post-relative-time-status__link {