From 07ff8cb019994bcfa234c33484ca9f4bf1366fa8 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 25 Jun 2021 04:45:04 +0200 Subject: [PATCH 1/3] Fix compression-webpack-plugin configuration (#16356) compression-webpack-plugin 6.0.0 has changed how filenames were generated, so from #14892 onward (Mastodon v3.3.0 and later), compressed files were output to a file named `.gz` instead of the correct filenames. --- config/webpack/production.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/webpack/production.js b/config/webpack/production.js index f1d0dabae7..cd3d01035c 100644 --- a/config/webpack/production.js +++ b/config/webpack/production.js @@ -43,7 +43,7 @@ module.exports = merge(sharedConfig, { plugins: [ new CompressionPlugin({ - filename: '[path].gz[query]', + filename: '[path][base].gz[query]', cache: true, test: /\.(js|css|html|json|ico|svg|eot|otf|ttf|map)$/, }), From e592e47e192baf70529fb04e329313b0e1a22f59 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 25 Jun 2021 04:45:17 +0200 Subject: [PATCH 2/3] Fix WebUI crash when a toot with a playing video gets deleted (#16384) * Fix WebUI crash when a toot with a playing video gets deleted * Fix pop-up player not closing the moment a status is deleted --- .../mastodon/actions/picture_in_picture.js | 21 ++++++++++++------- .../mastodon/reducers/picture_in_picture.js | 3 +++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/javascript/mastodon/actions/picture_in_picture.js b/app/javascript/mastodon/actions/picture_in_picture.js index 4085cb59e0..33d8d57d47 100644 --- a/app/javascript/mastodon/actions/picture_in_picture.js +++ b/app/javascript/mastodon/actions/picture_in_picture.js @@ -22,13 +22,20 @@ export const PICTURE_IN_PICTURE_REMOVE = 'PICTURE_IN_PICTURE_REMOVE'; * @param {MediaProps} props * @return {object} */ -export const deployPictureInPicture = (statusId, accountId, playerType, props) => ({ - type: PICTURE_IN_PICTURE_DEPLOY, - statusId, - accountId, - playerType, - props, -}); +export const deployPictureInPicture = (statusId, accountId, playerType, props) => { + return (dispatch, getState) => { + // Do not open a player for a toot that does not exist + if (getState().hasIn(['statuses', statusId])) { + dispatch({ + type: PICTURE_IN_PICTURE_DEPLOY, + statusId, + accountId, + playerType, + props, + }); + } + }; +}; /* * @return {object} diff --git a/app/javascript/mastodon/reducers/picture_in_picture.js b/app/javascript/mastodon/reducers/picture_in_picture.js index 06cd8c5e87..48772ae7f3 100644 --- a/app/javascript/mastodon/reducers/picture_in_picture.js +++ b/app/javascript/mastodon/reducers/picture_in_picture.js @@ -1,4 +1,5 @@ import { PICTURE_IN_PICTURE_DEPLOY, PICTURE_IN_PICTURE_REMOVE } from 'mastodon/actions/picture_in_picture'; +import { TIMELINE_DELETE } from '../actions/timelines'; const initialState = { statusId: null, @@ -16,6 +17,8 @@ export default function pictureInPicture(state = initialState, action) { return { statusId: action.statusId, accountId: action.accountId, type: action.playerType, ...action.props }; case PICTURE_IN_PICTURE_REMOVE: return { ...initialState }; + case TIMELINE_DELETE: + return (state.statusId === action.id) ? { ...initialState } : state; default: return state; } From 9e5a1daa9bfb559cccab96c6065602ef63377dec Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 25 Jun 2021 04:45:30 +0200 Subject: [PATCH 3/3] Fix styling of boost button in media modal not reflecting ability to boost (#16387) --- app/javascript/styles/mastodon/boost.scss | 12 ++++++++++++ app/javascript/styles/mastodon/components.scss | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/app/javascript/styles/mastodon/boost.scss b/app/javascript/styles/mastodon/boost.scss index fb1451cb24..2969958e22 100644 --- a/app/javascript/styles/mastodon/boost.scss +++ b/app/javascript/styles/mastodon/boost.scss @@ -28,5 +28,17 @@ button.icon-button { i.fa-retweet { background-image: url("data:image/svg+xml;utf8,"); } + + &.reblogPrivate { + i.fa-retweet { + background-image: url("data:image/svg+xml;utf8,"); + } + } + + &.disabled { + i.fa-retweet { + background-image: url("data:image/svg+xml;utf8,"); + } + } } } diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 7ca027e81d..0579c3c6f4 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4732,6 +4732,13 @@ a.status-card.compact:hover { background: rgba($gold-star, 0.3); } } + + &.disabled { + color: $white; + background-color: transparent; + cursor: default; + opacity: 0.4; + } } } }