diff options
author | David Yip <yipdw@member.fsf.org> | 2018-02-09 09:25:53 -0600 |
---|---|---|
committer | David Yip <yipdw@member.fsf.org> | 2018-02-09 09:25:53 -0600 |
commit | 020b40efdb2e4ddac14bea81ad60512d51eb7fe5 (patch) | |
tree | b9afe17c1257490af354f76d6e1c1f1b3788e546 /app/javascript | |
parent | 5ba2c300d8ab0e3adc58a380162b66abafbb3bb8 (diff) | |
parent | 235c14c79d620d47012a08425324df222a136457 (diff) |
Merge remote-tracking branch 'origin/master' into merge-upstream
Conflicts: .travis.yml app/lib/user_settings_decorator.rb app/models/user.rb app/serializers/initial_state_serializer.rb app/views/stream_entries/_detailed_status.html.haml app/views/stream_entries/_simple_status.html.haml config/locales/simple_form.en.yml
Diffstat (limited to 'app/javascript')
6 files changed, 8 insertions, 6 deletions
diff --git a/app/javascript/mastodon/components/media_gallery.js b/app/javascript/mastodon/components/media_gallery.js index 20febdb16..a276b17d5 100644 --- a/app/javascript/mastodon/components/media_gallery.js +++ b/app/javascript/mastodon/components/media_gallery.js @@ -6,7 +6,7 @@ import IconButton from './icon_button'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { isIOS } from '../is_mobile'; import classNames from 'classnames'; -import { autoPlayGif } from '../initial_state'; +import { autoPlayGif, displaySensitiveMedia } from '../initial_state'; const messages = defineMessages({ toggle_visible: { id: 'media_gallery.toggle_visible', defaultMessage: 'Toggle visibility' }, @@ -187,7 +187,7 @@ export default class MediaGallery extends React.PureComponent { }; state = { - visible: !this.props.sensitive, + visible: !this.props.sensitive || displaySensitiveMedia, }; componentWillReceiveProps (nextProps) { diff --git a/app/javascript/mastodon/features/account/components/action_bar.js b/app/javascript/mastodon/features/account/components/action_bar.js index cb849fa5d..b4f812c9a 100644 --- a/app/javascript/mastodon/features/account/components/action_bar.js +++ b/app/javascript/mastodon/features/account/components/action_bar.js @@ -122,7 +122,7 @@ export default class ActionBar extends React.PureComponent { <div className='account__action-bar-links'> <Link className='account__action-bar__tab' to={`/accounts/${account.get('id')}`}> - <span><FormattedMessage id='account.posts' defaultMessage='Posts' /></span> + <span><FormattedMessage id='account.posts' defaultMessage='Toots' /></span> <strong><FormattedNumber value={account.get('statuses_count')} /></strong> </Link> diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 0ee8bb6c8..7752fc057 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -4,6 +4,7 @@ import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import { throttle } from 'lodash'; import classNames from 'classnames'; import { isFullscreen, requestFullscreen, exitFullscreen } from '../ui/util/fullscreen'; +import { displaySensitiveMedia } from '../../initial_state'; const messages = defineMessages({ play: { id: 'video.play', defaultMessage: 'Play' }, @@ -107,7 +108,7 @@ export default class Video extends React.PureComponent { fullscreen: false, hovered: false, muted: false, - revealed: !this.props.sensitive, + revealed: !this.props.sensitive || displaySensitiveMedia, }; setPlayerRef = c => { diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index 3fc45077d..6f1356324 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -5,6 +5,7 @@ const getMeta = (prop) => initialState && initialState.meta && initialState.meta export const reduceMotion = getMeta('reduce_motion'); export const autoPlayGif = getMeta('auto_play_gif'); +export const displaySensitiveMedia = getMeta('display_sensitive_media'); export const unfollowModal = getMeta('unfollow_modal'); export const boostModal = getMeta('boost_modal'); export const deleteModal = getMeta('delete_modal'); diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json index a27f17b42..c0841d6f5 100644 --- a/app/javascript/mastodon/locales/defaultMessages.json +++ b/app/javascript/mastodon/locales/defaultMessages.json @@ -433,7 +433,7 @@ "id": "account.view_full_profile" }, { - "defaultMessage": "Posts", + "defaultMessage": "Toots", "id": "account.posts" }, { diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index 028f9aefd..e72c45bf2 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -13,7 +13,7 @@ "account.moved_to": "{name} has moved to:", "account.mute": "Mute @{name}", "account.mute_notifications": "Mute notifications from @{name}", - "account.posts": "Posts", + "account.posts": "Toots", "account.report": "Report @{name}", "account.requested": "Awaiting approval. Click to cancel follow request", "account.share": "Share @{name}'s profile", |