diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2022-03-09 21:15:24 +0100 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-03-10 11:30:48 +0100 |
commit | 2c5faa55949153ab34790af04042f0ee621ed053 (patch) | |
tree | 349d252107c42b8c301c0a118e928e81786f8797 /app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js | |
parent | 8b69634ab8791753339492cc4fd76892e7e99492 (diff) |
[Glitch] Add polls and media attachments to edit comparison modal in web UI
Port 9f2791eb64d5d19418561270f79071c185876d20 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
Diffstat (limited to 'app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js')
-rw-r--r-- | app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js index 198443221..8fd528da0 100644 --- a/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js +++ b/app/javascript/flavours/glitch/features/ui/components/compare_history_modal.js @@ -9,6 +9,7 @@ import escapeTextContentForBrowser from 'escape-html'; import InlineAccount from 'flavours/glitch/components/inline_account'; import IconButton from 'flavours/glitch/components/icon_button'; import RelativeTimestamp from 'flavours/glitch/components/relative_timestamp'; +import MediaAttachments from 'flavours/glitch/components/media_attachments'; const mapStateToProps = (state, { statusId }) => ({ versions: state.getIn(['history', statusId, 'items']), @@ -70,6 +71,25 @@ class CompareHistoryModal extends React.PureComponent { )} <div className='status__content__text status__content__text--visible translate' dangerouslySetInnerHTML={content} /> + + {!!currentVersion.get('poll') && ( + <div className='poll'> + <ul> + {currentVersion.getIn(['poll', 'options']).map(option => ( + <li key={option.get('title')}> + <span className='poll__input disabled' /> + + <span + className='poll__option__text translate' + dangerouslySetInnerHTML={{ __html: emojify(escapeTextContentForBrowser(option.get('title')), emojiMap) }} + /> + </li> + ))} + </ul> + </div> + )} + + <MediaAttachments status={currentVersion} /> </div> </div> </div> |