From c30287cf7cff61739bbfab0ce9f3695cdd08296f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Jan 2019 21:38:00 +0900 Subject: [PATCH 001/546] Bump addressable from 2.5.2 to 2.6.0 (#9888) Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.5.2 to 2.6.0. - [Release notes](https://github.com/sporkmonger/addressable/releases) - [Changelog](https://github.com/sporkmonger/addressable/blob/master/CHANGELOG.md) - [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.5.2...addressable-2.6.0) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index d17ff1a51..8266488f8 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ gem 'paperclip-av-transcoder', '~> 0.6' gem 'streamio-ffmpeg', '~> 3.0' gem 'active_model_serializers', '~> 0.10' -gem 'addressable', '~> 2.5' +gem 'addressable', '~> 2.6' gem 'bootsnap', '~> 1.3', require: false gem 'browser' gem 'charlock_holmes', '~> 0.7.6' diff --git a/Gemfile.lock b/Gemfile.lock index acb4b8dda..a3c4c06dd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -62,7 +62,7 @@ GEM i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - addressable (2.5.2) + addressable (2.6.0) public_suffix (>= 2.0.2, < 4.0) airbrussh (1.3.0) sshkit (>= 1.6.1, != 1.7.0) @@ -655,7 +655,7 @@ PLATFORMS DEPENDENCIES active_model_serializers (~> 0.10) active_record_query_trace (~> 1.5) - addressable (~> 2.5) + addressable (~> 2.6) annotate (~> 2.7) aws-sdk-s3 (~> 1.30) better_errors (~> 2.5) From c59b45bf3a3323a7d4bf751acb88e51adb7d28fe Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Jan 2019 21:38:37 +0900 Subject: [PATCH 002/546] Bump rspec-rails from 3.8.1 to 3.8.2 (#9889) Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 3.8.1 to 3.8.2. - [Release notes](https://github.com/rspec/rspec-rails/releases) - [Changelog](https://github.com/rspec/rspec-rails/blob/master/Changelog.md) - [Commits](https://github.com/rspec/rspec-rails/compare/v3.8.1...v3.8.2) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a3c4c06dd..cba8c2877 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -513,7 +513,7 @@ GEM rspec-mocks (3.8.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) - rspec-rails (3.8.1) + rspec-rails (3.8.2) actionpack (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) From 3fc0abf8dd140686d366827f1193c8b9e35efa3e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Jan 2019 21:39:00 +0900 Subject: [PATCH 003/546] Bump pundit from 2.0.0 to 2.0.1 (#9890) Bumps [pundit](https://github.com/varvet/pundit) from 2.0.0 to 2.0.1. - [Release notes](https://github.com/varvet/pundit/releases) - [Changelog](https://github.com/varvet/pundit/blob/master/CHANGELOG.md) - [Commits](https://github.com/varvet/pundit/commits) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index cba8c2877..6d89a6e8e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -420,7 +420,7 @@ GEM pry (>= 0.10.4) public_suffix (3.0.3) puma (3.12.0) - pundit (2.0.0) + pundit (2.0.1) activesupport (>= 3.0.0) raabro (1.1.6) rack (2.0.6) From dd8a00a3ccf4d73794ef110f8ca63955fa24c97a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 21 Jan 2019 21:39:52 +0900 Subject: [PATCH 004/546] Bump json-ld-preloaded from 3.0.0 to 3.0.2 (#9891) Bumps [json-ld-preloaded](https://github.com/ruby-rdf/json-ld-preloaded) from 3.0.0 to 3.0.2. - [Release notes](https://github.com/ruby-rdf/json-ld-preloaded/releases) - [Commits](https://github.com/ruby-rdf/json-ld-preloaded/compare/3.0.0...3.0.2) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 6d89a6e8e..cb46cf4bc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -290,8 +290,8 @@ GEM json-ld (3.0.2) multi_json (~> 1.12) rdf (>= 2.2.8, < 4.0) - json-ld-preloaded (3.0.0) - json-ld (>= 2.2, < 4.0) + json-ld-preloaded (3.0.2) + json-ld (~> 3.0) multi_json (~> 1.12) rdf (~> 3.0) jsonapi-renderer (0.2.0) From 061feb63ed852acb5d70e2678c9e63425e6ca71b Mon Sep 17 00:00:00 2001 From: ThibG Date: Mon, 21 Jan 2019 20:03:04 +0100 Subject: [PATCH 005/546] Fix scheduled toot with media immediately creating a toot (#9894) * Add test for not persisting status when attaching media to scheduled toot * Prevent status used for validation from being persisted to the database Fixes #9893 Thanks to tateisu for the help investigating this. --- app/services/post_status_service.rb | 5 ++++- spec/services/post_status_service_spec.rb | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index cc3453f99..1f5a3f4cf 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -66,7 +66,10 @@ class PostStatusService < BaseService end def schedule_status! - if @account.statuses.build(status_attributes).valid? + status_for_validation = @account.statuses.build(status_attributes) + if status_for_validation.valid? + status_for_validation.destroy + # The following transaction block is needed to wrap the UPDATEs to # the media attachments when the scheduled status is created diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 3774fed6f..680cebbcf 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -36,6 +36,20 @@ RSpec.describe PostStatusService, type: :service do expect(status.params['text']).to eq 'Hi future!' end + it 'does not immediately create a status when scheduling a status' do + account = Fabricate(:account) + media = Fabricate(:media_attachment) + future = Time.now.utc + 2.hours + + status = subject.call(account, text: 'Hi future!', media_ids: [media.id], scheduled_at: future) + + expect(status).to be_a ScheduledStatus + expect(status.scheduled_at).to eq future + expect(status.params['text']).to eq 'Hi future!' + expect(media.reload.status).to be_nil + expect(Status.where(text: 'Hi future!').exists?).to be_falsey + end + it 'creates response to the original status of boost' do boosted_status = Fabricate(:status) in_reply_to_status = Fabricate(:status, reblog: boosted_status) From d50e824168a32d41ec1efce13beef22a4d7ff7c5 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 22 Jan 2019 04:03:44 +0900 Subject: [PATCH 006/546] Apply style for .landing-page strong (#9892) --- app/javascript/styles/mastodon/about.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/javascript/styles/mastodon/about.scss b/app/javascript/styles/mastodon/about.scss index c6f249fab..b6c92a09e 100644 --- a/app/javascript/styles/mastodon/about.scss +++ b/app/javascript/styles/mastodon/about.scss @@ -845,6 +845,18 @@ $small-breakpoint: 960px; margin-bottom: 0; } + strong { + display: inline; + margin: 0; + padding: 0; + font-weight: 700; + background: transparent; + font-family: inherit; + font-size: inherit; + line-height: inherit; + color: lighten($darker-text-color, 10%); + } + .account { border-bottom: 0; padding: 0; From 2eae2d271f41f55201d528a561399655e1463888 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 22 Jan 2019 20:32:49 +0900 Subject: [PATCH 007/546] Bump rubocop from 0.63.0 to 0.63.1 (#9899) Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.63.0 to 0.63.1. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop-hq/rubocop/compare/v0.63.0...v0.63.1) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index cb46cf4bc..2762f6c9e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -389,7 +389,7 @@ GEM paperclip-av-transcoder (0.6.4) av (~> 0.9.0) paperclip (>= 2.5.2) - parallel (1.12.1) + parallel (1.13.0) parallel_tests (2.27.1) parallel parser (2.6.0.0) @@ -525,7 +525,7 @@ GEM rspec-core (~> 3.0, >= 3.0.0) sidekiq (>= 2.4.0) rspec-support (3.8.0) - rubocop (0.63.0) + rubocop (0.63.1) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.5, != 2.5.1.1) From 306e1572e89b1991be204f7b468bb37fff210c0e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Tue, 22 Jan 2019 20:33:20 +0900 Subject: [PATCH 008/546] Bump oj from 3.7.7 to 3.7.8 (#9900) Bumps [oj](https://github.com/ohler55/oj) from 3.7.7 to 3.7.8. - [Release notes](https://github.com/ohler55/oj/releases) - [Changelog](https://github.com/ohler55/oj/blob/master/CHANGELOG.md) - [Commits](https://github.com/ohler55/oj/compare/v3.7.7...v3.7.8) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2762f6c9e..7b8ffec9a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -363,7 +363,7 @@ GEM concurrent-ruby (~> 1.0, >= 1.0.2) sidekiq (>= 3.5) statsd-ruby (~> 1.4, >= 1.4.0) - oj (3.7.7) + oj (3.7.8) omniauth (1.9.0) hashie (>= 3.4.6, < 3.7.0) rack (>= 1.6.2, < 3) From c87863bdd18213a7181914b76752959b0617ade1 Mon Sep 17 00:00:00 2001 From: trwnh Date: Thu, 24 Jan 2019 06:32:23 -0600 Subject: [PATCH 009/546] Fix Firefox scrollbar color regression in #9210 (#9908) In #9210 the track color was changed to transparent for no apparent reason. This PR restores the previous color selections implemented in #8653 while keeping the updated property name. Per https://github.com/tootsuite/mastodon/pull/9210#issuecomment-441788776 there is no particular reason for the color change in #9210. --- app/javascript/styles/mastodon/reset.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/reset.scss b/app/javascript/styles/mastodon/reset.scss index e24ba8c1c..f54ed5bc7 100644 --- a/app/javascript/styles/mastodon/reset.scss +++ b/app/javascript/styles/mastodon/reset.scss @@ -54,7 +54,7 @@ table { } html { - scrollbar-color: lighten($ui-base-color, 4%) transparent; + scrollbar-color: lighten($ui-base-color, 4%) rgba($base-overlay-background, 0.1); } ::-webkit-scrollbar { From e1ec3a9f09add8a34b1a77ce217be8e51ebd4936 Mon Sep 17 00:00:00 2001 From: "Renato \"Lond\" Cerqueira" Date: Thu, 24 Jan 2019 15:38:18 +0100 Subject: [PATCH 010/546] Rescue SSL error in verify link service (#9914) If the first link to be verified contains a rel=me link with a SSL error, the VerifyAccountLinksWorker will fail and not try the following links. This rescues the SSL error when fetching the link, avoiding this issue. --- app/services/verify_link_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/services/verify_link_service.rb b/app/services/verify_link_service.rb index c65578761..878a2188d 100644 --- a/app/services/verify_link_service.rb +++ b/app/services/verify_link_service.rb @@ -10,7 +10,7 @@ class VerifyLinkService < BaseService return unless link_back_present? field.mark_verified! - rescue HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e + rescue OpenSSL::SSL::SSLError, HTTP::Error, Addressable::URI::InvalidURIError, Mastodon::HostValidationError, Mastodon::LengthValidationError => e Rails.logger.debug "Error fetching link #{@url}: #{e}" nil end From 77394156dd43bb5a711d3434504a26c8d1e2acf5 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Tue, 22 Jan 2019 04:03:44 +0900 Subject: [PATCH 011/546] Apply style for .landing-page strong (#9892) --- app/javascript/flavours/glitch/styles/about.scss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/javascript/flavours/glitch/styles/about.scss b/app/javascript/flavours/glitch/styles/about.scss index e8f46766a..302de020b 100644 --- a/app/javascript/flavours/glitch/styles/about.scss +++ b/app/javascript/flavours/glitch/styles/about.scss @@ -847,6 +847,18 @@ $small-breakpoint: 960px; margin-bottom: 0; } + strong { + display: inline; + margin: 0; + padding: 0; + font-weight: 700; + background: transparent; + font-family: inherit; + font-size: inherit; + line-height: inherit; + color: lighten($darker-text-color, 10%); + } + .account { border-bottom: 0; padding: 0; From 8ef0498f1ca4ff4dab7d8255f15577a86907c392 Mon Sep 17 00:00:00 2001 From: trwnh Date: Thu, 24 Jan 2019 06:32:23 -0600 Subject: [PATCH 012/546] Fix Firefox scrollbar color regression in #9210 (#9908) In #9210 the track color was changed to transparent for no apparent reason. This PR restores the previous color selections implemented in #8653 while keeping the updated property name. Per https://github.com/tootsuite/mastodon/pull/9210#issuecomment-441788776 there is no particular reason for the color change in #9210. --- app/javascript/flavours/glitch/styles/reset.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/styles/reset.scss b/app/javascript/flavours/glitch/styles/reset.scss index e24ba8c1c..f54ed5bc7 100644 --- a/app/javascript/flavours/glitch/styles/reset.scss +++ b/app/javascript/flavours/glitch/styles/reset.scss @@ -54,7 +54,7 @@ table { } html { - scrollbar-color: lighten($ui-base-color, 4%) transparent; + scrollbar-color: lighten($ui-base-color, 4%) rgba($base-overlay-background, 0.1); } ::-webkit-scrollbar { From 9519d55332a1f22891e5ad8a1de1d2ba027bafc7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 25 Jan 2019 12:36:54 +0100 Subject: [PATCH 013/546] Fix SSO authentication not working due to missing agreement boolean (#9915) Fix #9906 --- app/models/concerns/omniauthable.rb | 1 + app/models/user.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb index f263fe7af..4dd2e9383 100644 --- a/app/models/concerns/omniauthable.rb +++ b/app/models/concerns/omniauthable.rb @@ -63,6 +63,7 @@ module Omniauthable { email: email || "#{TEMP_EMAIL_PREFIX}-#{auth.uid}-#{auth.provider}.com", password: Devise.friendly_token[0, 20], + agreement: true, account_attributes: { username: ensure_unique_username(auth.uid), display_name: display_name, diff --git a/app/models/user.rb b/app/models/user.rb index 5aa5c2b15..fdd2741c1 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -295,6 +295,7 @@ class User < ApplicationRecord def self.pam_get_user(attributes = {}) return nil unless attributes[:email] + resource = if Devise.check_at_sign && !attributes[:email].index('@') joins(:account).find_by(accounts: { username: attributes[:email] }) @@ -304,6 +305,7 @@ class User < ApplicationRecord if resource.blank? resource = new(email: attributes[:email], agreement: true) + if Devise.check_at_sign && !resource[:email].index('@') resource[:email] = Rpam2.getenv(resource.find_pam_service, attributes[:email], attributes[:password], 'email', false) resource[:email] = "#{attributes[:email]}@#{resource.find_pam_suffix}" unless resource[:email] From e2a5be6e9a070792fa72711c812f75bc61990052 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sat, 26 Jan 2019 23:59:39 +0100 Subject: [PATCH 014/546] Prevent posting toots with media attachments from someone else (#9921) --- app/services/post_status_service.rb | 2 +- spec/services/post_status_service_spec.rb | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 1f5a3f4cf..9959bb1fb 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -93,7 +93,7 @@ class PostStatusService < BaseService raise Mastodon::ValidationError, I18n.t('media_attachments.validations.too_many') if @options[:media_ids].size > 4 - @media = MediaAttachment.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) + @media = @account.media_attachments.where(status_id: nil).where(id: @options[:media_ids].take(4).map(&:to_i)) raise Mastodon::ValidationError, I18n.t('media_attachments.validations.images_and_video') if @media.size > 1 && @media.find(&:video?) end diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 680cebbcf..facbe977f 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -167,7 +167,7 @@ RSpec.describe PostStatusService, type: :service do it 'attaches the given media to the created status' do account = Fabricate(:account) - media = Fabricate(:media_attachment) + media = Fabricate(:media_attachment, account: account) status = subject.call( account, @@ -178,6 +178,19 @@ RSpec.describe PostStatusService, type: :service do expect(media.reload.status).to eq status end + it 'does not attach media from another account to the created status' do + account = Fabricate(:account) + media = Fabricate(:media_attachment, account: Fabricate(:account)) + + status = subject.call( + account, + text: "test status update", + media_ids: [media.id], + ) + + expect(media.reload.status).to eq nil + end + it 'does not allow attaching more than 4 files' do account = Fabricate(:account) From 05415fa5d38e988d967cc783dd2eb0852852fce2 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 21 Jan 2019 19:36:33 +0100 Subject: [PATCH 015/546] Make storing and displaying application used to toot opt-in --- app/controllers/settings/preferences_controller.rb | 1 + app/lib/user_settings_decorator.rb | 5 +++++ app/models/account.rb | 1 + app/models/user.rb | 6 +++++- app/serializers/rest/status_serializer.rb | 6 +++++- app/services/post_status_service.rb | 1 + app/views/settings/preferences/show.html.haml | 3 +++ app/views/stream_entries/_detailed_status.html.haml | 2 +- config/locales/simple_form.en.yml | 2 ++ config/settings.yml | 1 + 10 files changed, 25 insertions(+), 3 deletions(-) diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index d4932afd6..241053261 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -45,6 +45,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_hide_network, :setting_hide_followers_count, :setting_aggregate_reblogs, + :setting_show_application, notification_emails: %i(follow follow_request reblog favourite mention digest report), interactions: %i(must_be_follower must_be_following) ) diff --git a/app/lib/user_settings_decorator.rb b/app/lib/user_settings_decorator.rb index 569255f6e..367ba9a83 100644 --- a/app/lib/user_settings_decorator.rb +++ b/app/lib/user_settings_decorator.rb @@ -35,6 +35,7 @@ class UserSettingsDecorator user.settings['skin'] = skin_preference if change?('setting_skin') user.settings['hide_network'] = hide_network_preference if change?('setting_hide_network') user.settings['aggregate_reblogs'] = aggregate_reblogs_preference if change?('setting_aggregate_reblogs') + user.settings['show_application'] = show_application_preference if change?('setting_show_application') end def merged_notification_emails @@ -109,6 +110,10 @@ class UserSettingsDecorator boolean_cast_setting 'setting_hide_network' end + def show_application_preference + boolean_cast_setting 'setting_show_application' + end + def default_language_preference settings['setting_default_language'] end diff --git a/app/models/account.rb b/app/models/account.rb index 1ee63c738..c86c6fdb5 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -113,6 +113,7 @@ class Account < ApplicationRecord :staff?, :locale, :hides_network?, + :shows_application?, to: :user, prefix: true, allow_nil: true diff --git a/app/models/user.rb b/app/models/user.rb index fbb6545db..ce9ef2a13 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -100,7 +100,7 @@ class User < ApplicationRecord delegate :auto_play_gif, :default_sensitive, :unfollow_modal, :boost_modal, :favourite_modal, :delete_modal, :reduce_motion, :system_font_ui, :noindex, :flavour, :skin, :display_media, :hide_network, :hide_followers_count, - :expand_spoilers, :default_language, :aggregate_reblogs, to: :settings, prefix: :setting, allow_nil: false + :expand_spoilers, :default_language, :aggregate_reblogs, :show_application, to: :settings, prefix: :setting, allow_nil: false attr_reader :invite_code @@ -244,6 +244,10 @@ class User < ApplicationRecord @aggregates_reblogs ||= settings.aggregate_reblogs end + def shows_application? + @shows_application ||= settings.shows_application + end + def token_for_app(a) return nil if a.nil? || a.owner != self Doorkeeper::AccessToken diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index dd8482eea..f2b5febae 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -14,7 +14,7 @@ class REST::StatusSerializer < ActiveModel::Serializer attribute :local_only if :local? belongs_to :reblog, serializer: REST::StatusSerializer - belongs_to :application + belongs_to :application, if: :user_shows_application? belongs_to :account, serializer: REST::AccountSerializer has_many :media_attachments, serializer: REST::MediaAttachmentSerializer @@ -40,6 +40,10 @@ class REST::StatusSerializer < ActiveModel::Serializer !current_user.nil? end + def user_shows_application? + object.account.user_shows_application? + end + def visibility # This visibility is masked behind "private" # to avoid API changes because there are no diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index e4b61ee35..24a853373 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -22,6 +22,7 @@ class PostStatusService < BaseService @options = options @text = @options[:text] || '' @in_reply_to = @options[:thread] + @options.delete(:application) unless @account.user&.setting_show_application return idempotency_duplicate if idempotency_given? && idempotency_duplicate? diff --git a/app/views/settings/preferences/show.html.haml b/app/views/settings/preferences/show.html.haml index 6510e0560..c666bafb5 100644 --- a/app/views/settings/preferences/show.html.haml +++ b/app/views/settings/preferences/show.html.haml @@ -34,6 +34,9 @@ .fields-group = f.input :setting_hide_network, as: :boolean, wrapper: :with_label + .fields-group + = f.input :setting_show_application, as: :boolean, wrapper: :with_label + - unless Setting.hide_followers_count .fields-group = f.input :setting_hide_followers_count, as: :boolean, wrapper: :with_label diff --git a/app/views/stream_entries/_detailed_status.html.haml b/app/views/stream_entries/_detailed_status.html.haml index 18265e110..e123d657f 100644 --- a/app/views/stream_entries/_detailed_status.html.haml +++ b/app/views/stream_entries/_detailed_status.html.haml @@ -39,7 +39,7 @@ = link_to TagManager.instance.url_for(status), class: 'detailed-status__datetime u-url u-uid', target: stream_link_target, rel: 'noopener' do %time.formatted{ datetime: status.created_at.iso8601, title: l(status.created_at) }= l(status.created_at) · - - if status.application + - if status.application && @account.user&.setting_show_application - if status.application.website.blank? %strong.detailed-status__application= status.application.name - else diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index c75471658..674abff63 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -33,6 +33,7 @@ en: setting_display_media_show_all: Always show media marked as sensitive setting_hide_network: Who you follow and who follows you will not be shown on your profile setting_noindex: Affects your public profile and status pages + setting_show_application: The application you use to toot will be displayed in the detailed view of your toots setting_skin: Reskins the selected Mastodon flavour username: Your username will be unique on %{domain} whole_word: When the keyword or phrase is alphanumeric only, it will only be applied if it matches the whole word @@ -102,6 +103,7 @@ en: setting_hide_network: Hide your network setting_noindex: Opt-out of search engine indexing setting_reduce_motion: Reduce motion in animations + setting_show_application: Disclose application used to send toots setting_skin: Skin setting_system_font_ui: Use system's default font setting_unfollow_modal: Show confirmation dialog before unfollowing someone diff --git a/config/settings.yml b/config/settings.yml index 4f070240a..af596b738 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -27,6 +27,7 @@ defaults: &defaults expand_spoilers: false preview_sensitive_media: false reduce_motion: false + show_application: false system_font_ui: false noindex: false hide_followers_count: false From f938800ef4fcd7f63310e3f1d021c809f60ea448 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Mon, 21 Jan 2019 22:40:26 +0100 Subject: [PATCH 016/546] Revert to storing application info, and display it to the author via API --- app/serializers/rest/status_serializer.rb | 6 +++--- app/services/post_status_service.rb | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index f2b5febae..b72eebb10 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -14,7 +14,7 @@ class REST::StatusSerializer < ActiveModel::Serializer attribute :local_only if :local? belongs_to :reblog, serializer: REST::StatusSerializer - belongs_to :application, if: :user_shows_application? + belongs_to :application, if: :show_application? belongs_to :account, serializer: REST::AccountSerializer has_many :media_attachments, serializer: REST::MediaAttachmentSerializer @@ -40,8 +40,8 @@ class REST::StatusSerializer < ActiveModel::Serializer !current_user.nil? end - def user_shows_application? - object.account.user_shows_application? + def show_application? + object.account.user_shows_application? || (current_user? && current_user.account_id == object.account_id) end def visibility diff --git a/app/services/post_status_service.rb b/app/services/post_status_service.rb index 24a853373..e4b61ee35 100644 --- a/app/services/post_status_service.rb +++ b/app/services/post_status_service.rb @@ -22,7 +22,6 @@ class PostStatusService < BaseService @options = options @text = @options[:text] || '' @in_reply_to = @options[:thread] - @options.delete(:application) unless @account.user&.setting_show_application return idempotency_duplicate if idempotency_given? && idempotency_duplicate? From ec5bd8b8bbe5a7500680eeab40ce36f28373d0ba Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 27 Jan 2019 17:54:54 +0100 Subject: [PATCH 017/546] Implement missing hotkeys for notifications (#9927) --- .../notifications/components/notification.js | 30 ++++++++-- .../containers/notification_container.js | 57 +++++++++++++++++-- 2 files changed, 79 insertions(+), 8 deletions(-) diff --git a/app/javascript/mastodon/features/notifications/components/notification.js b/app/javascript/mastodon/features/notifications/components/notification.js index 44da423ad..97efff69c 100644 --- a/app/javascript/mastodon/features/notifications/components/notification.js +++ b/app/javascript/mastodon/features/notifications/components/notification.js @@ -29,6 +29,10 @@ class Notification extends ImmutablePureComponent { onMoveUp: PropTypes.func.isRequired, onMoveDown: PropTypes.func.isRequired, onMention: PropTypes.func.isRequired, + onFavourite: PropTypes.func.isRequired, + onReblog: PropTypes.func.isRequired, + onToggleHidden: PropTypes.func.isRequired, + status: PropTypes.option, intl: PropTypes.object.isRequired, }; @@ -64,14 +68,32 @@ class Notification extends ImmutablePureComponent { onMention(notification.get('account'), this.context.router.history); } + handleHotkeyFavourite = () => { + const { status } = this.props; + if (status) this.props.onFavourite(status); + } + + handleHotkeyBoost = e => { + const { status } = this.props; + if (status) this.props.onReblog(status, e); + } + + handleHotkeyToggleHidden = () => { + const { status } = this.props; + if (status) this.props.onToggleHidden(status); + } + getHandlers () { return { - moveUp: this.handleMoveUp, - moveDown: this.handleMoveDown, + reply: this.handleMention, + favourite: this.handleHotkeyFavourite, + boost: this.handleHotkeyBoost, + mention: this.handleMention, open: this.handleOpen, openProfile: this.handleOpenProfile, - mention: this.handleMention, - reply: this.handleMention, + moveUp: this.handleMoveUp, + moveDown: this.handleMoveDown, + toggleHidden: this.handleHotkeyToggleHidden, }; } diff --git a/app/javascript/mastodon/features/notifications/containers/notification_container.js b/app/javascript/mastodon/features/notifications/containers/notification_container.js index 921aa460f..78576c760 100644 --- a/app/javascript/mastodon/features/notifications/containers/notification_container.js +++ b/app/javascript/mastodon/features/notifications/containers/notification_container.js @@ -1,14 +1,31 @@ import { connect } from 'react-redux'; -import { makeGetNotification } from '../../../selectors'; +import { makeGetNotification, makeGetStatus } from '../../../selectors'; import Notification from '../components/notification'; +import { openModal } from '../../../actions/modal'; import { mentionCompose } from '../../../actions/compose'; +import { + reblog, + favourite, + unreblog, + unfavourite, +} from '../../../actions/interactions'; +import { + hideStatus, + revealStatus, +} from '../../../actions/statuses'; +import { boostModal } from '../../../initial_state'; const makeMapStateToProps = () => { const getNotification = makeGetNotification(); + const getStatus = makeGetStatus(); - const mapStateToProps = (state, props) => ({ - notification: getNotification(state, props.notification, props.accountId), - }); + const mapStateToProps = (state, props) => { + const notification = getNotification(state, props.notification, props.accountId); + return { + notification: notification, + status: notification.get('status') ? getStatus(state, { id: notification.get('status') }) : null, + }; + }; return mapStateToProps; }; @@ -17,6 +34,38 @@ const mapDispatchToProps = dispatch => ({ onMention: (account, router) => { dispatch(mentionCompose(account, router)); }, + + onModalReblog (status) { + dispatch(reblog(status)); + }, + + onReblog (status, e) { + if (status.get('reblogged')) { + dispatch(unreblog(status)); + } else { + if (e.shiftKey || !boostModal) { + this.onModalReblog(status); + } else { + dispatch(openModal('BOOST', { status, onReblog: this.onModalReblog })); + } + } + }, + + onFavourite (status) { + if (status.get('favourited')) { + dispatch(unfavourite(status)); + } else { + dispatch(favourite(status)); + } + }, + + onToggleHidden (status) { + if (status.get('hidden')) { + dispatch(revealStatus(status.get('id'))); + } else { + dispatch(hideStatus(status.get('id'))); + } + }, }); export default connect(makeMapStateToProps, mapDispatchToProps)(Notification); From a53dcaa29869e808707efcba541b02ee8d799e75 Mon Sep 17 00:00:00 2001 From: ThibG Date: Sun, 27 Jan 2019 21:18:15 +0100 Subject: [PATCH 018/546] Fix initial value of volume slider in video player and handle volume changes (#9929) * Fix initial value of volume slider in video player and handle volume changes * Clean up dead/incorrect code --- app/javascript/mastodon/features/video/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/javascript/mastodon/features/video/index.js b/app/javascript/mastodon/features/video/index.js index 3650fddb6..0d0c24d71 100644 --- a/app/javascript/mastodon/features/video/index.js +++ b/app/javascript/mastodon/features/video/index.js @@ -136,6 +136,9 @@ class Video extends React.PureComponent { setVideoRef = c => { this.video = c; + if (this.video) { + this.setState({ volume: this.video.volume, muted: this.video.muted }); + } } setSeekRef = c => { @@ -302,6 +305,10 @@ class Video extends React.PureComponent { } } + handleVolumeChange = () => { + this.setState({ volume: this.video.volume, muted: this.video.muted }); + } + handleOpenVideo = () => { const { src, preview, width, height, alt } = this.props; const media = fromJS({ @@ -387,6 +394,7 @@ class Video extends React.PureComponent { onTimeUpdate={this.handleTimeUpdate} onLoadedData={this.handleLoadedData} onProgress={this.handleProgress} + onVolumeChange={this.handleVolumeChange} /> - +
Date: Sun, 27 Jan 2019 22:02:59 +0100 Subject: [PATCH 019/546] [Glitch] Fix initial value of volume slider in video player and handle volume changes Port a53dcaa29869e808707efcba541b02ee8d799e75 to glitch-soc --- app/javascript/flavours/glitch/features/video/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/javascript/flavours/glitch/features/video/index.js b/app/javascript/flavours/glitch/features/video/index.js index 30592707c..d8e8791a7 100644 --- a/app/javascript/flavours/glitch/features/video/index.js +++ b/app/javascript/flavours/glitch/features/video/index.js @@ -139,6 +139,9 @@ export default class Video extends React.PureComponent { setVideoRef = c => { this.video = c; + if (this.video) { + this.setState({ volume: this.video.volume, muted: this.video.muted }); + } } setSeekRef = c => { @@ -319,6 +322,10 @@ export default class Video extends React.PureComponent { } } + handleVolumeChange = () => { + this.setState({ volume: this.video.volume, muted: this.video.muted }); + } + handleOpenVideo = () => { const { src, preview, width, height, alt } = this.props; const media = fromJS({ @@ -407,6 +414,7 @@ export default class Video extends React.PureComponent { onTimeUpdate={this.handleTimeUpdate} onLoadedData={this.handleLoadedData} onProgress={this.handleProgress} + onVolumeChange={this.handleVolumeChange} /> - +
Date: Sun, 27 Jan 2019 23:56:07 +0100 Subject: [PATCH 020/546] Fix SUPERUSER postgres command (#9877) --- lib/mastodon/migration_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/mastodon/migration_helpers.rb b/lib/mastodon/migration_helpers.rb index f5dc7e1c6..146eba8ec 100644 --- a/lib/mastodon/migration_helpers.rb +++ b/lib/mastodon/migration_helpers.rb @@ -889,7 +889,7 @@ table #{table}. If you are using PostgreSQL you can solve this by logging in to the GitLab database (#{dbname}) using a super user and running: - ALTER #{user} WITH SUPERUSER + ALTER USER #{user} WITH SUPERUSER For MySQL you instead need to run: From d4300c3b980db259f003114e5910509eca7bbfde Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 28 Jan 2019 04:17:11 +0100 Subject: [PATCH 021/546] Add note that contributors may request reimbursement through OpenCollective (#9933) --- CONTRIBUTING.md | 4 +++- README.md | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b55729a9b..65366be5f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ Contributing ============ -Thank you for considering contributing to Mastodon 🐘 +Thank you for considering contributing to Mastodon 🐘 You can contribute in the following ways: @@ -10,6 +10,8 @@ You can contribute in the following ways: - Contributing code to Mastodon by fixing bugs or implementing features - Improving the documentation +If your contributions are accepted into Mastodon, you can request to be paid through [our OpenCollective](https://opencollective.com/mastodon). + ## Bug reports Bug reports and feature suggestions can be submitted to [GitHub Issues](https://github.com/tootsuite/mastodon/issues). Please make sure that you are not submitting duplicates, and that a similar report or request has not already been resolved or rejected in the past using the search function. Please also use descriptive, concise titles. diff --git a/README.md b/README.md index 6c4918e6f..5ad6894ca 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Click below to **learn more** in a video: [youtube_demo]: https://www.youtube.com/watch?v=IPSbNdBmWKE -## Navigation +## Navigation - [Project homepage 🐘](https://joinmastodon.org) - [Support the development via Patreon][patreon] @@ -80,7 +80,7 @@ A **Vagrant** configuration is included for development purposes. Mastodon is **free, open source software** licensed under **AGPLv3**. -You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository, or submit translations using Weblate. To get started, take a look at [CONTRIBUTING.md](CONTRIBUTING.md) +You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository, or submit translations using Weblate. To get started, take a look at [CONTRIBUTING.md](CONTRIBUTING.md). If your contributions are accepted into Mastodon, you can request to be paid through [our OpenCollective](https://opencollective.com/mastodon). **IRC channel**: #mastodon on irc.freenode.net From 5d312ef9c7340a091a3d42975eae5d82acd60bf5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 28 Jan 2019 04:18:35 +0100 Subject: [PATCH 022/546] Fix slow fallback of CopyAccountStats migration setting stats to 0 (#9930) --- db/migrate/20181116173541_copy_account_stats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20181116173541_copy_account_stats.rb b/db/migrate/20181116173541_copy_account_stats.rb index bb523fbbd..8e27eb11b 100644 --- a/db/migrate/20181116173541_copy_account_stats.rb +++ b/db/migrate/20181116173541_copy_account_stats.rb @@ -44,7 +44,7 @@ class CopyAccountStats < ActiveRecord::Migration[5.2] # uniqueness violations that we need to skip over Account.unscoped.select('id, statuses_count, following_count, followers_count, created_at, updated_at').find_each do |account| begin - params = [[nil, account.id], [nil, account.statuses_count], [nil, account.following_count], [nil, account.followers_count], [nil, account.created_at], [nil, account.updated_at]] + params = [[nil, account.id], [nil, account[:statuses_count]], [nil, account[:following_count]], [nil, account[:followers_count]], [nil, account.created_at], [nil, account.updated_at]] exec_insert('INSERT INTO account_stats (account_id, statuses_count, following_count, followers_count, created_at, updated_at) VALUES ($1, $2, $3, $4, $5, $6)', nil, params) rescue ActiveRecord::RecordNotUnique next From 28866d329bafe676ba2c45e3b449be3d1ba6e9ce Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 28 Jan 2019 04:24:12 +0100 Subject: [PATCH 023/546] Bump version to 2.7.1 (#9932) --- CHANGELOG.md | 14 ++++++++++++++ lib/mastodon/version.rb | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bafbe1e9..cfb6b15f5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,20 @@ Changelog All notable changes to this project will be documented in this file. +## [2.7.1] - 2019-01-28 +### Fixed + +- Fix SSO authentication not working due to missing agreement boolean ([Gargron](https://github.com/tootsuite/mastodon/pull/9915)) +- Fix slow fallback of CopyAccountStats migration setting stats to 0 ([Gargron](https://github.com/tootsuite/mastodon/pull/9930)) +- Fix wrong command in migration error message ([angristan](https://github.com/tootsuite/mastodon/pull/9877)) +- Fix initial value of volume slider in video player and handle volume changes ([ThibG](https://github.com/tootsuite/mastodon/pull/9929)) +- Fix missing hotkeys for notifications ([ThibG](https://github.com/tootsuite/mastodon/pull/9927)) +- Fix being able to attach unattached media created by other users ([ThibG](https://github.com/tootsuite/mastodon/pull/9921)) +- Fix unrescued SSL error during link verification ([renatolond](https://github.com/tootsuite/mastodon/pull/9914)) +- Fix Firefox scrollbar color regression ([trwnh](https://github.com/tootsuite/mastodon/pull/9908)) +- Fix scheduled status with media immediately creating a status ([ThibG](https://github.com/tootsuite/mastodon/pull/9894)) +- Fix missing strong style for landing page description ([Kjwon15](https://github.com/tootsuite/mastodon/pull/9892)) + ## [2.7.0] - 2019-01-20 ### Added diff --git a/lib/mastodon/version.rb b/lib/mastodon/version.rb index abbc31178..cf32e2f63 100644 --- a/lib/mastodon/version.rb +++ b/lib/mastodon/version.rb @@ -13,7 +13,7 @@ module Mastodon end def patch - 0 + 1 end def pre From 7e81bca50041b578f2219b5c795af104b4a46a08 Mon Sep 17 00:00:00 2001 From: Sam Schlinkert Date: Mon, 28 Jan 2019 16:57:42 -0500 Subject: [PATCH 024/546] Bumps copyright year in README.md to 2019 (#9939) This is so incredibly small, but assuming this is a needed change. Might want to check year in other files. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ad6894ca..03c8472b9 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ You can open issues for bugs you've found or features you think are missing. You ## License -Copyright (C) 2016-2018 Eugen Rochko & other Mastodon contributors (see [AUTHORS.md](AUTHORS.md)) +Copyright (C) 2016-2019 Eugen Rochko & other Mastodon contributors (see [AUTHORS.md](AUTHORS.md)) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. From 4079b831e6d8430080307dc3ef3350e382f624db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 29 Jan 2019 20:21:15 +0100 Subject: [PATCH 025/546] =?UTF-8?q?i18n:=20Update=20Polish=20translation?= =?UTF-8?q?=20=F0=9F=87=B5=F0=9F=87=B1=20(#9945)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update Polish translation Signed-off-by: Marcin Mikołajczak * normalize Signed-off-by: Marcin Mikołajczak * inconsistentInterpolations-- Signed-off-by: Marcin Mikołajczak --- config/locales/pl.yml | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/config/locales/pl.yml b/config/locales/pl.yml index beadae14d..188f5c22b 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -565,8 +565,11 @@ pl: warning_title: Dostępność usuniętej zawartości directories: directory: Katalog profilów + enabled: Jesteś obecnie zapisany(-a) do katalogu + enabled_but_waiting: Jesteś zapisany(-a) do katalogu, ale jeszcze nie śledzi Cię wystarczająca liczba osób (%{min_followers}), aby się tam pojawić. explanation: Poznaj profile na podstawie zainteresowań explore_mastodon: Odkrywaj %{title} + how_to_enable: Nie jesteś obecnie zapisany(-a) do katalogu. Poniżej możesz zapisać się. Użyj hashtagów w swoim opisie, aby zostać wyświetlonym pod określonymi hashtagami! people: few: "%{count} osoby" many: "%{count} osób" @@ -621,7 +624,11 @@ pl: followers_count: Liczba śledzących lock_link: Zablokuj swoje konto purge: Przestań śledzić - success: W trakcie usuwania śledzących z %{count} domen… + success: + few: W trakcie usuwania śledzących z %{count} domen… + many: W trakcie usuwania śledzących z %{count} domen… + one: W trakcie usuwania śledzących z jednej domeny… + other: W trakcie usuwania śledzących z %{count} domen… true_privacy_html: Pamiętaj, że rzeczywista prywatność może zostać uzyskana wyłącznie dzięki szyfrowaniu end-to-end. unlocked_warning_html: Każdy może Cię śledzić, dzięki czemu może zobaczyć Twoje niepubliczne wpisy. %{lock_link} aby móc kontrolować, kto Cię śledzi. unlocked_warning_title: Twoje konto nie jest zablokowane @@ -631,6 +638,7 @@ pl: resources: Zasoby generic: changes_saved_msg: Ustawienia zapisane! + copy: Kopiuj save_changes: Zapisz zmiany validation_errors: few: Coś jest wciąż nie tak! Przejrzyj %{count} poniższe błędy @@ -750,10 +758,25 @@ pl: no_account_html: Nie masz konta? Możesz zarejestrować się tutaj proceed: Śledź prompt: 'Zamierzasz śledzić:' + reason_html: "Dlaczego ten krok jest konieczny? %{instance} może nie być serwerem na którym jesteś zarejestrowany(-a), więc musisz zostać przekierowany(-a) na swój serwer." + remote_interaction: + favourite: + proceed: Przejdź do dodania do ulubionych + prompt: 'Chcesz dodać ten wpis do ulubionych:' + reblog: + proceed: Przejdź do podbicia + prompt: 'Chcesz podbić ten wpis:' + reply: + proceed: Przejdź do dodawania odpowiedzi + prompt: 'Chcesz odpowiedzieć na ten wpis:' remote_unfollow: error: Błąd title: Tytuł - unfollowed: Przestałeś śledzić + unfollowed: Przestałeś(-aś) śledzić + scheduled_statuses: + over_daily_limit: Przekroczyłeś(-aś) limit %{limit} zaplanowanych wpisów na ten dzień + over_total_limit: Przekroczyłeś(-aś) limit %{limit} zaplanowanych wpisów + too_soon: Zaplanowana data musi wypadać w przyszłości sessions: activity: Ostatnia aktywność browser: Przeglądarka @@ -825,7 +848,11 @@ pl: other: "%{count} filmów" boosted_from_html: Podbito przez %{acct_link} content_warning: 'Ostrzeżenie o zawartości: %{warning}' - disallowed_hashtags: 'zawiera niedozwolone hashtagi: %{tags}' + disallowed_hashtags: + few: 'zawiera niedozwolone hashtagi: %{tags}' + many: 'zawiera niedozwolone hashtagi: %{tags}' + one: 'zawiera niedozwolony hashtag: %{tags}' + other: 'zawiera niedozwolone hashtagi: %{tags}' language_detection: Automatycznie wykrywaj język open_in_web: Otwórz w przeglądarce over_character_limit: limit %{max} znaków przekroczony From 6c513c75efa7d9af646ffebb46c1e3b04f0824f8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Wed, 30 Jan 2019 04:22:59 +0900 Subject: [PATCH 026/546] Bump rails-i18n from 5.1.2 to 5.1.3 (#9943) Bumps [rails-i18n](https://github.com/svenfuchs/rails-i18n) from 5.1.2 to 5.1.3. - [Release notes](https://github.com/svenfuchs/rails-i18n/releases) - [Changelog](https://github.com/svenfuchs/rails-i18n/blob/master/CHANGELOG.md) - [Commits](https://github.com/svenfuchs/rails-i18n/commits) Signed-off-by: dependabot[bot] --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 7b8ffec9a..8f661fc24 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -269,7 +269,7 @@ GEM httplog (1.2.0) rack (>= 1.0) rainbow (>= 2.0.0) - i18n (1.5.2) + i18n (1.5.3) concurrent-ruby (~> 1.0) i18n-tasks (0.9.28) activesupport (>= 4.0.2) @@ -455,7 +455,7 @@ GEM nokogiri (>= 1.6) rails-html-sanitizer (1.0.4) loofah (~> 2.2, >= 2.2.2) - rails-i18n (5.1.2) + rails-i18n (5.1.3) i18n (>= 0.7, < 2) railties (>= 5.0, < 6) rails-settings-cached (0.6.6) From 6513f6c953cdaad9118ea24a21f22fd2978bed28 Mon Sep 17 00:00:00 2001 From: Clar Charr Date: Thu, 31 Jan 2019 07:45:15 -0500 Subject: [PATCH 027/546] Replace unlock-alt icon with unlock (#9952) --- app/helpers/stream_entries_helper.rb | 2 +- app/javascript/mastodon/components/account.js | 2 +- app/javascript/mastodon/components/domain.js | 2 +- app/javascript/mastodon/features/account/components/header.js | 2 +- .../mastodon/features/compose/components/privacy_dropdown.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/stream_entries_helper.rb b/app/helpers/stream_entries_helper.rb index 033d435c4..7a74c0b7d 100644 --- a/app/helpers/stream_entries_helper.rb +++ b/app/helpers/stream_entries_helper.rb @@ -170,7 +170,7 @@ module StreamEntriesHelper when 'public' fa_icon 'globe fw' when 'unlisted' - fa_icon 'unlock-alt fw' + fa_icon 'unlock fw' when 'private' fa_icon 'lock fw' when 'direct' diff --git a/app/javascript/mastodon/components/account.js b/app/javascript/mastodon/components/account.js index 206030c00..2705a6001 100644 --- a/app/javascript/mastodon/components/account.js +++ b/app/javascript/mastodon/components/account.js @@ -88,7 +88,7 @@ class Account extends ImmutablePureComponent { if (requested) { buttons = ; } else if (blocking) { - buttons = ; + buttons = ; } else if (muting) { let hidingNotificationsButton; if (account.getIn(['relationship', 'muting_notifications'])) { diff --git a/app/javascript/mastodon/components/domain.js b/app/javascript/mastodon/components/domain.js index 24f80e788..85729ca94 100644 --- a/app/javascript/mastodon/components/domain.js +++ b/app/javascript/mastodon/components/domain.js @@ -32,7 +32,7 @@ class Account extends ImmutablePureComponent {
- +
diff --git a/app/javascript/mastodon/features/account/components/header.js b/app/javascript/mastodon/features/account/components/header.js index 2ab25cde4..4f6d0712d 100644 --- a/app/javascript/mastodon/features/account/components/header.js +++ b/app/javascript/mastodon/features/account/components/header.js @@ -132,7 +132,7 @@ class Header extends ImmutablePureComponent { } else if (account.getIn(['relationship', 'blocking'])) { actionBtn = (
- +
); } diff --git a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js index 5698765d9..e8f57a466 100644 --- a/app/javascript/mastodon/features/compose/components/privacy_dropdown.js +++ b/app/javascript/mastodon/features/compose/components/privacy_dropdown.js @@ -214,7 +214,7 @@ class PrivacyDropdown extends React.PureComponent { this.options = [ { icon: 'globe', value: 'public', text: formatMessage(messages.public_short), meta: formatMessage(messages.public_long) }, - { icon: 'unlock-alt', value: 'unlisted', text: formatMessage(messages.unlisted_short), meta: formatMessage(messages.unlisted_long) }, + { icon: 'unlock', value: 'unlisted', text: formatMessage(messages.unlisted_short), meta: formatMessage(messages.unlisted_long) }, { icon: 'lock', value: 'private', text: formatMessage(messages.private_short), meta: formatMessage(messages.private_long) }, { icon: 'envelope', value: 'direct', text: formatMessage(messages.direct_short), meta: formatMessage(messages.direct_long) }, ]; From 0167659f5f0b61e5a44df33df2510c2388a1a297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= <45913977+marek-lach@users.noreply.github.com> Date: Fri, 1 Feb 2019 00:07:08 +0100 Subject: [PATCH 028/546] Distinguish error messaging for mystyped URLs and deleted accounts (#9957) --- config/locales/en.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/locales/en.yml b/config/locales/en.yml index 10749b21b..fc0f63415 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -563,8 +563,8 @@ en: other: "%{count} people" errors: '403': You don't have permission to view this page. - '404': The page you were looking for doesn't exist. - '410': The page you were looking for doesn't exist anymore. + '404': The page you are looking for isn't here. + '410': The page you were looking for doesn't exist here anymore. '422': content: Security verification failed. Are you blocking cookies? title: Security verification failed @@ -577,7 +577,7 @@ en: archive_takeout: date: Date download: Download your archive - hint_html: You can request an archive of your toots and uploaded media. The exported data will be in ActivityPub format, readable by any compliant software. You can request an archive every 7 days. + hint_html: You can request an archive of your toots and uploaded media. The exported data will be in the ActivityPub format, readable by any compliant software. You can request an archive every 7 days. in_progress: Compiling your archive... request: Request your archive size: Size From 3383ed7573866f086ac49b0e975d5c502cdf4b89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20=C4=BDach?= <45913977+marek-lach@users.noreply.github.com> Date: Fri, 1 Feb 2019 00:13:47 +0100 Subject: [PATCH 029/546] Update the Slovak translation (#9958) --- config/locales/sk.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/config/locales/sk.yml b/config/locales/sk.yml index d8a81bbbf..c2099ea1c 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -570,16 +570,16 @@ sk: other: "%{count} ľudia" errors: '403': Nemáš povolenie na zobrazenie tejto stránky. - '404': Stránka ktorú si hľadal/a sa tu nenachádza. - '410': Stránka ktorú si tu hľadal/a už viac neexistuje. + '404': Stránka ktorú hľadáš nieje tu. + '410': Stránka ktorú si tu hľadal/a sa tu už viac nenachádza. '422': content: Bezpečtnostné overenie zlyhalo. Blokuješ cookies? title: Bezpečtnostné overenie zlyhalo '429': Zamlčané '500': - content: Ospravedlňujeme sa. Niečo sa pokazilo na našom konci. + content: Ospravedlňujem sa. Niečo sa pokazilo na našom konci. title: Táto stránka nieje v poriadku - noscript_html: Aby bolo možné používať Mastodon web aplikáciu, prosím povoľte JavaScript. Alebo skúste jednu z aplikácii dostupných pre vašu platformu. + noscript_html: Aby bolo možné používať Mastodon web aplikáciu, povoľ prosím JavaScript. Alebo skús jednu z aplikácii dostupných pre vašu platformu. exports: archive_takeout: date: Dátum @@ -607,7 +607,7 @@ sk: invalid_context: Nebola poskytnutá žiadna, alebo ide o neplatnú súvislosť invalid_irreversible: Nezvratné filtrovanie funguje iba so súvislostiami domovskej osi a oboznámení index: - delete: Vymazať + delete: Vymaž title: Triedenia new: title: Pridaj nové triedenie @@ -615,7 +615,7 @@ sk: domain: Doména explanation_html: Pokiaľ chceš zaručiť súkromie svojích príspevkov, musíš mať na vedomí, kto ťa sleduje. Tvoje súkromné príspevky sú doručené na každý server z ktorého ťa niekto následuje. Takže možno by si ich chcel/a skontrolovať, a odstrániť tých následovníkov, čo sú na serveroch ktorím nedôveruješ, že ich moderátori, alebo úpravbuy kódu budú tiež rešpektovať tvoje súkromie. followers_count: Počet následovateľov - lock_link: Zamknite svoj účet + lock_link: Zamkni svoj účet purge: Odstrániť následovateľa success: few: Počas utišovania sledovateľov z %{count} domén... From 1f9519020296c8c24a73d3f99d3c1ad94a627f3b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Fri, 1 Feb 2019 00:14:05 +0100 Subject: [PATCH 030/546] Refactor icons in web UI to use Icon component (#9951) * Refactor uses of icons to an Icon component in web UI * Refactor options passed to the Icon component * Make tests work with absolute component paths --- .eslintrc.js | 5 +++++ .../mastodon/components/attachment_list.js | 5 +++-- .../mastodon/components/column_back_button.js | 3 ++- .../components/column_back_button_slim.js | 3 ++- .../mastodon/components/column_header.js | 15 ++++++------- app/javascript/mastodon/components/icon.js | 21 +++++++++++++++++++ .../mastodon/components/icon_button.js | 5 +++-- .../mastodon/components/load_gap.js | 3 ++- app/javascript/mastodon/components/status.js | 5 +++-- .../mastodon/components/status_content.js | 3 ++- .../features/account/components/header.js | 5 +++-- .../account_gallery/components/media_item.js | 3 ++- .../account_timeline/components/moved_note.js | 3 ++- .../compose/components/compose_form.js | 3 ++- .../compose/components/privacy_dropdown.js | 3 ++- .../features/compose/components/search.js | 5 +++-- .../compose/components/search_results.js | 11 +++++----- .../features/compose/components/upload.js | 5 +++-- .../compose/components/upload_progress.js | 3 ++- .../mastodon/features/compose/index.js | 15 ++++++------- .../features/getting_started/index.js | 3 ++- .../features/list_adder/components/list.js | 3 ++- .../features/list_editor/components/search.js | 5 +++-- .../mastodon/features/list_timeline/index.js | 5 +++-- .../components/clear_column_button.js | 3 ++- .../notifications/components/filter_bar.js | 9 ++++---- .../notifications/components/notification.js | 7 ++++--- .../features/status/components/card.js | 7 ++++--- .../status/components/detailed_status.js | 11 +++++----- .../mastodon/features/status/index.js | 3 ++- .../features/ui/components/boost_modal.js | 3 ++- .../features/ui/components/column_header.js | 3 ++- .../features/ui/components/column_link.js | 5 +++-- .../features/ui/components/columns_area.js | 3 ++- .../features/ui/components/media_modal.js | 5 +++-- .../features/ui/components/tabs_bar.js | 13 ++++++------ .../mastodon/features/video/index.js | 13 ++++++------ jest.config.js | 4 ++++ 38 files changed, 147 insertions(+), 82 deletions(-) create mode 100644 app/javascript/mastodon/components/icon.js diff --git a/.eslintrc.js b/.eslintrc.js index 56e3d0530..177496d3a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -41,6 +41,11 @@ module.exports = { 'node_modules', '\\.(css|scss|json)$', ], + 'import/resolver': { + node: { + paths: ['app/javascript'], + }, + }, }, rules: { diff --git a/app/javascript/mastodon/components/attachment_list.js b/app/javascript/mastodon/components/attachment_list.js index 8e5bb0e0b..5dfa1464c 100644 --- a/app/javascript/mastodon/components/attachment_list.js +++ b/app/javascript/mastodon/components/attachment_list.js @@ -2,6 +2,7 @@ import React from 'react'; import ImmutablePropTypes from 'react-immutable-proptypes'; import PropTypes from 'prop-types'; import ImmutablePureComponent from 'react-immutable-pure-component'; +import Icon from 'mastodon/components/icon'; const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; @@ -24,7 +25,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
  • - {filename(displayUrl)} + {filename(displayUrl)}
  • ); })} @@ -36,7 +37,7 @@ export default class AttachmentList extends ImmutablePureComponent { return (
    - +
      diff --git a/app/javascript/mastodon/components/column_back_button.js b/app/javascript/mastodon/components/column_back_button.js index 8a60c4192..f41045787 100644 --- a/app/javascript/mastodon/components/column_back_button.js +++ b/app/javascript/mastodon/components/column_back_button.js @@ -1,6 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import PropTypes from 'prop-types'; +import Icon from 'mastodon/components/icon'; export default class ColumnBackButton extends React.PureComponent { @@ -19,7 +20,7 @@ export default class ColumnBackButton extends React.PureComponent { render () { return ( ); diff --git a/app/javascript/mastodon/components/column_back_button_slim.js b/app/javascript/mastodon/components/column_back_button_slim.js index 964c100be..cc8bfb151 100644 --- a/app/javascript/mastodon/components/column_back_button_slim.js +++ b/app/javascript/mastodon/components/column_back_button_slim.js @@ -1,6 +1,7 @@ import React from 'react'; import { FormattedMessage } from 'react-intl'; import ColumnBackButton from './column_back_button'; +import Icon from 'mastodon/components/icon'; export default class ColumnBackButtonSlim extends ColumnBackButton { @@ -8,7 +9,7 @@ export default class ColumnBackButtonSlim extends ColumnBackButton { return (
      - +
      diff --git a/app/javascript/mastodon/components/column_header.js b/app/javascript/mastodon/components/column_header.js index f68e4155e..f33c689e7 100644 --- a/app/javascript/mastodon/components/column_header.js +++ b/app/javascript/mastodon/components/column_header.js @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; import { FormattedMessage, injectIntl, defineMessages } from 'react-intl'; +import Icon from 'mastodon/components/icon'; const messages = defineMessages({ show: { id: 'column_header.show_settings', defaultMessage: 'Show settings' }, @@ -109,22 +110,22 @@ class ColumnHeader extends React.PureComponent { } if (multiColumn && pinned) { - pinButton = ; + pinButton = ; moveButtons = (
      - - + +
      ); } else if (multiColumn) { - pinButton = ; + pinButton = ; } if (!pinned && (multiColumn || showBackButton)) { backButton = ( ); @@ -140,7 +141,7 @@ class ColumnHeader extends React.PureComponent { } if (children || multiColumn) { - collapseButton = ; + collapseButton = ; } const hasTitle = icon && title; @@ -150,7 +151,7 @@ class ColumnHeader extends React.PureComponent {

      {hasTitle && ( )} diff --git a/app/javascript/mastodon/components/icon.js b/app/javascript/mastodon/components/icon.js new file mode 100644 index 000000000..d8a17722f --- /dev/null +++ b/app/javascript/mastodon/components/icon.js @@ -0,0 +1,21 @@ +import React from 'react'; +import PropTypes from 'prop-types'; +import classNames from 'classnames'; + +export default class Icon extends React.PureComponent { + + static propTypes = { + id: PropTypes.string.isRequired, + className: PropTypes.string, + fixedWidth: PropTypes.bool, + }; + + render () { + const { id, className, fixedWidth, ...other } = this.props; + + return ( + + ); + } + +} diff --git a/app/javascript/mastodon/components/icon_button.js b/app/javascript/mastodon/components/icon_button.js index b96e48fd0..fbb42f78f 100644 --- a/app/javascript/mastodon/components/icon_button.js +++ b/app/javascript/mastodon/components/icon_button.js @@ -3,6 +3,7 @@ import Motion from '../features/ui/util/optional_motion'; import spring from 'react-motion/lib/spring'; import PropTypes from 'prop-types'; import classNames from 'classnames'; +import Icon from 'mastodon/components/icon'; export default class IconButton extends React.PureComponent { @@ -86,7 +87,7 @@ export default class IconButton extends React.PureComponent { style={style} tabIndex={tabIndex} > -