javascript: glitch: start rendering quotes
parent
5be6a59f80
commit
005256ae8c
|
@ -275,6 +275,21 @@ export default class StatusContent extends React.PureComponent {
|
|||
'status__content--with-spoiler': status.get('spoiler_text').length > 0,
|
||||
});
|
||||
|
||||
let quote = '';
|
||||
|
||||
if (status.get('quote', null) !== null) {
|
||||
let quoteStatus = status.get('quote');
|
||||
let quoteStatusContent = { __html: quoteStatus.get('contentHtml') };
|
||||
|
||||
quote = (
|
||||
<div class="status__quote">
|
||||
<blockquote>
|
||||
<div dangerouslySetInnerHTML={quoteStatusContent} />
|
||||
</blockquote>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (status.get('spoiler_text').length > 0) {
|
||||
let mentionsPlaceholder = '';
|
||||
|
||||
|
@ -340,6 +355,7 @@ export default class StatusContent extends React.PureComponent {
|
|||
{mentionsPlaceholder}
|
||||
|
||||
<div className={`status__content__spoiler ${!hidden ? 'status__content__spoiler--visible' : ''}`}>
|
||||
{quote}
|
||||
<div
|
||||
ref={this.setContentsRef}
|
||||
key={`contents-${tagLinks}`}
|
||||
|
@ -365,6 +381,7 @@ export default class StatusContent extends React.PureComponent {
|
|||
onMouseUp={this.handleMouseUp}
|
||||
tabIndex='0'
|
||||
>
|
||||
{quote}
|
||||
<div
|
||||
ref={this.setContentsRef}
|
||||
key={`contents-${tagLinks}-${rewriteMentions}`}
|
||||
|
@ -385,6 +402,7 @@ export default class StatusContent extends React.PureComponent {
|
|||
className='status__content'
|
||||
tabIndex='0'
|
||||
>
|
||||
{quote}
|
||||
<div
|
||||
ref={this.setContentsRef}
|
||||
key={`contents-${tagLinks}`}
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.status__quote,
|
||||
.status__content__text,
|
||||
.e-content {
|
||||
overflow: hidden;
|
||||
|
|
Loading…
Reference in New Issue