comment intro #2622
5 changed files with 64 additions and 48 deletions
|
@ -36,48 +36,54 @@ export function CommentCreate(props: Props) {
|
|||
}
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<section>
|
||||
{commentAck !== true && (
|
||||
<section>
|
||||
<div className="card__content">
|
||||
<div className="media__title">About comments..</div>
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<div className="media__subtitle">I acknowledge something.</div>
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<Button button="primary" onClick={handleCommentAck} label={__('Got it!')} />
|
||||
</div>
|
||||
</section>
|
||||
<div className="card__content markdown-preview">
|
||||
<p>{__('A few things to know before participating in the comment alpha:')}</p>
|
||||
<ul>
|
||||
<li>
|
||||
{__('During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.')}
|
||||
</li>
|
||||
<li>
|
||||
{__(
|
||||
'During the alpha, comments are not decentralized or censorship resistant (but we repeat ourselves).'
|
||||
)}
|
||||
</li>
|
||||
<li>
|
||||
{__(
|
||||
'When the alpha ends, we will attempt to transition comments, but do not promise to do so. Any transition will likely involve publishing previous comments under a single archive handle.'
|
||||
)}
|
||||
</li>
|
||||
</ul>
|
||||
<Button button="primary" onClick={handleCommentAck} label={__('Got it!')} />
|
||||
</div>
|
||||
)}
|
||||
{commentAck === true && (
|
||||
<section>
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className="card__content">
|
||||
<ChannelSection channel={channel} onChannelChange={handleChannelChange} />
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<FormField
|
||||
disabled={channel === CHANNEL_NEW}
|
||||
type="textarea"
|
||||
name="content_description"
|
||||
label={__('Comment')}
|
||||
placeholder={__('Your comment')}
|
||||
value={commentValue}
|
||||
onChange={handleCommentChange}
|
||||
/>
|
||||
</div>
|
||||
<div className="card__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
disabled={channel === CHANNEL_NEW || !commentValue.length}
|
||||
type="submit"
|
||||
label={__('Post')}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
</section>
|
||||
<Form onSubmit={handleSubmit}>
|
||||
<div className="card__content">
|
||||
<ChannelSection channel={channel} onChannelChange={handleChannelChange} />
|
||||
</div>
|
||||
<div className="card__content">
|
||||
<FormField
|
||||
disabled={channel === CHANNEL_NEW}
|
||||
type="textarea"
|
||||
name="content_description"
|
||||
label={__('Comment')}
|
||||
placeholder={__('Your comment')}
|
||||
value={commentValue}
|
||||
onChange={handleCommentChange}
|
||||
/>
|
||||
</div>
|
||||
<div className="card__actions">
|
||||
<Button
|
||||
button="primary"
|
||||
disabled={channel === CHANNEL_NEW || !commentValue.length}
|
||||
type="submit"
|
||||
label={__('Post')}
|
||||
/>
|
||||
</div>
|
||||
</Form>
|
||||
)}
|
||||
</React.Fragment>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -291,7 +291,9 @@ class FilePage extends React.Component<Props> {
|
|||
<ClaimTags uri={uri} type="large" />
|
||||
<FileDetails uri={uri} />
|
||||
|
||||
<div className="media__info-title">{__('Comments')}</div>
|
||||
<div className="media__info-title">
|
||||
{__('Comments')} <span className="badge badge--alert">ALPHA</span>
|
||||
</div>
|
||||
<CommentCreate uri={uri} />
|
||||
<CommentsList uri={uri} />
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
@import '~@lbry/components/sass/badge/_index.scss';
|
||||
|
||||
.badge {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.badge--tag {
|
||||
@extend .badge;
|
||||
background-color: lighten($lbry-teal-5, 55%);
|
||||
|
|
|
@ -179,12 +179,6 @@
|
|||
margin-bottom: var(--spacing-small);
|
||||
}
|
||||
|
||||
.badge {
|
||||
bottom: -0.12rem;
|
||||
position: relative;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
[data-mode='dark'] & {
|
||||
background-color: darken($lbry-gray-5, 20%);
|
||||
}
|
||||
|
|
|
@ -530,5 +530,15 @@
|
|||
"Got it": "Got it",
|
||||
"View Your Feed": "View Your Feed",
|
||||
"View Your Channels": "View Your Channels",
|
||||
"Unfollow": "Unfollow"
|
||||
}
|
||||
"Unfollow": "Unfollow",
|
||||
"myChannelName": "myChannelName",
|
||||
"This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.": "This LBC remains yours. It is a deposit to reserve the name and can be undone at any time.",
|
||||
"Create channel": "Create channel",
|
||||
"Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.": "Uh oh. The flux in our Retro Encabulator must be out of whack. Try refreshing to fix it.",
|
||||
"If you still have issues, your anti-virus software or firewall may be preventing startup.": "If you still have issues, your anti-virus software or firewall may be preventing startup.",
|
||||
"Reach out to hello@lbry.com for help, or check out": "Reach out to hello@lbry.com for help, or check out",
|
||||
"A few things to know before participating in the comment alpha:": "A few things to know before participating in the comment alpha:",
|
||||
"During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.": "During the alpha, all comments are sent to a LBRY, Inc. server, not the LBRY network itself.",
|
||||
"During the alpha, comments are not decentralized or censorship resistant (but we repeat ourselves).": "During the alpha, comments are not decentralized or censorship resistant (but we repeat ourselves).",
|
||||
"When the alpha ends, we will attempt to transition comments, but do not promise to do so. Any transition will likely involve publishing previous comments under a single archive handle.": "When the alpha ends, we will attempt to transition comments, but do not promise to do so. Any transition will likely involve publishing previous comments under a single archive handle."
|
||||
}
|
Loading…
Add table
Reference in a new issue