mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-25 02:35:39 +03:00
Poll titles can be emoji-fied
This commit is contained in:
parent
adfe660cc8
commit
5d8cddc07e
1 changed files with 13 additions and 2 deletions
|
@ -25,6 +25,7 @@ import Loader from '../components/loader';
|
|||
import Modal from '../components/modal';
|
||||
import NameText from '../components/name-text';
|
||||
import { api } from '../utils/api';
|
||||
import emojifyText from '../utils/emojify-text';
|
||||
import enhanceContent from '../utils/enhance-content';
|
||||
import getTranslateTargetLanguage from '../utils/get-translate-target-language';
|
||||
import getHTMLText from '../utils/getHTMLText';
|
||||
|
@ -1351,6 +1352,7 @@ function Poll({
|
|||
voted,
|
||||
votersCount,
|
||||
votesCount,
|
||||
emojis,
|
||||
} = poll;
|
||||
|
||||
const expiresAtDate = !!expiresAt && new Date(expiresAt);
|
||||
|
@ -1426,7 +1428,11 @@ function Poll({
|
|||
}}
|
||||
>
|
||||
<div class="poll-option-title">
|
||||
{title}
|
||||
<span
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: emojifyText(title, emojis),
|
||||
}}
|
||||
/>
|
||||
{voted && ownVotes.includes(i) && (
|
||||
<>
|
||||
{' '}
|
||||
|
@ -1477,7 +1483,12 @@ function Poll({
|
|||
disabled={uiState === 'loading'}
|
||||
readOnly={readOnly}
|
||||
/>
|
||||
<span class="poll-option-title">{title}</span>
|
||||
<span
|
||||
class="poll-option-title"
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: emojifyText(title, emojis),
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue