javascript: glitch: start rendering quotes

feature/quote
Ariadne Conill 2022-12-25 21:11:11 +00:00
parent 5be6a59f80
commit 005256ae8c
2 changed files with 19 additions and 0 deletions

View File

@ -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}`}

View File

@ -77,6 +77,7 @@
}
}
.status__quote,
.status__content__text,
.e-content {
overflow: hidden;