From 2e839adc34b24ada966178dd6bd1f195f586cb72 Mon Sep 17 00:00:00 2001 From: umonaca <53662960+umonaca@users.noreply.github.com> Date: Sun, 10 Nov 2019 06:04:37 -0500 Subject: [PATCH] Fix win95 theme bug (#17) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Bump @babel/preset-react from 7.0.0 to 7.6.3 (#12315) Bumps [@babel/preset-react](https://github.com/babel/babel) from 7.0.0 to 7.6.3. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.0.0...v7.6.3) Signed-off-by: dependabot-preview[bot] * Bump sass from 1.23.1 to 1.23.3 (#12314) Bumps [sass](https://github.com/sass/dart-sass) from 1.23.1 to 1.23.3. - [Release notes](https://github.com/sass/dart-sass/releases) - [Changelog](https://github.com/sass/dart-sass/blob/master/CHANGELOG.md) - [Commits](https://github.com/sass/dart-sass/compare/1.23.1...1.23.3) Signed-off-by: dependabot-preview[bot] * Bump glob from 7.1.4 to 7.1.5 (#12312) Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.4 to 7.1.5. - [Release notes](https://github.com/isaacs/node-glob/releases) - [Changelog](https://github.com/isaacs/node-glob/blob/master/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v7.1.4...v7.1.5) Signed-off-by: dependabot-preview[bot] * Bump tesseract.js from 2.0.0-alpha.16 to 2.0.0-beta.2 (#12311) Bumps [tesseract.js](https://github.com/naptha/tesseract.js) from 2.0.0-alpha.16 to 2.0.0-beta.2. - [Release notes](https://github.com/naptha/tesseract.js/releases) - [Commits](https://github.com/naptha/tesseract.js/compare/v2.0.0-alpha.16...v2.0.0-beta.2) Signed-off-by: dependabot-preview[bot] * Bump @babel/preset-env from 7.6.0 to 7.7.1 (#12318) Bumps [@babel/preset-env](https://github.com/babel/babel) from 7.6.0 to 7.7.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/compare/v7.6.0...v7.7.1) Signed-off-by: dependabot-preview[bot] * Bump @babel/runtime from 7.6.0 to 7.7.1 (#12317) Bumps [@babel/runtime](https://github.com/babel/babel/tree/HEAD/packages/babel-runtime) from 7.6.0 to 7.7.1. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.7.1/packages/babel-runtime) Signed-off-by: dependabot-preview[bot] * Bump sass-loader from 7.1.0 to 8.0.0 (#12027) * Bump sass-loader from 7.1.0 to 8.0.0 Bumps [sass-loader](https://github.com/webpack-contrib/sass-loader) from 7.1.0 to 8.0.0. - [Release notes](https://github.com/webpack-contrib/sass-loader/releases) - [Changelog](https://github.com/webpack-contrib/sass-loader/blob/master/CHANGELOG.md) - [Commits](https://github.com/webpack-contrib/sass-loader/compare/v7.1.0...v8.0.0) Signed-off-by: dependabot-preview[bot] * bump webpack * Fix various issues with account migration (#12301) * Fix being able to follow oneself by moving to an account that was following the old one * Add specs * Add spec to catch MoveWorker issue with local followers following both accounts * Fix move worker breaking when a local account follows both source and target accounts * Fix migration from remote to local account not sending Undo Follow * Fix show_reblogs not being preserved for moved account's followers * Minor improvements to poll composing UI (#12319) - Disable the “add option” button instead of hiding it - Allow poll option inputs to scale to full width * Fix WebUI allowing to upload more items than the limit (#12300) Until this patch, drag'n'drop and copy-paste allowed to start uploading as long as the number of *finished* uploads was below the limit. * Fix relationship caches being broken as result of a follow request (#12299) * Fix type mismatch (#12324) This was [causing an issue with feed regeneartion in tootctl](https://github.com/hometown-fork/hometown/issues/24), and @davefp fixed the issue. * Fix win95 profile page style * Increase profile page max width * Revert "Increase profile page max width" This reverts commit 4b10c376611aa0217c1d8af50558ed50bd6f4068. --- app/javascript/mastodon/actions/compose.js | 8 +- .../features/compose/components/poll_form.js | 4 +- .../containers/upload_button_container.js | 2 +- app/javascript/mastodon/reducers/compose.js | 6 +- .../styles/mastodon/components.scss | 1 + app/javascript/styles/win95.scss | 4 + app/lib/feed_manager.rb | 2 +- .../account_relationships_presenter.rb | 2 +- app/services/follow_service.rb | 4 +- app/workers/move_worker.rb | 8 +- app/workers/unfollow_follow_worker.rb | 7 +- package.json | 16 +- spec/workers/move_worker_spec.rb | 63 ++ spec/workers/unfollow_follow_worker_spec.rb | 50 ++ yarn.lock | 596 ++++++++++-------- 15 files changed, 490 insertions(+), 283 deletions(-) create mode 100644 spec/workers/move_worker_spec.rb create mode 100644 spec/workers/unfollow_follow_worker_spec.rb diff --git a/app/javascript/mastodon/actions/compose.js b/app/javascript/mastodon/actions/compose.js index 2dcb81035de9c4..c9c1a420bd2de4 100644 --- a/app/javascript/mastodon/actions/compose.js +++ b/app/javascript/mastodon/actions/compose.js @@ -207,10 +207,11 @@ export function uploadCompose(files) { return function (dispatch, getState) { const uploadLimit = 4; const media = getState().getIn(['compose', 'media_attachments']); + const pending = getState().getIn(['compose', 'pending_media_attachments']); const progress = new Array(files.length).fill(0); let total = Array.from(files).reduce((a, v) => a + v.size, 0); - if (files.length + media.size > uploadLimit) { + if (files.length + media.size + pending > uploadLimit) { dispatch(showAlert(undefined, messages.uploadErrorLimit)); return; } @@ -237,7 +238,7 @@ export function uploadCompose(files) { dispatch(uploadComposeProgress(progress.reduce((a, v) => a + v, 0), total)); }, }).then(({ data }) => dispatch(uploadComposeSuccess(data, f))); - }).catch(error => dispatch(uploadComposeFail(error))); + }).catch(error => dispatch(uploadComposeFail(error, true))); }; }; }; @@ -268,10 +269,11 @@ export function changeUploadComposeSuccess(media) { }; }; -export function changeUploadComposeFail(error) { +export function changeUploadComposeFail(error, decrement = false) { return { type: COMPOSE_UPLOAD_CHANGE_FAIL, error: error, + decrement: decrement, skipLoading: true, }; }; diff --git a/app/javascript/mastodon/features/compose/components/poll_form.js b/app/javascript/mastodon/features/compose/components/poll_form.js index 211601d520602f..898f956b0c0f79 100644 --- a/app/javascript/mastodon/features/compose/components/poll_form.js +++ b/app/javascript/mastodon/features/compose/components/poll_form.js @@ -142,9 +142,7 @@ class PollForm extends ImmutablePureComponent {
- {options.size < 4 && ( - - )} +