diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js index db49f90eb..aec76e683 100644 --- a/app/javascript/mastodon/features/compose/components/poll_form.js +++ b/app/javascript/mastodon/features/compose/components/poll_form.js @@ -3,6 +3,7 @@ import PropTypes from 'prop-types'; import ImmutablePropTypes from 'react-immutable-proptypes'; import ImmutablePureComponent from 'react-immutable-pure-component'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; +import Toggle from 'react-toggle'; import IconButton from 'mastodon/components/icon_button'; import Icon from 'mastodon/components/icon'; import AutosuggestInput from 'mastodon/components/autosuggest_input'; @@ -155,6 +156,12 @@ class PollForm extends ImmutablePureComponent { +
+ + + + +
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 3cbea9e48..384972105 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -374,6 +374,7 @@ "poll.vote": "Vote", "poll.voted": "You voted for this answer", "poll.votes": "{votes, plural, one {# vote} other {# votes}}", + "poll.is_multiple": "Multiple choice", "poll_button.add_poll": "Add a poll", "poll_button.remove_poll": "Remove poll", "privacy.change": "Change post privacy", diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 6eb943b27..dddb71c71 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4116,6 +4116,21 @@ a.status-card.compact:hover { } } +// Hometown: Styling for toggle for multiple choice polls +.is-multiple-toggle { + display: block; + line-height: 24px; + padding-left: 10px; +} + +.is-multiple-toggle__label { + color: $inverted-text-color; + display: inline-block; + margin-bottom: 14px; + margin-left: 8px; + vertical-align: middle; +} + .setting-toggle { display: block; line-height: 24px;