From e326a567c48b179f38e6a1e057556eaea174343a Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Sun, 14 Dec 2025 16:26:23 -0800 Subject: [PATCH] frontend: restore minor bits of formatting to upstream These were slightly altered during the merge; keeping them exactly the same as upstream ensures that future merges will go cleaner. --- .../mastodon/components/media_gallery.jsx | 26 +++++++++---------- .../compose/components/reply_indicator.jsx | 4 +-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/javascript/mastodon/components/media_gallery.jsx b/app/javascript/mastodon/components/media_gallery.jsx index f6801ec4a..a28ab2639 100644 --- a/app/javascript/mastodon/components/media_gallery.jsx +++ b/app/javascript/mastodon/components/media_gallery.jsx @@ -60,7 +60,7 @@ class Item extends PureComponent { return this.props.autoplay || autoPlayGif; } - hoverToPlay() { + hoverToPlay () { const { attachment } = this.props; return !this.getAutoPlay() && ['gifv', 'video'].includes(attachment.get('type')); } @@ -93,7 +93,7 @@ class Item extends PureComponent { let badges = [], thumbnail; - let width = 50; + let width = 50; let height = 100; if (size === 1) { @@ -130,25 +130,25 @@ class Item extends PureComponent { ); } else if (attachment.get('type') === 'image') { - const previewUrl = attachment.get('preview_url'); + const previewUrl = attachment.get('preview_url'); const previewWidth = attachment.getIn(['meta', 'small', 'width']); - const originalUrl = attachment.get('url'); + const originalUrl = attachment.get('url'); const originalWidth = attachment.getIn(['meta', 'original', 'width']); const hasSize = typeof originalWidth === 'number' && typeof previewWidth === 'number'; const srcSet = hasSize ? `${originalUrl} ${originalWidth}w, ${previewUrl} ${previewWidth}w` : null; - const sizes = hasSize && (displayWidth > 0) ? `${displayWidth * (width / 100)}px` : null; + const sizes = hasSize && (displayWidth > 0) ? `${displayWidth * (width / 100)}px` : null; const focusX = attachment.getIn(['meta', 'focus', 'x']) || 0; const focusY = attachment.getIn(['meta', 'focus', 'y']) || 0; - const x = ((focusX / 2) + .5) * 100; - const y = ((focusY / -2) + .5) * 100; + const x = ((focusX / 2) + .5) * 100; + const y = ((focusY / -2) + .5) * 100; thumbnail = (