add link to replies rss

This commit is contained in:
igoradamenko
2019-01-07 00:38:42 +02:00
parent 3f6c5dbd19
commit 88184fbc54
2 changed files with 12 additions and 5 deletions
+9 -4
View File
@@ -10,6 +10,7 @@ import TextareaAutosize from 'components/input/textarea-autosize';
const RSS_THREAD_URL = `${BASE_URL}${API_BASE}/rss/post?site=${siteId}&url=${url}`;
const RSS_SITE_URL = `${BASE_URL}${API_BASE}/rss/site?site=${siteId}`;
const RSS_REPLIES_URL = `${BASE_URL}${API_BASE}/rss/reply?site=${siteId}&user=`;
export default class Input extends Component {
constructor(props) {
@@ -109,7 +110,7 @@ export default class Input extends Component {
render(props, { isDisabled, isErrorShown, preview, maxLength, text }) {
const charactersLeft = maxLength - text.length;
const { mods = {}, errorMessage } = props;
const { mods = {}, errorMessage, userId } = props;
return (
<form className={b('input', props)} onSubmit={this.send} aria-label="New comment">
@@ -156,14 +157,18 @@ export default class Input extends Component {
</a>{' '}
is supported
</div>
Subscribe to&nbsp;this{' '}
Subscribe to&nbsp;the{' '}
<a className="input__rss-link" href={RSS_THREAD_URL} target="_blank">
Thread
</a>{' '}
or&nbsp;
</a>
{', '}
<a className="input__rss-link" href={RSS_SITE_URL} target="_blank">
Site
</a>{' '}
or&nbsp;
<a className="input__rss-link" href={RSS_REPLIES_URL + userId} target="_blank">
Replies
</a>{' '}
by&nbsp;RSS
</div>
)}
+3 -1
View File
@@ -299,7 +299,9 @@ export default class Root extends Component {
{!isBlockedVisible && (
<div className="root__main">
{!isGuest &&
!isCommentsDisabled && <Input mix="root__input" mods={{ type: 'main' }} onSubmit={this.addComment} />}
!isCommentsDisabled && (
<Input mix="root__input" mods={{ type: 'main' }} onSubmit={this.addComment} userId={user.id} />
)}
{!!pinnedComments.length && (
<div className="root__pinned-comments" role="region" aria-label="Pinned comments">