From 8f8e6776306b07d5914ef39c895de0cab44ada7f Mon Sep 17 00:00:00 2001
From: Eugen Rochko
Date: Tue, 12 Sep 2017 05:39:38 +0200
Subject: Clean up and improve generated OpenGraph tags (#4901)
- Return all images as og:image
- Return videos as og:image (preview) and og:video
- Return profile:username on profiles
---
app/views/stream_entries/_og_description.html.haml | 4 ++--
app/views/stream_entries/_og_image.html.haml | 22 ++++++++++++++++++----
app/views/stream_entries/show.html.haml | 10 +++++-----
3 files changed, 25 insertions(+), 11 deletions(-)
(limited to 'app/views/stream_entries')
diff --git a/app/views/stream_entries/_og_description.html.haml b/app/views/stream_entries/_og_description.html.haml
index 5762aca04..d2fa99e63 100644
--- a/app/views/stream_entries/_og_description.html.haml
+++ b/app/views/stream_entries/_og_description.html.haml
@@ -1,4 +1,4 @@
- if activity.is_a?(Status) && activity.spoiler_text?
- %meta{ property: 'og:description', content: activity.spoiler_text }/
+ = opengraph 'og:description', activity.spoiler_text
- else
- %meta{ property: 'og:description', content: activity.content }/
+ = opengraph 'og:description', activity.content
diff --git a/app/views/stream_entries/_og_image.html.haml b/app/views/stream_entries/_og_image.html.haml
index f725209d8..66d9619b2 100644
--- a/app/views/stream_entries/_og_image.html.haml
+++ b/app/views/stream_entries/_og_image.html.haml
@@ -1,6 +1,20 @@
- if activity.is_a?(Status) && activity.non_sensitive_with_media?
- %meta{ property: 'og:image', content: full_asset_url(activity.media_attachments.first.file.url(:small)) }/
+ - activity.media_attachments.each do |media|
+ - if media.image?
+ = opengraph 'og:image', full_asset_url(media.file.url(:original))
+ = opengraph 'og:image:type', media.file_content_type
+ = opengraph 'og:image:width', media.file.meta['original']['width']
+ = opengraph 'og:image:height', media.file.meta['original']['height']
+ - elsif media.video?
+ = opengraph 'og:image', full_asset_url(media.file.url(:small))
+ = opengraph 'og:image:type', 'image/png'
+ = opengraph 'og:image:width', media.file.meta['small']['width']
+ = opengraph 'og:image:height', media.file.meta['small']['height']
+ = opengraph 'og:video', full_asset_url(media.file.url(:original))
+ = opengraph 'og:video:type', media.file_content_type
+ = opengraph 'og:video:width', media.file.meta['small']['width']
+ = opengraph 'og:video:height', media.file.meta['small']['height']
- else
- %meta{ property: 'og:image', content: full_asset_url(account.avatar.url(:original)) }/
- %meta{ property: 'og:image:width', content: '120' }/
- %meta{ property: 'og:image:height', content: '120' }/
+ = opengraph 'og:image', full_asset_url(account.avatar.url(:original))
+ = opengraph 'og:image:width', '120'
+ = opengraph 'og:image:height','120'
diff --git a/app/views/stream_entries/show.html.haml b/app/views/stream_entries/show.html.haml
index 5ef72f804..1bb8a32b2 100644
--- a/app/views/stream_entries/show.html.haml
+++ b/app/views/stream_entries/show.html.haml
@@ -6,15 +6,15 @@
%link{ rel: 'alternate', type: 'application/json+oembed', href: api_oembed_url(url: account_stream_entry_url(@account, @stream_entry), format: 'json') }/
%link{ rel: 'alternate', type: 'application/activity+json', href: ActivityPub::TagManager.instance.uri_for(@stream_entry.activity) }/
- %meta{ property: 'og:site_name', content: site_title }/
- %meta{ property: 'og:type', content: 'article' }/
- %meta{ property: 'og:title', content: "#{@account.username} on #{site_hostname}" }/
- %meta{ property: 'og:url', content: account_stream_entry_url(@account, @stream_entry) }/
+ = opengraph 'og:site_name', site_title
+ = opengraph 'og:type', 'article'
+ = opengraph 'og:title', "#{@account.username} on #{site_hostname}"
+ = opengraph 'og:url', account_stream_entry_url(@account, @stream_entry)
= render 'stream_entries/og_description', activity: @stream_entry.activity
= render 'stream_entries/og_image', activity: @stream_entry.activity, account: @account
- %meta{ property: 'twitter:card', content: 'summary' }/
+ = opengraph 'twitter:card', 'summary_large_image'
- if show_landing_strip?
= render partial: 'shared/landing_strip', locals: { account: @stream_entry.account }
--
cgit
From 2bbf987a0a352a36ef0cc7f06fe366b60593e89c Mon Sep 17 00:00:00 2001
From: Eugen Rochko
Date: Thu, 14 Sep 2017 03:39:10 +0200
Subject: Redesign video player (#4911)
* Redesign video player
* Use new video player on static public pages too
* Use media gallery component on static public pages too
* Pause video when hiding it
* Full-screen sizing on WebKit
* Add aria labels to video player buttons
* Display link card on public status page
* Fix fullscreen from modal sizing issue
* Remove contain: strict property to fix fullscreen from columns
---
app/javascript/mastodon/components/status.js | 19 +-
.../mastodon/containers/card_container.js | 18 ++
.../mastodon/containers/media_gallery_container.js | 34 +++
.../mastodon/containers/video_container.js | 26 ++
.../mastodon/features/status/components/card.js | 10 +-
.../features/status/components/detailed_status.js | 19 +-
.../mastodon/features/ui/components/video_modal.js | 22 +-
.../mastodon/features/ui/util/async-components.js | 4 +
app/javascript/mastodon/features/video/index.js | 304 +++++++++++++++++++++
app/javascript/mastodon/locales/ar.json | 11 +
app/javascript/mastodon/locales/bg.json | 11 +
app/javascript/mastodon/locales/ca.json | 11 +
app/javascript/mastodon/locales/de.json | 11 +
.../mastodon/locales/defaultMessages.json | 62 +++++
app/javascript/mastodon/locales/en.json | 13 +-
app/javascript/mastodon/locales/eo.json | 11 +
app/javascript/mastodon/locales/es.json | 11 +
app/javascript/mastodon/locales/fa.json | 13 +-
app/javascript/mastodon/locales/fi.json | 11 +
app/javascript/mastodon/locales/fr.json | 13 +-
app/javascript/mastodon/locales/he.json | 11 +
app/javascript/mastodon/locales/hr.json | 12 +-
app/javascript/mastodon/locales/hu.json | 11 +
app/javascript/mastodon/locales/id.json | 11 +
app/javascript/mastodon/locales/io.json | 11 +
app/javascript/mastodon/locales/it.json | 11 +
app/javascript/mastodon/locales/ja.json | 13 +-
app/javascript/mastodon/locales/ko.json | 13 +-
app/javascript/mastodon/locales/nl.json | 11 +
app/javascript/mastodon/locales/no.json | 11 +
app/javascript/mastodon/locales/oc.json | 13 +-
app/javascript/mastodon/locales/pl.json | 9 +
app/javascript/mastodon/locales/pt-BR.json | 13 +-
app/javascript/mastodon/locales/pt.json | 11 +
app/javascript/mastodon/locales/ru.json | 11 +
app/javascript/mastodon/locales/th.json | 11 +
app/javascript/mastodon/locales/tr.json | 11 +
app/javascript/mastodon/locales/uk.json | 11 +
app/javascript/mastodon/locales/zh-CN.json | 11 +
app/javascript/mastodon/locales/zh-HK.json | 11 +
app/javascript/mastodon/locales/zh-TW.json | 11 +
app/javascript/packs/public.js | 30 +-
app/javascript/styles/components.scss | 197 ++++++++++++-
app/javascript/styles/stream_entries.scss | 150 +---------
.../stream_entries/_detailed_status.html.haml | 15 +-
app/views/stream_entries/_simple_status.html.haml | 17 +-
46 files changed, 1064 insertions(+), 217 deletions(-)
create mode 100644 app/javascript/mastodon/containers/card_container.js
create mode 100644 app/javascript/mastodon/containers/media_gallery_container.js
create mode 100644 app/javascript/mastodon/containers/video_container.js
create mode 100644 app/javascript/mastodon/features/video/index.js
(limited to 'app/views/stream_entries')
diff --git a/app/javascript/mastodon/components/status.js b/app/javascript/mastodon/components/status.js
index 30a0c10cb..82359156d 100644
--- a/app/javascript/mastodon/components/status.js
+++ b/app/javascript/mastodon/components/status.js
@@ -9,7 +9,7 @@ import StatusContent from './status_content';
import StatusActionBar from './status_action_bar';
import { FormattedMessage } from 'react-intl';
import ImmutablePureComponent from 'react-immutable-pure-component';
-import { MediaGallery, VideoPlayer } from '../features/ui/util/async-components';
+import { MediaGallery, Video } from '../features/ui/util/async-components';
// We use the component (and not the container) since we do not want
// to use the progress bar to show download progress
@@ -88,6 +88,10 @@ export default class Status extends ImmutablePureComponent {
return ;
}
+ handleOpenVideo = startTime => {
+ this.props.onOpenVideo(this.props.status.getIn(['media_attachments', 0]), startTime);
+ }
+
render () {
let media = null;
let statusAvatar;
@@ -127,9 +131,18 @@ export default class Status extends ImmutablePureComponent {
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
+ const video = status.getIn(['media_attachments', 0]);
+
media = (
-
- {Component => }
+
+ {Component => }
);
} else {
diff --git a/app/javascript/mastodon/containers/card_container.js b/app/javascript/mastodon/containers/card_container.js
new file mode 100644
index 000000000..11b9f88d4
--- /dev/null
+++ b/app/javascript/mastodon/containers/card_container.js
@@ -0,0 +1,18 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import Card from '../features/status/components/card';
+import { fromJS } from 'immutable';
+
+export default class CardContainer extends React.PureComponent {
+
+ static propTypes = {
+ locale: PropTypes.string,
+ card: PropTypes.array.isRequired,
+ };
+
+ render () {
+ const { card, ...props } = this.props;
+ return ;
+ }
+
+}
diff --git a/app/javascript/mastodon/containers/media_gallery_container.js b/app/javascript/mastodon/containers/media_gallery_container.js
new file mode 100644
index 000000000..812c3d4e5
--- /dev/null
+++ b/app/javascript/mastodon/containers/media_gallery_container.js
@@ -0,0 +1,34 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { IntlProvider, addLocaleData } from 'react-intl';
+import { getLocale } from '../locales';
+import MediaGallery from '../components/media_gallery';
+import { fromJS } from 'immutable';
+
+const { localeData, messages } = getLocale();
+addLocaleData(localeData);
+
+export default class MediaGalleryContainer extends React.PureComponent {
+
+ static propTypes = {
+ locale: PropTypes.string.isRequired,
+ media: PropTypes.array.isRequired,
+ };
+
+ handleOpenMedia = () => {}
+
+ render () {
+ const { locale, media, ...props } = this.props;
+
+ return (
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/containers/video_container.js b/app/javascript/mastodon/containers/video_container.js
new file mode 100644
index 000000000..2fd353096
--- /dev/null
+++ b/app/javascript/mastodon/containers/video_container.js
@@ -0,0 +1,26 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { IntlProvider, addLocaleData } from 'react-intl';
+import { getLocale } from '../locales';
+import Video from '../features/video';
+
+const { localeData, messages } = getLocale();
+addLocaleData(localeData);
+
+export default class VideoContainer extends React.PureComponent {
+
+ static propTypes = {
+ locale: PropTypes.string.isRequired,
+ };
+
+ render () {
+ const { locale, ...props } = this.props;
+
+ return (
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/features/status/components/card.js b/app/javascript/mastodon/features/status/components/card.js
index 6b13e15cc..41c4300d3 100644
--- a/app/javascript/mastodon/features/status/components/card.js
+++ b/app/javascript/mastodon/features/status/components/card.js
@@ -1,4 +1,5 @@
import React from 'react';
+import PropTypes from 'prop-types';
import ImmutablePropTypes from 'react-immutable-proptypes';
import punycode from 'punycode';
import classnames from 'classnames';
@@ -22,10 +23,15 @@ export default class Card extends React.PureComponent {
static propTypes = {
card: ImmutablePropTypes.map,
+ maxDescription: PropTypes.number,
+ };
+
+ static defaultProps = {
+ maxDescription: 50,
};
renderLink () {
- const { card } = this.props;
+ const { card, maxDescription } = this.props;
let image = '';
let provider = card.get('provider_name');
@@ -52,7 +58,7 @@ export default class Card extends React.PureComponent {
{card.get('title')}
-
{(card.get('description') || '').substring(0, 50)}
+
{(card.get('description') || '').substring(0, maxDescription)}
{provider}
diff --git a/app/javascript/mastodon/features/status/components/detailed_status.js b/app/javascript/mastodon/features/status/components/detailed_status.js
index 940a2699b..b11b41780 100644
--- a/app/javascript/mastodon/features/status/components/detailed_status.js
+++ b/app/javascript/mastodon/features/status/components/detailed_status.js
@@ -5,12 +5,12 @@ import Avatar from '../../../components/avatar';
import DisplayName from '../../../components/display_name';
import StatusContent from '../../../components/status_content';
import MediaGallery from '../../../components/media_gallery';
-import VideoPlayer from '../../../components/video_player';
import AttachmentList from '../../../components/attachment_list';
import Link from 'react-router-dom/Link';
import { FormattedDate, FormattedNumber } from 'react-intl';
import CardContainer from '../containers/card_container';
import ImmutablePureComponent from 'react-immutable-pure-component';
+import Video from '../../video';
export default class DetailedStatus extends ImmutablePureComponent {
@@ -34,6 +34,10 @@ export default class DetailedStatus extends ImmutablePureComponent {
e.stopPropagation();
}
+ handleOpenVideo = startTime => {
+ this.props.onOpenVideo(this.props.status.getIn(['media_attachments', 0]), startTime);
+ }
+
render () {
const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;
@@ -44,7 +48,18 @@ export default class DetailedStatus extends ImmutablePureComponent {
if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {
media = ;
} else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {
- media = ;
+ const video = status.getIn(['media_attachments', 0]);
+
+ media = (
+
+ );
} else {
media = ;
}
diff --git a/app/javascript/mastodon/features/ui/components/video_modal.js b/app/javascript/mastodon/features/ui/components/video_modal.js
index 9a9a49dfb..867c73ed5 100644
--- a/app/javascript/mastodon/features/ui/components/video_modal.js
+++ b/app/javascript/mastodon/features/ui/components/video_modal.js
@@ -1,35 +1,29 @@
import React from 'react';
import ImmutablePropTypes from 'react-immutable-proptypes';
import PropTypes from 'prop-types';
-import ExtendedVideoPlayer from '../../../components/extended_video_player';
-import { defineMessages, injectIntl } from 'react-intl';
-import IconButton from '../../../components/icon_button';
+import Video from '../../video';
import ImmutablePureComponent from 'react-immutable-pure-component';
-const messages = defineMessages({
- close: { id: 'lightbox.close', defaultMessage: 'Close' },
-});
-
-@injectIntl
export default class VideoModal extends ImmutablePureComponent {
static propTypes = {
media: ImmutablePropTypes.map.isRequired,
time: PropTypes.number,
onClose: PropTypes.func.isRequired,
- intl: PropTypes.object.isRequired,
};
render () {
- const { media, intl, time, onClose } = this.props;
-
- const url = media.get('url');
+ const { media, time, onClose } = this.props;
return (
);
diff --git a/app/javascript/mastodon/features/ui/util/async-components.js b/app/javascript/mastodon/features/ui/util/async-components.js
index c767f77a7..c0b93a3a1 100644
--- a/app/javascript/mastodon/features/ui/util/async-components.js
+++ b/app/javascript/mastodon/features/ui/util/async-components.js
@@ -98,6 +98,10 @@ export function VideoPlayer () {
return import(/* webpackChunkName: "status/video_player" */'../../../components/video_player');
}
+export function Video () {
+ return import(/* webpackChunkName: "features/video" */'../../video');
+}
+
export function EmbedModal () {
return import(/* webpackChunkName: "modals/embed_modal" */'../components/embed_modal');
}
diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js
new file mode 100644
index 000000000..f228e434b
--- /dev/null
+++ b/app/javascript/mastodon/features/video/index.js
@@ -0,0 +1,304 @@
+import React from 'react';
+import PropTypes from 'prop-types';
+import { defineMessages, injectIntl, FormattedMessage } from 'react-intl';
+import { throttle } from 'lodash';
+import classNames from 'classnames';
+
+const messages = defineMessages({
+ play: { id: 'video.play', defaultMessage: 'Play' },
+ pause: { id: 'video.pause', defaultMessage: 'Pause' },
+ mute: { id: 'video.mute', defaultMessage: 'Mute sound' },
+ unmute: { id: 'video.unmute', defaultMessage: 'Unmute sound' },
+ hide: { id: 'video.hide', defaultMessage: 'Hide video' },
+ expand: { id: 'video.expand', defaultMessage: 'Expand video' },
+ close: { id: 'video.close', defaultMessage: 'Close video' },
+ fullscreen: { id: 'video.fullscreen', defaultMessage: 'Full screen' },
+ exit_fullscreen: { id: 'video.exit_fullscreen', defaultMessage: 'Exit full screen' },
+});
+
+const findElementPosition = el => {
+ let box;
+
+ if (el.getBoundingClientRect && el.parentNode) {
+ box = el.getBoundingClientRect();
+ }
+
+ if (!box) {
+ return {
+ left: 0,
+ top: 0,
+ };
+ }
+
+ const docEl = document.documentElement;
+ const body = document.body;
+
+ const clientLeft = docEl.clientLeft || body.clientLeft || 0;
+ const scrollLeft = window.pageXOffset || body.scrollLeft;
+ const left = (box.left + scrollLeft) - clientLeft;
+
+ const clientTop = docEl.clientTop || body.clientTop || 0;
+ const scrollTop = window.pageYOffset || body.scrollTop;
+ const top = (box.top + scrollTop) - clientTop;
+
+ return {
+ left: Math.round(left),
+ top: Math.round(top),
+ };
+};
+
+const getPointerPosition = (el, event) => {
+ const position = {};
+ const box = findElementPosition(el);
+ const boxW = el.offsetWidth;
+ const boxH = el.offsetHeight;
+ const boxY = box.top;
+ const boxX = box.left;
+
+ let pageY = event.pageY;
+ let pageX = event.pageX;
+
+ if (event.changedTouches) {
+ pageX = event.changedTouches[0].pageX;
+ pageY = event.changedTouches[0].pageY;
+ }
+
+ position.y = Math.max(0, Math.min(1, ((boxY - pageY) + boxH) / boxH));
+ position.x = Math.max(0, Math.min(1, (pageX - boxX) / boxW));
+
+ return position;
+};
+
+const isFullscreen = () => document.fullscreenElement ||
+ document.webkitFullscreenElement ||
+ document.mozFullScreenElement ||
+ document.msFullscreenElement;
+
+const exitFullscreen = () => {
+ if (document.exitFullscreen) {
+ document.exitFullscreen();
+ } else if (document.webkitExitFullscreen) {
+ document.webkitExitFullscreen();
+ } else if (document.mozCancelFullScreen) {
+ document.mozCancelFullScreen();
+ } else if (document.msExitFullscreen) {
+ document.msExitFullscreen();
+ }
+};
+
+const requestFullscreen = el => {
+ if (el.requestFullscreen) {
+ el.requestFullscreen();
+ } else if (el.webkitRequestFullscreen) {
+ el.webkitRequestFullscreen();
+ } else if (el.mozRequestFullScreen) {
+ el.mozRequestFullScreen();
+ } else if (el.msRequestFullscreen) {
+ el.msRequestFullscreen();
+ }
+};
+
+@injectIntl
+export default class Video extends React.PureComponent {
+
+ static propTypes = {
+ preview: PropTypes.string,
+ src: PropTypes.string.isRequired,
+ width: PropTypes.number,
+ height: PropTypes.number,
+ sensitive: PropTypes.bool,
+ startTime: PropTypes.number,
+ onOpenVideo: PropTypes.func,
+ onCloseVideo: PropTypes.func,
+ intl: PropTypes.object.isRequired,
+ };
+
+ state = {
+ progress: 0,
+ paused: true,
+ dragging: false,
+ fullscreen: false,
+ hovered: false,
+ muted: false,
+ revealed: !this.props.sensitive,
+ };
+
+ setPlayerRef = c => {
+ this.player = c;
+ }
+
+ setVideoRef = c => {
+ this.video = c;
+ }
+
+ setSeekRef = c => {
+ this.seek = c;
+ }
+
+ handlePlay = () => {
+ this.setState({ paused: false });
+ }
+
+ handlePause = () => {
+ this.setState({ paused: true });
+ }
+
+ handleTimeUpdate = () => {
+ this.setState({ progress: 100 * (this.video.currentTime / this.video.duration) });
+ }
+
+ handleMouseDown = e => {
+ document.addEventListener('mousemove', this.handleMouseMove, true);
+ document.addEventListener('mouseup', this.handleMouseUp, true);
+ document.addEventListener('touchmove', this.handleMouseMove, true);
+ document.addEventListener('touchend', this.handleMouseUp, true);
+
+ this.setState({ dragging: true });
+ this.video.pause();
+ this.handleMouseMove(e);
+ }
+
+ handleMouseUp = () => {
+ document.removeEventListener('mousemove', this.handleMouseMove, true);
+ document.removeEventListener('mouseup', this.handleMouseUp, true);
+ document.removeEventListener('touchmove', this.handleMouseMove, true);
+ document.removeEventListener('touchend', this.handleMouseUp, true);
+
+ this.setState({ dragging: false });
+ this.video.play();
+ }
+
+ handleMouseMove = throttle(e => {
+ const { x } = getPointerPosition(this.seek, e);
+ this.video.currentTime = this.video.duration * x;
+ this.setState({ progress: x * 100 });
+ }, 60);
+
+ togglePlay = () => {
+ if (this.state.paused) {
+ this.video.play();
+ } else {
+ this.video.pause();
+ }
+ }
+
+ toggleFullscreen = () => {
+ if (isFullscreen()) {
+ exitFullscreen();
+ } else {
+ requestFullscreen(this.player);
+ }
+ }
+
+ componentDidMount () {
+ document.addEventListener('fullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
+ document.addEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ }
+
+ componentWillUnmount () {
+ document.removeEventListener('fullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('webkitfullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('mozfullscreenchange', this.handleFullscreenChange, true);
+ document.removeEventListener('MSFullscreenChange', this.handleFullscreenChange, true);
+ }
+
+ handleFullscreenChange = () => {
+ this.setState({ fullscreen: isFullscreen() });
+ }
+
+ handleMouseEnter = () => {
+ this.setState({ hovered: true });
+ }
+
+ handleMouseLeave = () => {
+ this.setState({ hovered: false });
+ }
+
+ toggleMute = () => {
+ this.video.muted = !this.video.muted;
+ this.setState({ muted: this.video.muted });
+ }
+
+ toggleReveal = () => {
+ if (this.state.revealed) {
+ this.video.pause();
+ }
+
+ this.setState({ revealed: !this.state.revealed });
+ }
+
+ handleLoadedData = () => {
+ if (this.props.startTime) {
+ this.video.currentTime = this.props.startTime;
+ this.video.play();
+ }
+ }
+
+ handleOpenVideo = () => {
+ this.video.pause();
+ this.props.onOpenVideo(this.video.currentTime);
+ }
+
+ handleCloseVideo = () => {
+ this.video.pause();
+ this.props.onCloseVideo();
+ }
+
+ render () {
+ const { preview, src, width, height, startTime, onOpenVideo, onCloseVideo, intl } = this.props;
+ const { progress, dragging, paused, fullscreen, hovered, muted, revealed } = this.state;
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {!onCloseVideo && }
+
+
+
+ {(!fullscreen && onOpenVideo) && }
+ {onCloseVideo && }
+
+
+
+
+ );
+ }
+
+}
diff --git a/app/javascript/mastodon/locales/ar.json b/app/javascript/mastodon/locales/ar.json
index 2ceb6eb9a..3a6fa2874 100644
--- a/app/javascript/mastodon/locales/ar.json
+++ b/app/javascript/mastodon/locales/ar.json
@@ -33,6 +33,7 @@
"column.home": "الرئيسية",
"column.mutes": "الحسابات المكتومة",
"column.notifications": "الإشعارات",
+ "column.pins": "Pinned toot",
"column.public": "الخيط العام الموحد",
"column_back_button.label": "العودة",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "معلومات إضافية",
"navigation_bar.logout": "خروج",
"navigation_bar.mutes": "الحسابات المكتومة",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "التفضيلات",
"navigation_bar.public_timeline": "الخيط العام الموحد",
"notification.favourite": "{name} أعجب بمنشورك",
@@ -193,6 +195,15 @@
"upload_button.label": "إضافة وسائط",
"upload_form.undo": "إلغاء",
"upload_progress.label": "يرفع...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "وسّع الفيديو",
"video_player.toggle_sound": "تبديل الصوت",
"video_player.toggle_visible": "إظهار / إخفاء الفيديو",
diff --git a/app/javascript/mastodon/locales/bg.json b/app/javascript/mastodon/locales/bg.json
index 183ba2673..9afe2d038 100644
--- a/app/javascript/mastodon/locales/bg.json
+++ b/app/javascript/mastodon/locales/bg.json
@@ -33,6 +33,7 @@
"column.home": "Начало",
"column.mutes": "Muted users",
"column.notifications": "Известия",
+ "column.pins": "Pinned toot",
"column.public": "Публичен канал",
"column_back_button.label": "Назад",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Extended information",
"navigation_bar.logout": "Излизане",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Предпочитания",
"navigation_bar.public_timeline": "Публичен канал",
"notification.favourite": "{name} хареса твоята публикация",
@@ -193,6 +195,15 @@
"upload_button.label": "Добави медия",
"upload_form.undo": "Отмяна",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Звук",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/ca.json b/app/javascript/mastodon/locales/ca.json
index 0e3d2bc18..7d45b4d6b 100644
--- a/app/javascript/mastodon/locales/ca.json
+++ b/app/javascript/mastodon/locales/ca.json
@@ -33,6 +33,7 @@
"column.home": "Inici",
"column.mutes": "Usuaris silenciats",
"column.notifications": "Notificacions",
+ "column.pins": "Pinned toot",
"column.public": "Línia de temps federada",
"column_back_button.label": "Enrere",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Informació addicional",
"navigation_bar.logout": "Tancar sessió",
"navigation_bar.mutes": "Usuaris silenciats",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferències",
"navigation_bar.public_timeline": "Línia de temps federada",
"notification.favourite": "{name} ha afavorit el teu estat",
@@ -193,6 +195,15 @@
"upload_button.label": "Afegir multimèdia",
"upload_form.undo": "Desfer",
"upload_progress.label": "Pujant...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Ampliar el vídeo",
"video_player.toggle_sound": "Alternar so",
"video_player.toggle_visible": "Alternar visibilitat",
diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json
index 3133238cd..712c635c8 100644
--- a/app/javascript/mastodon/locales/de.json
+++ b/app/javascript/mastodon/locales/de.json
@@ -33,6 +33,7 @@
"column.home": "Startseite",
"column.mutes": "Stummgeschaltete Profile",
"column.notifications": "Mitteilungen",
+ "column.pins": "Pinned toot",
"column.public": "Gesamtes bekanntes Netz",
"column_back_button.label": "Zurück",
"column_header.hide_settings": "Einstellungen verbergen",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Erweiterte Informationen",
"navigation_bar.logout": "Abmelden",
"navigation_bar.mutes": "Stummgeschaltete Profile",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Einstellungen",
"navigation_bar.public_timeline": "Föderierte Zeitleiste",
"notification.favourite": "{name} favorisierte deinen Status",
@@ -193,6 +195,15 @@
"upload_button.label": "Mediendatei hinzufügen",
"upload_form.undo": "Entfernen",
"upload_progress.label": "Lade hoch…",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Videoanzeige vergrößern",
"video_player.toggle_sound": "Ton umschalten",
"video_player.toggle_visible": "Sichtbarkeit umschalten",
diff --git a/app/javascript/mastodon/locales/defaultMessages.json b/app/javascript/mastodon/locales/defaultMessages.json
index a0cb8f978..42df796a7 100644
--- a/app/javascript/mastodon/locales/defaultMessages.json
+++ b/app/javascript/mastodon/locales/defaultMessages.json
@@ -812,6 +812,10 @@
"defaultMessage": "Extended information",
"id": "navigation_bar.info"
},
+ {
+ "defaultMessage": "Pinned toots",
+ "id": "navigation_bar.pins"
+ },
{
"defaultMessage": "FAQ",
"id": "getting_started.faq"
@@ -992,6 +996,15 @@
],
"path": "app/javascript/mastodon/features/notifications/index.json"
},
+ {
+ "descriptors": [
+ {
+ "defaultMessage": "Pinned toot",
+ "id": "column.pins"
+ }
+ ],
+ "path": "app/javascript/mastodon/features/pinned_statuses/index.json"
+ },
{
"descriptors": [
{
@@ -1326,5 +1339,54 @@
}
],
"path": "app/javascript/mastodon/features/ui/components/video_modal.json"
+ },
+ {
+ "descriptors": [
+ {
+ "defaultMessage": "Play",
+ "id": "video.play"
+ },
+ {
+ "defaultMessage": "Pause",
+ "id": "video.pause"
+ },
+ {
+ "defaultMessage": "Mute sound",
+ "id": "video.mute"
+ },
+ {
+ "defaultMessage": "Unmute sound",
+ "id": "video.unmute"
+ },
+ {
+ "defaultMessage": "Hide video",
+ "id": "video.hide"
+ },
+ {
+ "defaultMessage": "Expand video",
+ "id": "video.expand"
+ },
+ {
+ "defaultMessage": "Close video",
+ "id": "video.close"
+ },
+ {
+ "defaultMessage": "Full screen",
+ "id": "video.fullscreen"
+ },
+ {
+ "defaultMessage": "Exit full screen",
+ "id": "video.exit_fullscreen"
+ },
+ {
+ "defaultMessage": "Sensitive content",
+ "id": "status.sensitive_warning"
+ },
+ {
+ "defaultMessage": "Click to view",
+ "id": "status.sensitive_toggle"
+ }
+ ],
+ "path": "app/javascript/mastodon/features/video/index.json"
}
]
\ No newline at end of file
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json
index f42851f45..436079aeb 100644
--- a/app/javascript/mastodon/locales/en.json
+++ b/app/javascript/mastodon/locales/en.json
@@ -33,8 +33,8 @@
"column.home": "Home",
"column.mutes": "Muted users",
"column.notifications": "Notifications",
- "column.public": "Federated timeline",
"column.pins": "Pinned toots",
+ "column.public": "Federated timeline",
"column_back_button.label": "Back",
"column_header.hide_settings": "Hide settings",
"column_header.moveLeft_settings": "Move column to the left",
@@ -110,9 +110,9 @@
"navigation_bar.info": "About this instance",
"navigation_bar.logout": "Logout",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferences",
"navigation_bar.public_timeline": "Federated timeline",
- "navigation_bar.pins": "Pinned toots",
"notification.favourite": "{name} favourited your status",
"notification.follow": "{name} followed you",
"notification.mention": "{name} mentioned you",
@@ -195,6 +195,15 @@
"upload_button.label": "Add media",
"upload_form.undo": "Undo",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Toggle sound",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json
index d828d0858..945fcd8e0 100644
--- a/app/javascript/mastodon/locales/eo.json
+++ b/app/javascript/mastodon/locales/eo.json
@@ -33,6 +33,7 @@
"column.home": "Hejmo",
"column.mutes": "Muted users",
"column.notifications": "Sciigoj",
+ "column.pins": "Pinned toot",
"column.public": "Fratara tempolinio",
"column_back_button.label": "Reveni",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Extended information",
"navigation_bar.logout": "Elsaluti",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferoj",
"navigation_bar.public_timeline": "Fratara tempolinio",
"notification.favourite": "{name} favoris vian mesaĝon",
@@ -193,6 +195,15 @@
"upload_button.label": "Aldoni enhavaĵon",
"upload_form.undo": "Malfari",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Aktivigi sonojn",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json
index d35eb84e7..7d74d6b46 100644
--- a/app/javascript/mastodon/locales/es.json
+++ b/app/javascript/mastodon/locales/es.json
@@ -33,6 +33,7 @@
"column.home": "Inicio",
"column.mutes": "Usuarios silenciados",
"column.notifications": "Notificaciones",
+ "column.pins": "Pinned toot",
"column.public": "Historia federada",
"column_back_button.label": "Atrás",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Información adicional",
"navigation_bar.logout": "Cerrar sesión",
"navigation_bar.mutes": "Usuarios silenciados",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferencias",
"navigation_bar.public_timeline": "Historia federada",
"notification.favourite": "{name} marcó tu estado como favorito",
@@ -193,6 +195,15 @@
"upload_button.label": "Subir multimedia",
"upload_form.undo": "Deshacer",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Act/Desac. sonido",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/fa.json b/app/javascript/mastodon/locales/fa.json
index 284c5a812..cd7359160 100644
--- a/app/javascript/mastodon/locales/fa.json
+++ b/app/javascript/mastodon/locales/fa.json
@@ -33,8 +33,8 @@
"column.home": "خانه",
"column.mutes": "کاربران بیصداشده",
"column.notifications": "اعلانها",
- "column.public": "نوشتههای همهجا",
"column.pins": "نوشتههای ثابت",
+ "column.public": "نوشتههای همهجا",
"column_back_button.label": "بازگشت",
"column_header.hide_settings": "نهفتن تنظیمات",
"column_header.moveLeft_settings": "انتقال ستون به چپ",
@@ -110,9 +110,9 @@
"navigation_bar.info": "اطلاعات تکمیلی",
"navigation_bar.logout": "خروج",
"navigation_bar.mutes": "کاربران بیصداشده",
+ "navigation_bar.pins": "نوشتههای ثابت",
"navigation_bar.preferences": "ترجیحات",
"navigation_bar.public_timeline": "نوشتههای همهجا",
- "navigation_bar.pins": "نوشتههای ثابت",
"notification.favourite": "{name} نوشتهٔ شما را پسندید",
"notification.follow": "{name} پیگیر شما شد",
"notification.mention": "{name} از شما نام برد",
@@ -195,6 +195,15 @@
"upload_button.label": "افزودن تصویر",
"upload_form.undo": "واگردانی",
"upload_progress.label": "بارگذاری...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "بازکردن ویدیو",
"video_player.toggle_sound": "تغییر صداداری",
"video_player.toggle_visible": "تغییر پیدایی",
diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json
index 926a57ff1..fc409a932 100644
--- a/app/javascript/mastodon/locales/fi.json
+++ b/app/javascript/mastodon/locales/fi.json
@@ -33,6 +33,7 @@
"column.home": "Koti",
"column.mutes": "Muted users",
"column.notifications": "Ilmoitukset",
+ "column.pins": "Pinned toot",
"column.public": "Yleinen aikajana",
"column_back_button.label": "Takaisin",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Extended information",
"navigation_bar.logout": "Kirjaudu ulos",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Ominaisuudet",
"navigation_bar.public_timeline": "Yleinen aikajana",
"notification.favourite": "{name} tykkäsi statuksestasi",
@@ -193,6 +195,15 @@
"upload_button.label": "Lisää mediaa",
"upload_form.undo": "Peru",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Äänet päälle/pois",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json
index 8ca632acc..d1b62d1a5 100644
--- a/app/javascript/mastodon/locales/fr.json
+++ b/app/javascript/mastodon/locales/fr.json
@@ -33,8 +33,8 @@
"column.home": "Accueil",
"column.mutes": "Comptes masqués",
"column.notifications": "Notifications",
- "column.public": "Fil public global",
"column.pins": "Pouets épinglés",
+ "column.public": "Fil public global",
"column_back_button.label": "Retour",
"column_header.hide_settings": "Masquer les paramètres",
"column_header.moveLeft_settings": "Déplacer la colonne vers la gauche",
@@ -110,9 +110,9 @@
"navigation_bar.info": "Plus d’informations",
"navigation_bar.logout": "Déconnexion",
"navigation_bar.mutes": "Comptes masqués",
+ "navigation_bar.pins": "Pouets épinglés",
"navigation_bar.preferences": "Préférences",
"navigation_bar.public_timeline": "Fil public global",
- "navigation_bar.pins": "Pouets épinglés",
"notification.favourite": "{name} a ajouté à ses favoris :",
"notification.follow": "{name} vous suit.",
"notification.mention": "{name} vous a mentionné⋅e :",
@@ -195,6 +195,15 @@
"upload_button.label": "Joindre un média",
"upload_form.undo": "Annuler",
"upload_progress.label": "Envoi en cours…",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Agrandir la vidéo",
"video_player.toggle_sound": "Activer/Désactiver le son",
"video_player.toggle_visible": "Afficher/Cacher la vidéo",
diff --git a/app/javascript/mastodon/locales/he.json b/app/javascript/mastodon/locales/he.json
index 9ef933108..06b401d39 100644
--- a/app/javascript/mastodon/locales/he.json
+++ b/app/javascript/mastodon/locales/he.json
@@ -33,6 +33,7 @@
"column.home": "בבית",
"column.mutes": "השתקות",
"column.notifications": "התראות",
+ "column.pins": "Pinned toot",
"column.public": "בפרהסיה",
"column_back_button.label": "חזרה",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "מידע נוסף",
"navigation_bar.logout": "יציאה",
"navigation_bar.mutes": "השתקות",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "העדפות",
"navigation_bar.public_timeline": "ציר זמן בין-קהילתי",
"notification.favourite": "חצרוצך חובב על ידי {name}",
@@ -193,6 +195,15 @@
"upload_button.label": "הוספת מדיה",
"upload_form.undo": "ביטול",
"upload_progress.label": "עולה...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "הרחבת וידאו",
"video_player.toggle_sound": "הפעלת\\ביטול שמע",
"video_player.toggle_visible": "הפעלת\\ביטול תצוגה",
diff --git a/app/javascript/mastodon/locales/hr.json b/app/javascript/mastodon/locales/hr.json
index f301723cf..cb28ce9c1 100644
--- a/app/javascript/mastodon/locales/hr.json
+++ b/app/javascript/mastodon/locales/hr.json
@@ -33,6 +33,7 @@
"column.home": "Dom",
"column.mutes": "Utišani korisnici",
"column.notifications": "Notifikacije",
+ "column.pins": "Pinned toot",
"column.public": "Federalni timeline",
"column_back_button.label": "Natrag",
"column_header.hide_settings": "Hide settings",
@@ -61,7 +62,6 @@
"confirmations.domain_block.message": "Jesi li zaista, zaista siguran da želiš potpuno blokirati {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",
"confirmations.mute.confirm": "Utišaj",
"confirmations.mute.message": "Jesi li siguran da želiš utišati {name}?",
- "confirmations.mute.message": "Jesi li siguran da želiš utišati {name}?",
"confirmations.unfollow.confirm": "Unfollow",
"confirmations.unfollow.message": "Are you sure you want to unfollow {name}?",
"embed.instructions": "Embed this status on your website by copying the code below.",
@@ -110,6 +110,7 @@
"navigation_bar.info": "Više informacija",
"navigation_bar.logout": "Odjavi se",
"navigation_bar.mutes": "Utišani korisnici",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Postavke",
"navigation_bar.public_timeline": "Federalni timeline",
"notification.favourite": "{name} je lajkao tvoj status",
@@ -194,6 +195,15 @@
"upload_button.label": "Dodaj media",
"upload_form.undo": "Poništi",
"upload_progress.label": "Uploadam...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Proširi video",
"video_player.toggle_sound": "Toggle zvuk",
"video_player.toggle_visible": "Preklopi vidljivost",
diff --git a/app/javascript/mastodon/locales/hu.json b/app/javascript/mastodon/locales/hu.json
index a708ec638..a13e4fee2 100644
--- a/app/javascript/mastodon/locales/hu.json
+++ b/app/javascript/mastodon/locales/hu.json
@@ -33,6 +33,7 @@
"column.home": "Kezdőlap",
"column.mutes": "Muted users",
"column.notifications": "Értesítések",
+ "column.pins": "Pinned toot",
"column.public": "Nyilvános",
"column_back_button.label": "Vissza",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Extended information",
"navigation_bar.logout": "Kijelentkezés",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Beállítások",
"navigation_bar.public_timeline": "Nyilvános időfolyam",
"notification.favourite": "{name} kedvencnek jelölte az állapotod",
@@ -193,6 +195,15 @@
"upload_button.label": "Média hozzáadása",
"upload_form.undo": "Mégsem",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Hang kapcsolása",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/id.json b/app/javascript/mastodon/locales/id.json
index d71e293e8..349423cce 100644
--- a/app/javascript/mastodon/locales/id.json
+++ b/app/javascript/mastodon/locales/id.json
@@ -33,6 +33,7 @@
"column.home": "Beranda",
"column.mutes": "Pengguna dibisukan",
"column.notifications": "Notifikasi",
+ "column.pins": "Pinned toot",
"column.public": "Linimasa gabunggan",
"column_back_button.label": "Kembali",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Informasi selengkapnya",
"navigation_bar.logout": "Keluar",
"navigation_bar.mutes": "Pengguna dibisukan",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Pengaturan",
"navigation_bar.public_timeline": "Linimasa gabungan",
"notification.favourite": "{name} menyukai status anda",
@@ -193,6 +195,15 @@
"upload_button.label": "Tambahkan media",
"upload_form.undo": "Undo",
"upload_progress.label": "Mengunggah...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Tampilkan video",
"video_player.toggle_sound": "Suara",
"video_player.toggle_visible": "Tampilan",
diff --git a/app/javascript/mastodon/locales/io.json b/app/javascript/mastodon/locales/io.json
index 5df5c59a1..5f19509e2 100644
--- a/app/javascript/mastodon/locales/io.json
+++ b/app/javascript/mastodon/locales/io.json
@@ -33,6 +33,7 @@
"column.home": "Hemo",
"column.mutes": "Celita uzeri",
"column.notifications": "Savigi",
+ "column.pins": "Pinned toot",
"column.public": "Federata tempolineo",
"column_back_button.label": "Retro",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Detaloza informi",
"navigation_bar.logout": "Ekirar",
"navigation_bar.mutes": "Celita uzeri",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferi",
"navigation_bar.public_timeline": "Federata tempolineo",
"notification.favourite": "{name} favorizis tua mesajo",
@@ -193,6 +195,15 @@
"upload_button.label": "Adjuntar kontenajo",
"upload_form.undo": "Desfacar",
"upload_progress.label": "Kargante...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Extensar video",
"video_player.toggle_sound": "Acendar sono",
"video_player.toggle_visible": "Chanjar videbleso",
diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json
index eec35a70c..cedbb947c 100644
--- a/app/javascript/mastodon/locales/it.json
+++ b/app/javascript/mastodon/locales/it.json
@@ -33,6 +33,7 @@
"column.home": "Home",
"column.mutes": "Utenti silenziati",
"column.notifications": "Notifiche",
+ "column.pins": "Pinned toot",
"column.public": "Timeline federata",
"column_back_button.label": "Indietro",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Informazioni estese",
"navigation_bar.logout": "Logout",
"navigation_bar.mutes": "Utenti silenziati",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Impostazioni",
"navigation_bar.public_timeline": "Timeline federata",
"notification.favourite": "{name} ha apprezzato il tuo post",
@@ -193,6 +195,15 @@
"upload_button.label": "Aggiungi file multimediale",
"upload_form.undo": "Annulla",
"upload_progress.label": "Sto caricando...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Espandi video",
"video_player.toggle_sound": "Attiva suono",
"video_player.toggle_visible": "Attiva visibilità",
diff --git a/app/javascript/mastodon/locales/ja.json b/app/javascript/mastodon/locales/ja.json
index 65838a3f8..4e3164ec5 100644
--- a/app/javascript/mastodon/locales/ja.json
+++ b/app/javascript/mastodon/locales/ja.json
@@ -33,8 +33,8 @@
"column.home": "ホーム",
"column.mutes": "ミュートしたユーザー",
"column.notifications": "通知",
- "column.public": "連合タイムライン",
"column.pins": "固定されたトゥート",
+ "column.public": "連合タイムライン",
"column_back_button.label": "戻る",
"column_header.hide_settings": "設定を隠す",
"column_header.moveLeft_settings": "カラムを左に移動する",
@@ -110,9 +110,9 @@
"navigation_bar.info": "このインスタンスについて",
"navigation_bar.logout": "ログアウト",
"navigation_bar.mutes": "ミュートしたユーザー",
+ "navigation_bar.pins": "固定されたトゥート",
"navigation_bar.preferences": "ユーザー設定",
"navigation_bar.public_timeline": "連合タイムライン",
- "navigation_bar.pins": "固定されたトゥート",
"notification.favourite": "{name}さんがあなたのトゥートをお気に入りに登録しました",
"notification.follow": "{name}さんにフォローされました",
"notification.mention": "{name}さんがあなたに返信しました",
@@ -195,6 +195,15 @@
"upload_button.label": "メディアを追加",
"upload_form.undo": "やり直す",
"upload_progress.label": "アップロード中...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "動画の詳細",
"video_player.toggle_sound": "音の切り替え",
"video_player.toggle_visible": "表示切り替え",
diff --git a/app/javascript/mastodon/locales/ko.json b/app/javascript/mastodon/locales/ko.json
index 8393e82e5..46ed772cf 100644
--- a/app/javascript/mastodon/locales/ko.json
+++ b/app/javascript/mastodon/locales/ko.json
@@ -33,8 +33,8 @@
"column.home": "홈",
"column.mutes": "뮤트 중인 사용자",
"column.notifications": "알림",
- "column.public": "연합 타임라인",
"column.pins": "고정된 Toot",
+ "column.public": "연합 타임라인",
"column_back_button.label": "돌아가기",
"column_header.hide_settings": "Hide settings",
"column_header.moveLeft_settings": "Move column to the left",
@@ -110,9 +110,9 @@
"navigation_bar.info": "이 인스턴스에 대해서",
"navigation_bar.logout": "로그아웃",
"navigation_bar.mutes": "뮤트 중인 사용자",
+ "navigation_bar.pins": "고정된 Toot",
"navigation_bar.preferences": "사용자 설정",
"navigation_bar.public_timeline": "연합 타임라인",
- "navigation_bar.pins": "고정된 Toot",
"notification.favourite": "{name}님이 즐겨찾기 했습니다",
"notification.follow": "{name}님이 나를 팔로우 했습니다",
"notification.mention": "{name}님이 답글을 보냈습니다",
@@ -195,6 +195,15 @@
"upload_button.label": "미디어 추가",
"upload_form.undo": "재시도",
"upload_progress.label": "업로드 중...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "동영상 자세히 보기",
"video_player.toggle_sound": "소리 토글하기",
"video_player.toggle_visible": "표시 전환",
diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json
index 2cadc7ac2..b3cdc8db6 100644
--- a/app/javascript/mastodon/locales/nl.json
+++ b/app/javascript/mastodon/locales/nl.json
@@ -33,6 +33,7 @@
"column.home": "Start",
"column.mutes": "Genegeerde gebruikers",
"column.notifications": "Meldingen",
+ "column.pins": "Pinned toot",
"column.public": "Globale tijdlijn",
"column.pins": "Vastgezette toots",
"column_back_button.label": "terug",
@@ -111,6 +112,7 @@
"navigation_bar.info": "Uitgebreide informatie",
"navigation_bar.logout": "Afmelden",
"navigation_bar.mutes": "Genegeerde gebruikers",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Instellingen",
"navigation_bar.public_timeline": "Globale tijdlijn",
"navigation_bar.pins": "Vastgezette toots",
@@ -196,6 +198,15 @@
"upload_button.label": "Media toevoegen",
"upload_form.undo": "Ongedaan maken",
"upload_progress.label": "Uploaden...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Video groter maken",
"video_player.toggle_sound": "Geluid in-/uitschakelen",
"video_player.toggle_visible": "Video wel/niet tonen",
diff --git a/app/javascript/mastodon/locales/no.json b/app/javascript/mastodon/locales/no.json
index f3c24a807..742017c66 100644
--- a/app/javascript/mastodon/locales/no.json
+++ b/app/javascript/mastodon/locales/no.json
@@ -33,6 +33,7 @@
"column.home": "Hjem",
"column.mutes": "Dempede brukere",
"column.notifications": "Varsler",
+ "column.pins": "Pinned toot",
"column.public": "Felles tidslinje",
"column_back_button.label": "Tilbake",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Utvidet informasjon",
"navigation_bar.logout": "Logg ut",
"navigation_bar.mutes": "Dempede brukere",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferanser",
"navigation_bar.public_timeline": "Felles tidslinje",
"notification.favourite": "{name} likte din status",
@@ -193,6 +195,15 @@
"upload_button.label": "Legg til media",
"upload_form.undo": "Angre",
"upload_progress.label": "Laster opp...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Utvid video",
"video_player.toggle_sound": "Veksle lyd",
"video_player.toggle_visible": "Veksle synlighet",
diff --git a/app/javascript/mastodon/locales/oc.json b/app/javascript/mastodon/locales/oc.json
index d2b2dd48f..be290ed32 100644
--- a/app/javascript/mastodon/locales/oc.json
+++ b/app/javascript/mastodon/locales/oc.json
@@ -33,8 +33,8 @@
"column.home": "Acuèlh",
"column.mutes": "Personas en silenci",
"column.notifications": "Notificacions",
- "column.public": "Flux public global",
"column.pins": "Tuts penjats",
+ "column.public": "Flux public global",
"column_back_button.label": "Tornar",
"column_header.hide_settings": "Amagar los paramètres",
"column_header.moveLeft_settings": "Desplaçar la colomna a man drecha",
@@ -110,9 +110,9 @@
"navigation_bar.info": "Mai informacions",
"navigation_bar.logout": "Desconnexion",
"navigation_bar.mutes": "Personas rescondudas",
+ "navigation_bar.pins": "Tuts penjats",
"navigation_bar.preferences": "Preferéncias",
"navigation_bar.public_timeline": "Flux public global",
- "navigation_bar.pins": "Tuts penjats",
"notification.favourite": "{name} a ajustat a sos favorits :",
"notification.follow": "{name} vos sèc",
"notification.mention": "{name} vos a mencionat :",
@@ -195,6 +195,15 @@
"upload_button.label": "Ajustar un mèdia",
"upload_form.undo": "Anullar",
"upload_progress.label": "Mandadís…",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Mostrar la vidèo",
"video_player.toggle_sound": "Activar/Desactivar lo son",
"video_player.toggle_visible": "Mostrar/Rescondre la vidèo",
diff --git a/app/javascript/mastodon/locales/pl.json b/app/javascript/mastodon/locales/pl.json
index daa60128d..7eea05c8c 100644
--- a/app/javascript/mastodon/locales/pl.json
+++ b/app/javascript/mastodon/locales/pl.json
@@ -195,6 +195,15 @@
"upload_button.label": "Dodaj zawartość multimedialną",
"upload_form.undo": "Cofnij",
"upload_progress.label": "Wysyłanie",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Przełącz wideo",
"video_player.toggle_sound": "Przełącz dźwięk",
"video_player.toggle_visible": "Przełącz widoczność",
diff --git a/app/javascript/mastodon/locales/pt-BR.json b/app/javascript/mastodon/locales/pt-BR.json
index 87f8097aa..59076d3e4 100644
--- a/app/javascript/mastodon/locales/pt-BR.json
+++ b/app/javascript/mastodon/locales/pt-BR.json
@@ -33,8 +33,8 @@
"column.home": "Página inicial",
"column.mutes": "Usuários silenciados",
"column.notifications": "Notificações",
- "column.public": "Global",
"column.pins": "Postagens fixadas",
+ "column.public": "Global",
"column_back_button.label": "Voltar",
"column_header.hide_settings": "Esconder configurações",
"column_header.moveLeft_settings": "Mover coluna para a esquerda",
@@ -110,9 +110,9 @@
"navigation_bar.info": "Mais informações",
"navigation_bar.logout": "Sair",
"navigation_bar.mutes": "Usuários silenciados",
+ "navigation_bar.pins": "Postagens fixadas",
"navigation_bar.preferences": "Preferências",
"navigation_bar.public_timeline": "Global",
- "navigation_bar.pins": "Postagens fixadas",
"notification.favourite": "{name} adicionou a sua postagem aos favoritos",
"notification.follow": "{name} te seguiu",
"notification.mention": "{name} te mencionou",
@@ -195,6 +195,15 @@
"upload_button.label": "Adicionar mídia",
"upload_form.undo": "Anular",
"upload_progress.label": "Salvando...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expandir vídeo",
"video_player.toggle_sound": "Ligar/Desligar som",
"video_player.toggle_visible": "Ligar/Desligar vídeo",
diff --git a/app/javascript/mastodon/locales/pt.json b/app/javascript/mastodon/locales/pt.json
index f9e686411..cff528f83 100644
--- a/app/javascript/mastodon/locales/pt.json
+++ b/app/javascript/mastodon/locales/pt.json
@@ -33,6 +33,7 @@
"column.home": "Home",
"column.mutes": "Utilizadores silenciados",
"column.notifications": "Notificações",
+ "column.pins": "Pinned toot",
"column.public": "Global",
"column_back_button.label": "Voltar",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Mais informações",
"navigation_bar.logout": "Sair",
"navigation_bar.mutes": "Utilizadores silenciados",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferências",
"navigation_bar.public_timeline": "Global",
"notification.favourite": "{name} adicionou o teu post aos favoritos",
@@ -193,6 +195,15 @@
"upload_button.label": "Adicionar media",
"upload_form.undo": "Anular",
"upload_progress.label": "A gravar...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expandir vídeo",
"video_player.toggle_sound": "Ligar/Desligar som",
"video_player.toggle_visible": "Ligar/Desligar vídeo",
diff --git a/app/javascript/mastodon/locales/ru.json b/app/javascript/mastodon/locales/ru.json
index 0f78f4b17..fcc147c87 100644
--- a/app/javascript/mastodon/locales/ru.json
+++ b/app/javascript/mastodon/locales/ru.json
@@ -33,6 +33,7 @@
"column.home": "Главная",
"column.mutes": "Список глушения",
"column.notifications": "Уведомления",
+ "column.pins": "Pinned toot",
"column.public": "Глобальная лента",
"column_back_button.label": "Назад",
"column_header.hide_settings": "Скрыть настройки",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Об узле",
"navigation_bar.logout": "Выйти",
"navigation_bar.mutes": "Список глушения",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Опции",
"navigation_bar.public_timeline": "Глобальная лента",
"notification.favourite": "{name} понравился Ваш статус",
@@ -193,6 +195,15 @@
"upload_button.label": "Добавить медиаконтент",
"upload_form.undo": "Отменить",
"upload_progress.label": "Загрузка...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Развернуть видео",
"video_player.toggle_sound": "Вкл./выкл. звук",
"video_player.toggle_visible": "Показать/скрыть",
diff --git a/app/javascript/mastodon/locales/th.json b/app/javascript/mastodon/locales/th.json
index 069fdf7c3..f2752f5e0 100644
--- a/app/javascript/mastodon/locales/th.json
+++ b/app/javascript/mastodon/locales/th.json
@@ -33,6 +33,7 @@
"column.home": "Home",
"column.mutes": "Muted users",
"column.notifications": "Notifications",
+ "column.pins": "Pinned toot",
"column.public": "Federated timeline",
"column_back_button.label": "Back",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "About this instance",
"navigation_bar.logout": "Logout",
"navigation_bar.mutes": "Muted users",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Preferences",
"navigation_bar.public_timeline": "Federated timeline",
"notification.favourite": "{name} favourited your status",
@@ -193,6 +195,15 @@
"upload_button.label": "Add media",
"upload_form.undo": "Undo",
"upload_progress.label": "Uploading...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Expand video",
"video_player.toggle_sound": "Toggle sound",
"video_player.toggle_visible": "Toggle visibility",
diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json
index 8a36bd207..2676b851c 100644
--- a/app/javascript/mastodon/locales/tr.json
+++ b/app/javascript/mastodon/locales/tr.json
@@ -33,6 +33,7 @@
"column.home": "Anasayfa",
"column.mutes": "Susturulmuş kullanıcılar",
"column.notifications": "Bildirimler",
+ "column.pins": "Pinned toot",
"column.public": "Federe zaman tüneli",
"column_back_button.label": "Geri",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Genişletilmiş bilgi",
"navigation_bar.logout": "Çıkış",
"navigation_bar.mutes": "Sessize alınmış kullanıcılar",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Tercihler",
"navigation_bar.public_timeline": "Federe zaman tüneli",
"notification.favourite": "{name} senin durumunu favorilere ekledi",
@@ -193,6 +195,15 @@
"upload_button.label": "Görsel ekle",
"upload_form.undo": "Geri al",
"upload_progress.label": "Yükleniyor...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Videoyu genişlet",
"video_player.toggle_sound": "Sesi aç/kapa",
"video_player.toggle_visible": "Göster/gizle",
diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json
index 1d06218e6..6b5ab64ef 100644
--- a/app/javascript/mastodon/locales/uk.json
+++ b/app/javascript/mastodon/locales/uk.json
@@ -33,6 +33,7 @@
"column.home": "Головна",
"column.mutes": "Заглушені користувачі",
"column.notifications": "Сповіщення",
+ "column.pins": "Pinned toot",
"column.public": "Глобальна стрічка",
"column_back_button.label": "Назад",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "Про інстанцію",
"navigation_bar.logout": "Вийти",
"navigation_bar.mutes": "Заглушені користувачі",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "Налаштування",
"navigation_bar.public_timeline": "Глобальна стрічка",
"notification.favourite": "{name} сподобався ваш допис",
@@ -193,6 +195,15 @@
"upload_button.label": "Додати медіаконтент",
"upload_form.undo": "Відмінити",
"upload_progress.label": "Завантаження...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "Розгорнути ",
"video_player.toggle_sound": "Увімкнути/вимкнути звук",
"video_player.toggle_visible": "Показати/приховати",
diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json
index 93faf8876..65d67c128 100644
--- a/app/javascript/mastodon/locales/zh-CN.json
+++ b/app/javascript/mastodon/locales/zh-CN.json
@@ -33,6 +33,7 @@
"column.home": "主页",
"column.mutes": "被静音的用户",
"column.notifications": "通知",
+ "column.pins": "Pinned toot",
"column.public": "跨站公共时间轴",
"column_back_button.label": "返回",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "关于本站",
"navigation_bar.logout": "注销",
"navigation_bar.mutes": "被静音的用户",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "首选项",
"navigation_bar.public_timeline": "跨站公共时间轴",
"notification.favourite": "{name} 赞了你的嘟文",
@@ -193,6 +195,15 @@
"upload_button.label": "上传媒体文件",
"upload_form.undo": "还原",
"upload_progress.label": "上传中……",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "展开影片",
"video_player.toggle_sound": "开关音效",
"video_player.toggle_visible": "打开或关上",
diff --git a/app/javascript/mastodon/locales/zh-HK.json b/app/javascript/mastodon/locales/zh-HK.json
index d689cd5ae..91bd91636 100644
--- a/app/javascript/mastodon/locales/zh-HK.json
+++ b/app/javascript/mastodon/locales/zh-HK.json
@@ -33,6 +33,7 @@
"column.home": "主頁",
"column.mutes": "靜音名單",
"column.notifications": "通知",
+ "column.pins": "Pinned toot",
"column.public": "跨站時間軸",
"column_back_button.label": "返回",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "關於本服務站",
"navigation_bar.logout": "登出",
"navigation_bar.mutes": "被你靜音的用戶",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "偏好設定",
"navigation_bar.public_timeline": "跨站時間軸",
"notification.favourite": "{name} 喜歡你的文章",
@@ -193,6 +195,15 @@
"upload_button.label": "上載媒體檔案",
"upload_form.undo": "還原",
"upload_progress.label": "上載中……",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "展開影片",
"video_player.toggle_sound": "開關音效",
"video_player.toggle_visible": "打開或關上",
diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json
index dcb9d7f3c..cfe7ccf91 100644
--- a/app/javascript/mastodon/locales/zh-TW.json
+++ b/app/javascript/mastodon/locales/zh-TW.json
@@ -33,6 +33,7 @@
"column.home": "家",
"column.mutes": "消音的使用者",
"column.notifications": "通知",
+ "column.pins": "Pinned toot",
"column.public": "聯盟時間軸",
"column_back_button.label": "上一頁",
"column_header.hide_settings": "Hide settings",
@@ -109,6 +110,7 @@
"navigation_bar.info": "關於本站",
"navigation_bar.logout": "登出",
"navigation_bar.mutes": "消音的使用者",
+ "navigation_bar.pins": "Pinned toots",
"navigation_bar.preferences": "偏好設定",
"navigation_bar.public_timeline": "聯盟時間軸",
"notification.favourite": "{name}喜歡你的狀態",
@@ -193,6 +195,15 @@
"upload_button.label": "增加媒體",
"upload_form.undo": "復原",
"upload_progress.label": "上傳中...",
+ "video.close": "Close video",
+ "video.exit_fullscreen": "Exit full screen",
+ "video.expand": "Expand video",
+ "video.fullscreen": "Full screen",
+ "video.hide": "Hide video",
+ "video.mute": "Mute sound",
+ "video.pause": "Pause",
+ "video.play": "Play",
+ "video.unmute": "Unmute sound",
"video_player.expand": "展開影片",
"video_player.toggle_sound": "切換音效",
"video_player.toggle_visible": "切換可見性",
diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js
index ca6f9eac6..6f72a8050 100644
--- a/app/javascript/packs/public.js
+++ b/app/javascript/packs/public.js
@@ -24,6 +24,11 @@ function main() {
const emojify = require('../mastodon/emoji').default;
const { getLocale } = require('../mastodon/locales');
const { localeData } = getLocale();
+ const VideoContainer = require('../mastodon/containers/video_container').default;
+ const MediaGalleryContainer = require('../mastodon/containers/media_gallery_container').default;
+ const CardContainer = require('../mastodon/containers/card_container').default;
+ const React = require('react');
+ const ReactDOM = require('react-dom');
localeData.forEach(IntlRelativeFormat.__addLocaleData);
@@ -65,22 +70,21 @@ function main() {
window.open(e.target.href, 'mastodon-intent', 'width=400,height=400,resizable=no,menubar=no,status=no,scrollbars=yes');
});
});
- });
- delegate(document, '.video-player video', 'click', ({ target }) => {
- if (target.paused) {
- target.play();
- } else {
- target.pause();
- }
- });
+ [].forEach.call(document.querySelectorAll('[data-component="Video"]'), (content) => {
+ const props = JSON.parse(content.getAttribute('data-props'));
+ ReactDOM.render(, content);
+ });
- delegate(document, '.activity-stream .media-spoiler-wrapper .media-spoiler', 'click', function() {
- this.parentNode.classList.add('media-spoiler-wrapper__visible');
- });
+ [].forEach.call(document.querySelectorAll('[data-component="MediaGallery"]'), (content) => {
+ const props = JSON.parse(content.getAttribute('data-props'));
+ ReactDOM.render(, content);
+ });
- delegate(document, '.activity-stream .media-spoiler-wrapper .spoiler-button', 'click', function() {
- this.parentNode.classList.remove('media-spoiler-wrapper__visible');
+ [].forEach.call(document.querySelectorAll('[data-component="Card"]'), (content) => {
+ const props = JSON.parse(content.getAttribute('data-props'));
+ ReactDOM.render(, content);
+ });
});
delegate(document, '.webapp-btn', 'click', ({ target, button }) => {
diff --git a/app/javascript/styles/components.scss b/app/javascript/styles/components.scss
index 75485d6b6..3039e3b8e 100644
--- a/app/javascript/styles/components.scss
+++ b/app/javascript/styles/components.scss
@@ -566,6 +566,10 @@
opacity: 1;
animation: fade 150ms linear;
+ .video-player {
+ margin-top: 8px;
+ }
+
&.status-direct {
background: lighten($ui-base-color, 8%);
@@ -734,6 +738,10 @@
height: 22px;
}
}
+
+ .video-player {
+ margin-top: 8px;
+ }
}
.detailed-status__meta {
@@ -1404,9 +1412,6 @@
.drawer {
flex: 1 1 100%;
overflow: hidden;
- @supports(display: grid) { // hack to fix Chrome <57
- contain: strict;
- }
}
@media screen and (min-width: 360px) {
@@ -1582,9 +1587,6 @@
overflow-x: hidden;
flex: 1 1 auto;
-webkit-overflow-scrolling: touch;
- @supports(display: grid) { // hack to fix Chrome <57
- contain: strict;
- }
&.optionally-scrollable {
overflow-y: auto;
@@ -2341,10 +2343,16 @@ button.icon-button.active i.fa-retweet {
.media-spoiler {
background: $base-overlay-background;
- color: $primary-text-color;
+ color: $ui-primary-color;
border: 0;
width: 100%;
height: 100%;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-primary-color, 8%);
+ }
}
.media-spoiler__warning {
@@ -3798,6 +3806,181 @@ button.icon-button.active i.fa-retweet {
z-index: 5;
}
+.video-player {
+ overflow: hidden;
+ position: relative;
+ background: $base-shadow-color;
+
+ video {
+ height: 100%;
+ width: 100%;
+ z-index: 1;
+ }
+
+ &.fullscreen {
+ width: 100% !important;
+ height: 100% !important;
+ margin: 0;
+
+ video {
+ max-width: 100% !important;
+ max-height: 100% !important;
+ }
+ }
+
+ &.inline {
+ video {
+ object-fit: cover;
+ position: relative;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
+
+ &__controls {
+ position: absolute;
+ z-index: 2;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ box-sizing: border-box;
+ background: linear-gradient(0deg, rgba($base-shadow-color, 0.8) 0, rgba($base-shadow-color, 0.35) 60%, transparent);
+ padding: 0 10px;
+ opacity: 0;
+ transition: opacity .1s ease;
+
+ &.active {
+ opacity: 1;
+ }
+ }
+
+ &.inactive {
+ video,
+ .video-player__controls {
+ visibility: hidden;
+ }
+ }
+
+ &__spoiler {
+ display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 4;
+ border: 0;
+ background: $base-shadow-color;
+ color: $ui-primary-color;
+ transition: none;
+ pointer-events: none;
+
+ &.active {
+ display: block;
+ pointer-events: auto;
+
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($ui-primary-color, 8%);
+ }
+ }
+
+ &__title {
+ display: block;
+ font-size: 14px;
+ }
+
+ &__subtitle {
+ display: block;
+ font-size: 11px;
+ font-weight: 500;
+ }
+ }
+
+ &__buttons {
+ padding-bottom: 10px;
+ font-size: 16px;
+
+ &.left {
+ float: left;
+
+ button {
+ padding-right: 10px;
+ }
+ }
+
+ &.right {
+ float: right;
+
+ button {
+ padding-left: 10px;
+ }
+ }
+
+ button {
+ background: transparent;
+ padding: 0;
+ border: 0;
+ color: $white;
+
+ &:active,
+ &:hover,
+ &:focus {
+ color: $ui-highlight-color;
+ }
+ }
+ }
+
+ &__seek {
+ cursor: pointer;
+ height: 24px;
+ position: relative;
+
+ &::before {
+ content: "";
+ width: 100%;
+ background: rgba($white, 0.35);
+ display: block;
+ position: absolute;
+ height: 4px;
+ top: 10px;
+ }
+
+ &__progress {
+ display: block;
+ position: absolute;
+ height: 4px;
+ top: 10px;
+ background: $ui-highlight-color;
+ }
+
+ &__handle {
+ position: absolute;
+ z-index: 3;
+ opacity: 0;
+ border-radius: 50%;
+ width: 12px;
+ height: 12px;
+ top: 6px;
+ margin-left: -6px;
+ transition: opacity .1s ease;
+ background: $ui-highlight-color;
+ pointer-events: none;
+
+ &.active {
+ opacity: 1;
+ }
+ }
+
+ &:hover {
+ .video-player__seek__handle {
+ opacity: 1;
+ }
+ }
+ }
+}
+
.media-spoiler-video {
background-size: cover;
background-repeat: no-repeat;
diff --git a/app/javascript/styles/stream_entries.scss b/app/javascript/styles/stream_entries.scss
index 8ed4c0b25..ba6d89107 100644
--- a/app/javascript/styles/stream_entries.scss
+++ b/app/javascript/styles/stream_entries.scss
@@ -143,19 +143,6 @@
}
}
}
-
- .status__attachments {
- margin-top: 8px;
- overflow: hidden;
- width: 100%;
- box-sizing: border-box;
- position: relative;
-
- .status__attachments__inner {
- display: flex;
- height: 214px;
- }
- }
}
.detailed-status.light {
@@ -237,139 +224,22 @@
}
}
- .detailed-status__attachments {
- margin-top: 8px;
- overflow: hidden;
- width: 100%;
- box-sizing: border-box;
- position: relative;
+ .status-card {
+ border-color: lighten($ui-secondary-color, 4%);
+ color: darken($ui-primary-color, 4%);
- .status__attachments__inner {
- display: flex;
- height: 360px;
- }
- }
-
- .video-player {
- margin-top: 8px;
- height: 300px;
- overflow: hidden;
- position: relative;
-
- video {
- position: relative;
- z-index: 1;
- width: 100%;
- height: 100%;
- object-fit: cover;
- top: 50%;
- transform: translateY(-50%);
+ &:hover {
+ background: lighten($ui-secondary-color, 4%);
}
}
- }
- .media-item,
- .video-item {
- box-sizing: border-box;
- position: relative;
- left: auto;
- top: auto;
- right: auto;
- bottom: auto;
- float: left;
- border: medium none;
- display: block;
- flex: 1 1 auto;
- width: 100%;
- height: 100%;
- overflow: hidden;
- margin-right: 2px;
-
- &:last-child {
- margin-right: 0;
- }
-
- a {
- display: block;
- width: 100%;
- height: 100%;
- background: no-repeat scroll center center / cover;
- text-decoration: none;
- cursor: zoom-in;
- }
-
- video {
- position: relative;
- z-index: 1;
- width: 100%;
- height: 100%;
- object-fit: cover;
- top: 50%;
- transform: translateY(-50%);
- }
- }
-
- .video-item {
- a {
- cursor: pointer;
- }
-
- .video-item__play {
- position: absolute;
- top: 50%;
- left: 50%;
- font-size: 36px;
- transform: translate(-50%, -50%);
- padding: 5px;
- border-radius: 100px;
- color: rgba($primary-text-color, 0.8);
- z-index: 1;
- }
- }
-
- .media-spoiler {
- background: $ui-primary-color;
- width: 100%;
- height: 100%;
- cursor: pointer;
- position: absolute;
- top: 0;
- left: 0;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
- text-align: center;
- transition: all 100ms linear;
- z-index: 2;
-
- &:hover {
- background: darken($ui-primary-color, 5%);
- }
-
- span {
- display: block;
-
- &:first-child {
- font-size: 14px;
- }
-
- &:last-child {
- font-size: 11px;
- font-weight: 500;
- }
+ .status-card__title,
+ .status-card__description {
+ color: $ui-base-color;
}
- }
-
- .media-spoiler-wrapper {
- &.media-spoiler-wrapper__visible {
- .media-spoiler {
- display: none;
- }
- .spoiler-button {
- display: block;
- }
+ .status-card__image {
+ background: $ui-secondary-color;
}
}
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 466087b6a..dd9456260 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -19,17 +19,14 @@
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
- - unless status.media_attachments.empty?
+ - if !status.media_attachments.empty?
- if status.media_attachments.first.video?
- .video-player
- = render partial: 'stream_entries/content_spoiler', locals: { sensitive: status.sensitive? }
- %video.u-video{ src: status.media_attachments.first.file.url(:original), loop: true }
+ - video = status.media_attachments.first
+ %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380) }}
- else
- .detailed-status__attachments
- = render partial: 'stream_entries/content_spoiler', locals: { sensitive: status.sensitive? }
- .status__attachments__inner
- - status.media_attachments.each do |media|
- = render partial: 'stream_entries/media', locals: { media: media }
+ %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
+ - elsif status.preview_cards.first
+ %div{ data: { component: 'Card', props: Oj.dump('maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json) }}
.detailed-status__meta
%data.dt-published{ value: status.created_at.to_time.iso8601 }
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index 2df0cc850..55aa97f32 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -21,15 +21,8 @@
.e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
- unless status.media_attachments.empty?
- .status__attachments
- = render partial: 'stream_entries/content_spoiler', locals: { sensitive: status.sensitive? }
- - if status.media_attachments.first.video?
- .status__attachments__inner
- .video-item
- = link_to (status.media_attachments.first.remote_url.blank? ? status.media_attachments.first.file.url(:original) : status.media_attachments.first.remote_url), style: "background-image: url(#{status.media_attachments.first.file.url(:small)})", target: '_blank', rel: 'noopener', class: 'u-video' do
- .video-item__play
- = fa_icon('play')
- - else
- .status__attachments__inner
- - status.media_attachments.each do |media|
- = render partial: 'stream_entries/media', locals: { media: media }
+ - if status.media_attachments.first.video?
+ - video = status.media_attachments.first
+ %div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 610, height: 343) }}
+ - else
+ %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
--
cgit
From dcf1139ebd65375fd130d71c2e664827d00e9d4f Mon Sep 17 00:00:00 2001
From: Yamagishi Kazutoshi
Date: Mon, 18 Sep 2017 22:00:29 +0900
Subject: Do not add image size without meta to OGP (regression from #4901)
(#4995)
---
app/views/stream_entries/_og_image.html.haml | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
(limited to 'app/views/stream_entries')
diff --git a/app/views/stream_entries/_og_image.html.haml b/app/views/stream_entries/_og_image.html.haml
index 66d9619b2..b5058583b 100644
--- a/app/views/stream_entries/_og_image.html.haml
+++ b/app/views/stream_entries/_og_image.html.haml
@@ -3,17 +3,20 @@
- if media.image?
= opengraph 'og:image', full_asset_url(media.file.url(:original))
= opengraph 'og:image:type', media.file_content_type
- = opengraph 'og:image:width', media.file.meta['original']['width']
- = opengraph 'og:image:height', media.file.meta['original']['height']
+ - unless media.file.meta.nil?
+ = opengraph 'og:image:width', media.file.meta['original']['width']
+ = opengraph 'og:image:height', media.file.meta['original']['height']
- elsif media.video?
= opengraph 'og:image', full_asset_url(media.file.url(:small))
= opengraph 'og:image:type', 'image/png'
- = opengraph 'og:image:width', media.file.meta['small']['width']
- = opengraph 'og:image:height', media.file.meta['small']['height']
+ - unless media.file.meta.nil?
+ = opengraph 'og:image:width', media.file.meta['small']['width']
+ = opengraph 'og:image:height', media.file.meta['small']['height']
= opengraph 'og:video', full_asset_url(media.file.url(:original))
= opengraph 'og:video:type', media.file_content_type
- = opengraph 'og:video:width', media.file.meta['small']['width']
- = opengraph 'og:video:height', media.file.meta['small']['height']
+ - unless media.file.meta.nil?
+ = opengraph 'og:video:width', media.file.meta['small']['width']
+ = opengraph 'og:video:height', media.file.meta['small']['height']
- else
= opengraph 'og:image', full_asset_url(account.avatar.url(:original))
= opengraph 'og:image:width', '120'
--
cgit
From 81cec35dbf1b348d23363559e3f4e6b1ec3415c5 Mon Sep 17 00:00:00 2001
From: Eugen Rochko
Date: Tue, 19 Sep 2017 02:42:40 +0200
Subject: Custom emoji (#4988)
* Custom emoji
- In OStatus: ``
- In ActivityPub: `{ type: "Emoji", name: ":coolcat:", href: "http://..." }`
- In REST API: Status object includes `emojis` array (`shortcode`, `url`)
- Domain blocks with reject media stop emojis
- Emoji file up to 50KB
- Web UI handles custom emojis
- Static pages render custom emojis as `` tags
Side effects:
- Undo #4500 optimization, as I needed to modify it to restore
shortcode handling in emojify()
- Formatter#plaintext should now make sure stripped out line-breaks
and paragraphs are replaced with newlines
* Fix emoji at the start not being converted
---
app/javascript/mastodon/emoji.js | 60 ++++++++++------
app/javascript/mastodon/reducers/statuses.js | 9 ++-
app/lib/activitypub/activity/create.rb | 13 ++++
app/lib/formatter.rb | 54 +++++++++++++-
app/lib/ostatus/activity/creation.rb | 20 ++++++
app/lib/ostatus/atom_serializer.rb | 4 ++
app/models/custom_emoji.rb | 38 ++++++++++
app/models/status.rb | 4 ++
app/serializers/activitypub/note_serializer.rb | 20 +++++-
app/serializers/rest/status_serializer.rb | 11 +++
.../stream_entries/_detailed_status.html.haml | 2 +-
app/views/stream_entries/_simple_status.html.haml | 2 +-
db/migrate/20170917153509_create_custom_emojis.rb | 13 ++++
db/schema.rb | 14 +++-
spec/fabricators/custom_emoji_fabricator.rb | 5 ++
spec/fixtures/files/emojo.png | Bin 0 -> 29814 bytes
spec/lib/activitypub/activity/create_spec.rb | 25 +++++++
spec/lib/formatter_spec.rb | 78 +++++++++++++++++++++
spec/lib/ostatus/atom_serializer_spec.rb | 16 ++++-
spec/models/custom_emoji_spec.rb | 25 +++++++
20 files changed, 382 insertions(+), 31 deletions(-)
create mode 100644 app/models/custom_emoji.rb
create mode 100644 db/migrate/20170917153509_create_custom_emojis.rb
create mode 100644 spec/fabricators/custom_emoji_fabricator.rb
create mode 100644 spec/fixtures/files/emojo.png
create mode 100644 spec/models/custom_emoji_spec.rb
(limited to 'app/views/stream_entries')
diff --git a/app/javascript/mastodon/emoji.js b/app/javascript/mastodon/emoji.js
index a41dfdd1d..865b85b61 100644
--- a/app/javascript/mastodon/emoji.js
+++ b/app/javascript/mastodon/emoji.js
@@ -3,28 +3,48 @@ import Trie from 'substring-trie';
const trie = new Trie(Object.keys(unicodeMapping));
-const emojify = str => {
- let rtn = '';
- for (;;) {
- let match, i = 0;
- while (i < str.length && str[i] !== '<' && !(match = trie.search(str.slice(i)))) {
- i += str.codePointAt(i) < 65536 ? 1 : 2;
- }
- if (i === str.length)
- break;
- else if (str[i] === '<') {
- let tagend = str.indexOf('>', i + 1) + 1;
- if (!tagend)
- break;
- rtn += str.slice(0, tagend);
- str = str.slice(tagend);
- } else {
- const [filename, shortCode] = unicodeMapping[match];
- rtn += str.slice(0, i) + ``;
- str = str.slice(i + match.length);
+const emojify = (str, customEmojis = {}) => {
+ // This walks through the string from start to end, ignoring any tags (,
, etc.)
+ // and replacing valid unicode strings
+ // that _aren't_ within tags with an version.
+ // The goal is to be the same as an emojione.regUnicode replacement, but faster.
+ let i = -1;
+ let insideTag = false;
+ let insideShortname = false;
+ let shortnameStartIndex = -1;
+ let match;
+ while (++i < str.length) {
+ const char = str.charAt(i);
+ if (insideShortname && char === ':') {
+ const shortname = str.substring(shortnameStartIndex, i + 1);
+ if (shortname in customEmojis) {
+ const replacement = ``;
+ str = str.substring(0, shortnameStartIndex) + replacement + str.substring(i + 1);
+ i += (replacement.length - shortname.length - 1); // jump ahead the length we've added to the string
+ } else {
+ i--;
+ }
+ insideShortname = false;
+ } else if (insideTag && char === '>') {
+ insideTag = false;
+ } else if (char === '<') {
+ insideTag = true;
+ insideShortname = false;
+ } else if (!insideTag && char === ':') {
+ insideShortname = true;
+ shortnameStartIndex = i;
+ } else if (!insideTag && (match = trie.search(str.substring(i)))) {
+ const unicodeStr = match;
+ if (unicodeStr in unicodeMapping) {
+ const [filename, shortCode] = unicodeMapping[unicodeStr];
+ const alt = unicodeStr;
+ const replacement = ``;
+ str = str.substring(0, i) + replacement + str.substring(i + unicodeStr.length);
+ i += (replacement.length - unicodeStr.length); // jump ahead the length we've added to the string
+ }
}
}
- return rtn + str;
+ return str;
};
export default emojify;
diff --git a/app/javascript/mastodon/reducers/statuses.js b/app/javascript/mastodon/reducers/statuses.js
index 7f906bef6..38b23504e 100644
--- a/app/javascript/mastodon/reducers/statuses.js
+++ b/app/javascript/mastodon/reducers/statuses.js
@@ -58,9 +58,14 @@ const normalizeStatus = (state, status) => {
}
const searchContent = [status.spoiler_text, status.content].join(' ').replace(/
/g, '\n').replace(/<\/p>
/g, '\n\n');
+ const emojiMap = normalStatus.emojis.reduce((obj, emoji) => {
+ obj[`:${emoji.shortcode}:`] = emoji.url;
+ return obj;
+ }, {});
+
normalStatus.search_index = domParser.parseFromString(searchContent, 'text/html').documentElement.textContent;
- normalStatus.contentHtml = emojify(normalStatus.content);
- normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(normalStatus.spoiler_text || ''));
+ normalStatus.contentHtml = emojify(normalStatus.content, emojiMap);
+ normalStatus.spoilerHtml = emojify(escapeTextContentForBrowser(normalStatus.spoiler_text || ''), emojiMap);
return state.update(status.id, ImmutableMap(), map => map.mergeDeep(fromJS(normalStatus)));
};
diff --git a/app/lib/activitypub/activity/create.rb b/app/lib/activitypub/activity/create.rb
index 894759d9a..41f2b0bad 100644
--- a/app/lib/activitypub/activity/create.rb
+++ b/app/lib/activitypub/activity/create.rb
@@ -61,6 +61,8 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
process_hashtag tag, status
when 'Mention'
process_mention tag, status
+ when 'Emoji'
+ process_emoji tag, status
end
end
end
@@ -79,6 +81,17 @@ class ActivityPub::Activity::Create < ActivityPub::Activity
account.mentions.create(status: status)
end
+ def process_emoji(tag, _status)
+ shortcode = tag['name'].delete(':')
+ emoji = CustomEmoji.find_by(shortcode: shortcode, domain: @account.domain)
+
+ return if !emoji.nil? || skip_download?
+
+ emoji = CustomEmoji.new(domain: @account.domain, shortcode: shortcode)
+ emoji.image_remote_url = tag['href']
+ emoji.save
+ end
+
def process_attachments(status)
return unless @object['attachment'].is_a?(Array)
diff --git a/app/lib/formatter.rb b/app/lib/formatter.rb
index 575830190..29fea27de 100644
--- a/app/lib/formatter.rb
+++ b/app/lib/formatter.rb
@@ -9,7 +9,7 @@ class Formatter
include ActionView::Helpers::TextHelper
- def format(status)
+ def format(status, options = {})
if status.reblog?
prepend_reblog = status.reblog.account.acct
status = status.proper
@@ -19,7 +19,11 @@ class Formatter
raw_content = status.text
- return reformat(raw_content) unless status.local?
+ unless status.local?
+ html = reformat(raw_content)
+ html = encode_custom_emojis(html, status.emojis) if options[:custom_emojify]
+ return html
+ end
linkable_accounts = status.mentions.map(&:account)
linkable_accounts << status.account
@@ -27,6 +31,7 @@ class Formatter
html = raw_content
html = "RT @#{prepend_reblog} #{html}" if prepend_reblog
html = encode_and_link_urls(html, linkable_accounts)
+ html = encode_custom_emojis(html, status.emojis) if options[:custom_emojify]
html = simple_format(html, {}, sanitize: false)
html = html.delete("\n")
@@ -39,7 +44,9 @@ class Formatter
def plaintext(status)
return status.text if status.local?
- strip_tags(status.text)
+
+ text = status.text.gsub(/(
|
|<\/p>)+/) { |match| "#{match}\n" }
+ strip_tags(text)
end
def simplified_format(account)
@@ -76,6 +83,47 @@ class Formatter
end
end
+ def encode_custom_emojis(html, emojis)
+ return html if emojis.empty?
+
+ emoji_map = emojis.map { |e| [e.shortcode, full_asset_url(e.image.url)] }.to_h
+
+ i = -1
+ inside_tag = false
+ inside_shortname = false
+ shortname_start_index = -1
+
+ while i + 1 < html.size
+ i += 1
+
+ if inside_shortname && html[i] == ':'
+ shortcode = html[shortname_start_index + 1..i - 1]
+ emoji = emoji_map[shortcode]
+
+ if emoji
+ replacement = ""
+ before_html = shortname_start_index.positive? ? html[0..shortname_start_index - 1] : ''
+ html = before_html + replacement + html[i + 1..-1]
+ i += replacement.size - (shortcode.size + 2) - 1
+ else
+ i -= 1
+ end
+
+ inside_shortname = false
+ elsif inside_tag && html[i] == '>'
+ inside_tag = false
+ elsif html[i] == '<'
+ inside_tag = true
+ inside_shortname = false
+ elsif !inside_tag && html[i] == ':'
+ inside_shortname = true
+ shortname_start_index = i
+ end
+ end
+
+ html
+ end
+
def rewrite(text, entities)
chars = text.to_s.to_char_a
diff --git a/app/lib/ostatus/activity/creation.rb b/app/lib/ostatus/activity/creation.rb
index 1a23c9efa..d3f1629c4 100644
--- a/app/lib/ostatus/activity/creation.rb
+++ b/app/lib/ostatus/activity/creation.rb
@@ -42,6 +42,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
save_mentions(status)
save_hashtags(status)
save_media(status)
+ save_emojis(status)
end
if thread? && status.thread.nil?
@@ -150,6 +151,25 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
end
end
+ def save_emojis(parent)
+ do_not_download = DomainBlock.find_by(domain: parent.account.domain)&.reject_media?
+
+ return if do_not_download
+
+ @xml.xpath('./xmlns:link[@rel="emoji"]', xmlns: TagManager::XMLNS).each do |link|
+ next unless link['href'] && link['name']
+
+ shortcode = link['name'].delete(':')
+ emoji = CustomEmoji.find_by(shortcode: shortcode, domain: parent.account.domain)
+
+ next unless emoji.nil?
+
+ emoji = CustomEmoji.new(shortcode: shortcode, domain: parent.account.domain)
+ emoji.image_remote_url = link['href']
+ emoji.save
+ end
+ end
+
def account_from_href(href)
url = Addressable::URI.parse(href).normalize
diff --git a/app/lib/ostatus/atom_serializer.rb b/app/lib/ostatus/atom_serializer.rb
index b8e22a381..a6a5cb0c4 100644
--- a/app/lib/ostatus/atom_serializer.rb
+++ b/app/lib/ostatus/atom_serializer.rb
@@ -368,5 +368,9 @@ class OStatus::AtomSerializer
end
append_element(entry, 'mastodon:scope', status.visibility)
+
+ status.emojis.each do |emoji|
+ append_element(entry, 'link', nil, rel: :emoji, href: full_asset_url(emoji.image.url), name: emoji.shortcode)
+ end
end
end
diff --git a/app/models/custom_emoji.rb b/app/models/custom_emoji.rb
new file mode 100644
index 000000000..f4d3b16a0
--- /dev/null
+++ b/app/models/custom_emoji.rb
@@ -0,0 +1,38 @@
+# frozen_string_literal: true
+# == Schema Information
+#
+# Table name: custom_emojis
+#
+# id :integer not null, primary key
+# shortcode :string default(""), not null
+# domain :string
+# image_file_name :string
+# image_content_type :string
+# image_file_size :integer
+# image_updated_at :datetime
+# created_at :datetime not null
+# updated_at :datetime not null
+#
+
+class CustomEmoji < ApplicationRecord
+ SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}'
+
+ SCAN_RE = /(?<=[^[:alnum:]:]|\n|^)
+ :(#{SHORTCODE_RE_FRAGMENT}):
+ (?=[^[:alnum:]:]|$)/x
+
+ has_attached_file :image
+
+ validates_attachment :image, content_type: { content_type: 'image/png' }, presence: true, size: { in: 0..50.kilobytes }
+ validates :shortcode, uniqueness: { scope: :domain }, format: { with: /\A#{SHORTCODE_RE_FRAGMENT}\z/ }, length: { minimum: 2 }
+
+ include Remotable
+
+ class << self
+ def from_text(text, domain)
+ return [] if text.blank?
+ shortcodes = text.scan(SCAN_RE).map(&:first)
+ where(shortcode: shortcodes, domain: domain)
+ end
+ end
+end
diff --git a/app/models/status.rb b/app/models/status.rb
index 2a2cdcf6e..326d128d6 100644
--- a/app/models/status.rb
+++ b/app/models/status.rb
@@ -131,6 +131,10 @@ class Status < ApplicationRecord
!sensitive? && media_attachments.any?
end
+ def emojis
+ CustomEmoji.from_text(text, account.domain)
+ end
+
after_create :store_uri, if: :local?
before_validation :prepare_contents, if: :local?
diff --git a/app/serializers/activitypub/note_serializer.rb b/app/serializers/activitypub/note_serializer.rb
index 166214eee..e5d8e3f03 100644
--- a/app/serializers/activitypub/note_serializer.rb
+++ b/app/serializers/activitypub/note_serializer.rb
@@ -57,7 +57,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
end
def virtual_tags
- object.mentions + object.tags
+ object.mentions + object.tags + object.emojis
end
def atom_uri
@@ -137,4 +137,22 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer
"##{object.name}"
end
end
+
+ class CustomEmojiSerializer < ActiveModel::Serializer
+ include RoutingHelper
+
+ attributes :type, :href, :name
+
+ def type
+ 'Emoji'
+ end
+
+ def href
+ full_asset_url(object.image.url)
+ end
+
+ def name
+ ":#{object.shortcode}:"
+ end
+ end
end
diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb
index 298a3bb40..d8efa8e60 100644
--- a/app/serializers/rest/status_serializer.rb
+++ b/app/serializers/rest/status_serializer.rb
@@ -17,6 +17,7 @@ class REST::StatusSerializer < ActiveModel::Serializer
has_many :media_attachments, serializer: REST::MediaAttachmentSerializer
has_many :mentions
has_many :tags
+ has_many :emojis
def current_user?
!current_user.nil?
@@ -106,4 +107,14 @@ class REST::StatusSerializer < ActiveModel::Serializer
tag_url(object)
end
end
+
+ class CustomEmojiSerializer < ActiveModel::Serializer
+ include RoutingHelper
+
+ attributes :shortcode, :url
+
+ def url
+ full_asset_url(object.image.url)
+ end
+ end
end
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index dd9456260..692d5a6d5 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -17,7 +17,7 @@
%p{ style: 'margin-bottom: 0' }<
%span.p-summary> #{status.spoiler_text}
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
- .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+ .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true)
- if !status.media_attachments.empty?
- if status.media_attachments.first.video?
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index 55aa97f32..f9a530d38 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -18,7 +18,7 @@
%p{ style: 'margin-bottom: 0' }<
%span.p-summary> #{status.spoiler_text}
%a.status__content__spoiler-link{ href: '#' }= t('statuses.show_more')
- .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status)
+ .e-content{ lang: status.language, style: "display: #{status.spoiler_text? ? 'none' : 'block'}; direction: #{rtl_status?(status) ? 'rtl' : 'ltr'}" }= Formatter.instance.format(status, custom_emojify: true)
- unless status.media_attachments.empty?
- if status.media_attachments.first.video?
diff --git a/db/migrate/20170917153509_create_custom_emojis.rb b/db/migrate/20170917153509_create_custom_emojis.rb
new file mode 100644
index 000000000..4040c8312
--- /dev/null
+++ b/db/migrate/20170917153509_create_custom_emojis.rb
@@ -0,0 +1,13 @@
+class CreateCustomEmojis < ActiveRecord::Migration[5.1]
+ def change
+ create_table :custom_emojis do |t|
+ t.string :shortcode, null: false, default: ''
+ t.string :domain
+ t.attachment :image
+
+ t.timestamps
+ end
+
+ add_index :custom_emojis, [:shortcode, :domain], unique: true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index f2ca2af69..9f42d46dd 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170913000752) do
+ActiveRecord::Schema.define(version: 20170917153509) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -89,6 +89,18 @@ ActiveRecord::Schema.define(version: 20170913000752) do
t.index ["uri"], name: "index_conversations_on_uri", unique: true
end
+ create_table "custom_emojis", force: :cascade do |t|
+ t.string "shortcode", default: "", null: false
+ t.string "domain"
+ t.string "image_file_name"
+ t.string "image_content_type"
+ t.integer "image_file_size"
+ t.datetime "image_updated_at"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["shortcode", "domain"], name: "index_custom_emojis_on_shortcode_and_domain", unique: true
+ end
+
create_table "domain_blocks", id: :serial, force: :cascade do |t|
t.string "domain", default: "", null: false
t.datetime "created_at", null: false
diff --git a/spec/fabricators/custom_emoji_fabricator.rb b/spec/fabricators/custom_emoji_fabricator.rb
new file mode 100644
index 000000000..18a7d23dc
--- /dev/null
+++ b/spec/fabricators/custom_emoji_fabricator.rb
@@ -0,0 +1,5 @@
+Fabricator(:custom_emoji) do
+ shortcode 'coolcat'
+ domain nil
+ image { File.open(Rails.root.join('spec', 'fixtures', 'files', 'emojo.png')) }
+end
diff --git a/spec/fixtures/files/emojo.png b/spec/fixtures/files/emojo.png
new file mode 100644
index 000000000..cb5993499
Binary files /dev/null and b/spec/fixtures/files/emojo.png differ
diff --git a/spec/lib/activitypub/activity/create_spec.rb b/spec/lib/activitypub/activity/create_spec.rb
index fcb044ebc..1a9520f04 100644
--- a/spec/lib/activitypub/activity/create_spec.rb
+++ b/spec/lib/activitypub/activity/create_spec.rb
@@ -17,6 +17,7 @@ RSpec.describe ActivityPub::Activity::Create do
before do
stub_request(:get, 'http://example.com/attachment.png').to_return(request_fixture('avatar.txt'))
+ stub_request(:get, 'http://example.com/emoji.png').to_return(body: attachment_fixture('emojo.png'))
end
describe '#perform' do
@@ -217,5 +218,29 @@ RSpec.describe ActivityPub::Activity::Create do
expect(status.tags.map(&:name)).to include('test')
end
end
+
+ context 'with emojis' do
+ let(:object_json) do
+ {
+ id: 'bar',
+ type: 'Note',
+ content: 'Lorem ipsum :tinking:',
+ tag: [
+ {
+ type: 'Emoji',
+ href: 'http://example.com/emoji.png',
+ name: 'tinking',
+ },
+ ],
+ }
+ end
+
+ it 'creates status' do
+ status = sender.statuses.first
+
+ expect(status).to_not be_nil
+ expect(status.emojis.map(&:shortcode)).to include('tinking')
+ end
+ end
end
end
diff --git a/spec/lib/formatter_spec.rb b/spec/lib/formatter_spec.rb
index b714b317a..71b6b78d2 100644
--- a/spec/lib/formatter_spec.rb
+++ b/spec/lib/formatter_spec.rb
@@ -223,6 +223,45 @@ RSpec.describe Formatter do
include_examples 'encode and link URLs'
end
+
+ context 'with custom_emojify option' do
+ let!(:emoji) { Fabricate(:custom_emoji) }
+ let(:status) { Fabricate(:status, account: local_account, text: text) }
+
+ subject { Formatter.instance.format(status, custom_emojify: true) }
+
+ context 'with emoji at the start' do
+ let(:text) { ':coolcat: Beep boop' }
+
+ it 'converts shortcode to image tag' do
+ is_expected.to match(/
:coolcat: Beep boop
' }
+
+ it 'converts shortcode to image tag' do
+ is_expected.to match(/
Beep :coolcat: boop
' }
+
+ it 'converts shortcode to image tag' do
+ is_expected.to match(/Beep :coolcat::coolcat:
' }
+
+ it 'does not touch the shortcodes' do
+ is_expected.to match(/:coolcat::coolcat:<\/p>/)
+ end
+ end
+
+ context 'with emoji at the end' do
+ let(:text) { '
Beep boop
:coolcat:
' }
+
+ it 'converts shortcode to image tag' do
+ is_expected.to match(/
Hello :coolcat:' }
+
+ it 'returns records used via shortcodes in text' do
+ is_expected.to include(emojo)
+ end
+ end
+ end
+end
--
cgit
From 4aea3f88a6d30f102a79c2da7fcfac96465ba1a8 Mon Sep 17 00:00:00 2001
From: unarist
Date: Tue, 19 Sep 2017 23:03:45 +0900
Subject: Hide sensitive image in default on the public pages (#5009)
Additionally, this restores previous background / text color for media spoiler.
---
app/javascript/styles/stream_entries.scss | 13 +++++++++++++
app/views/stream_entries/_detailed_status.html.haml | 2 +-
app/views/stream_entries/_simple_status.html.haml | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
(limited to 'app/views/stream_entries')
diff --git a/app/javascript/styles/stream_entries.scss b/app/javascript/styles/stream_entries.scss
index ba6d89107..4f323a378 100644
--- a/app/javascript/styles/stream_entries.scss
+++ b/app/javascript/styles/stream_entries.scss
@@ -243,6 +243,19 @@
}
}
+ .media-spoiler {
+ background: $ui-primary-color;
+ color: $white;
+ transition: all 100ms linear;
+
+ &:hover,
+ &:active,
+ &:focus {
+ background: darken($ui-primary-color, 5%);
+ color: unset;
+ }
+ }
+
.pre-header {
padding: 14px 0;
padding-left: (48px + 14px * 2);
diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml
index 692d5a6d5..6860c6bf3 100644
--- a/app/views/stream_entries/_detailed_status.html.haml
+++ b/app/views/stream_entries/_detailed_status.html.haml
@@ -24,7 +24,7 @@
- video = status.media_attachments.first
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 670, height: 380) }}
- else
- %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
+ %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 380, sensitive: status.sensitive?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
- elsif status.preview_cards.first
%div{ data: { component: 'Card', props: Oj.dump('maxDescription': 160, card: ActiveModelSerializers::SerializableResource.new(status.preview_cards.first, serializer: REST::PreviewCardSerializer).as_json) }}
diff --git a/app/views/stream_entries/_simple_status.html.haml b/app/views/stream_entries/_simple_status.html.haml
index f9a530d38..c0ea11633 100644
--- a/app/views/stream_entries/_simple_status.html.haml
+++ b/app/views/stream_entries/_simple_status.html.haml
@@ -25,4 +25,4 @@
- video = status.media_attachments.first
%div{ data: { component: 'Video', props: Oj.dump(src: video.file.url(:original), preview: video.file.url(:small), sensitive: status.sensitive?, width: 610, height: 343) }}
- else
- %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
+ %div{ data: { component: 'MediaGallery', props: Oj.dump(height: 343, sensitive: status.sensitive?, 'autoPlayGif': current_account&.user&.setting_auto_play_gif, media: status.media_attachments.map { |a| ActiveModelSerializers::SerializableResource.new(a, serializer: REST::MediaAttachmentSerializer).as_json }) }}
--
cgit