From b923a4c7557ca0967d80dbe892b1517fcd0e9a41 Mon Sep 17 00:00:00 2001 From: Terence Eden Date: Sun, 16 Jul 2023 09:06:33 +0100 Subject: [PATCH 01/90] Prevent split line between icon and number on reposts & favourites (#26004) --- app/javascript/styles/mastodon/components.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 2ac04beb2f..da15989ca2 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -1423,6 +1423,7 @@ body > [data-popper-placement] { .detailed-status__link { color: inherit; text-decoration: none; + white-space: nowrap; } .detailed-status__favorites, From 26e522ac55d4147b0418abcf7e16bb70cd3f0af5 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 17 Jul 2023 08:26:52 +0200 Subject: [PATCH 02/90] Fix not actually connecting to the configured replica (#25977) --- app/helpers/database_helper.rb | 4 +-- app/models/application_record.rb | 2 ++ config/database.yml | 42 +++++++++++++++++++++++--------- 3 files changed, 34 insertions(+), 14 deletions(-) diff --git a/app/helpers/database_helper.rb b/app/helpers/database_helper.rb index 965eeaf41d..79227bb109 100644 --- a/app/helpers/database_helper.rb +++ b/app/helpers/database_helper.rb @@ -2,10 +2,10 @@ module DatabaseHelper def with_read_replica(&block) - ApplicationRecord.connected_to(role: :read, prevent_writes: true, &block) + ApplicationRecord.connected_to(role: :reading, prevent_writes: true, &block) end def with_primary(&block) - ApplicationRecord.connected_to(role: :primary, &block) + ApplicationRecord.connected_to(role: :writing, &block) end end diff --git a/app/models/application_record.rb b/app/models/application_record.rb index 5d7d3a0961..23e0af3a2a 100644 --- a/app/models/application_record.rb +++ b/app/models/application_record.rb @@ -5,6 +5,8 @@ class ApplicationRecord < ActiveRecord::Base include Remotable + connects_to database: { writing: :primary, reading: :read } + class << self def update_index(_type_name, *_args, &_block) super if Chewy.enabled? diff --git a/config/database.yml b/config/database.yml index f7ecbd9814..d1fd65a0fb 100644 --- a/config/database.yml +++ b/config/database.yml @@ -8,23 +8,41 @@ default: &default application_name: '' development: - <<: *default - database: <%= ENV['DB_NAME'] || 'mastodon_development' %> - username: <%= ENV['DB_USER'] %> - password: <%= (ENV['DB_PASS'] || '').to_json %> - host: <%= ENV['DB_HOST'] %> - port: <%= ENV['DB_PORT'] %> + primary: + <<: *default + database: <%= ENV['DB_NAME'] || 'mastodon_development' %> + username: <%= ENV['DB_USER'] %> + password: <%= (ENV['DB_PASS'] || '').to_json %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> + read: + <<: *default + database: <%= ENV['DB_NAME'] || 'mastodon_development' %> + username: <%= ENV['DB_USER'] %> + password: <%= (ENV['DB_PASS'] || '').to_json %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> + replica: true # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: - <<: *default - database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %> - username: <%= ENV['DB_USER'] %> - password: <%= (ENV['DB_PASS'] || '').to_json %> - host: <%= ENV['DB_HOST'] %> - port: <%= ENV['DB_PORT'] %> + primary: + <<: *default + database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %> + username: <%= ENV['DB_USER'] %> + password: <%= (ENV['DB_PASS'] || '').to_json %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> + read: + <<: *default + database: <%= ENV['DB_NAME'] || 'mastodon' %>_test<%= ENV['TEST_ENV_NUMBER'] %> + username: <%= ENV['DB_USER'] %> + password: <%= (ENV['DB_PASS'] || '').to_json %> + host: <%= ENV['DB_HOST'] %> + port: <%= ENV['DB_PORT'] %> + replica: true production: primary: From 84ce94b100e033cfb1eed194a037f8869b219d43 Mon Sep 17 00:00:00 2001 From: Renaud Chaput Date: Mon, 17 Jul 2023 09:33:22 +0200 Subject: [PATCH 03/90] Try to improve Renovatebot config (#26005) --- .github/renovate.json5 | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/renovate.json5 b/.github/renovate.json5 index 0dddc3e290..78530d65b4 100644 --- a/.github/renovate.json5 +++ b/.github/renovate.json5 @@ -9,7 +9,9 @@ ], stabilityDays: 3, // Wait 3 days after the package has been published before upgrading it // packageRules order is important, they are applied from top to bottom and are merged, - // so for example grouping rules needs to be at the bottom + // meaning the most important ones must be at the bottom, for example grouping rules + // If we do not want a package to be grouped with others, we need to set its groupName + // to `null` after any other rule set it to something. packageRules: [ { // Ignore major version bumps for these node packages @@ -45,6 +47,7 @@ // Ignore major version bumps for these Ruby packages matchManagers: ['bundler'], matchPackageNames: [ + 'rack', // Needs to be synced with Rails version 'sprockets', // Requires manual upgrade https://github.com/rails/sprockets/blob/master/UPGRADING.md#guide-to-upgrading-from-sprockets-3x-to-4x 'strong_migrations', // Requires manual upgrade 'sidekiq', // Requires manual upgrade @@ -84,12 +87,17 @@ // Update devDependencies every week, with one grouped PR matchDepTypes: 'devDependencies', matchUpdateTypes: ['patch', 'minor'], - excludePackageNames: [ - 'typescript', // Typescript has many changes in minor versions, needs to be checked every time - ], groupName: 'devDependencies (non-major)', extends: ['schedule:weekly'], }, + { + // Group all eslint-related packages with `eslint` in the same PR + matchManagers: ['npm'], + matchPackageNames: ['eslint'], + matchPackagePrefixes: ['eslint-', '@typescript-eslint/'], + matchUpdateTypes: ['patch', 'minor'], + groupName: 'eslint (non-major)', + }, { // Update @types/* packages every week, with one grouped PR matchPackagePrefixes: '@types/', @@ -98,6 +106,14 @@ extends: ['schedule:weekly'], addLabels: ['typescript'], }, + { + // We want those packages to always have their own PR + matchManagers: ['npm'], + matchPackageNames: [ + 'typescript', // Typescript has code-impacting changes in minor versions + ], + groupName: null, // We dont want them to belong to any group + }, // Add labels depending on package manager { matchManagers: ['npm', 'nvm'], addLabels: ['javascript'] }, { matchManagers: ['bundler', 'ruby-version'], addLabels: ['ruby'] }, From cdaca7a08b29e4a13ec04a9dbb845e9f28490abf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 09:38:11 +0200 Subject: [PATCH 04/90] Update babel monorepo to v7.22.9 (#26017) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 144 +++++++++++++++++++++++++++++------------------------- 1 file changed, 78 insertions(+), 66 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8a8cf7e65a..bf3c3ecef3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,33 +31,33 @@ dependencies: "@babel/highlight" "^7.22.5" -"@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.6.tgz#15606a20341de59ba02cd2fcc5086fcbe73bf544" - integrity sha512-29tfsWTq2Ftu7MXmimyC0C5FDZv5DYxOZkh3XD3+QW4V/BYuv/LyEsjj3c0hqedEaDt6DBfDvexMKU8YevdqFg== +"@babel/compat-data@^7.22.5", "@babel/compat-data@^7.22.6", "@babel/compat-data@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.9.tgz#71cdb00a1ce3a329ce4cbec3a44f9fef35669730" + integrity sha512-5UamI7xkUcJ3i9qVDS+KFDEK8/7oJ55/sJMB1Ge7IEapr7KfdfV/HErR+koZwOfd+SgtFKOKRhRakdg++DcJpQ== "@babel/core@^7.10.4", "@babel/core@^7.11.1", "@babel/core@^7.11.6", "@babel/core@^7.12.3", "@babel/core@^7.22.1": - version "7.22.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.8.tgz#386470abe884302db9c82e8e5e87be9e46c86785" - integrity sha512-75+KxFB4CZqYRXjx4NlR4J7yGvKumBuZTmV4NV6v09dVXXkuYVYLT68N6HCzLvfJ+fWCxQsntNzKwwIXL4bHnw== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.9.tgz#bd96492c68822198f33e8a256061da3cf391f58f" + integrity sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.7" - "@babel/helper-compilation-targets" "^7.22.6" - "@babel/helper-module-transforms" "^7.22.5" + "@babel/generator" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.9" + "@babel/helper-module-transforms" "^7.22.9" "@babel/helpers" "^7.22.6" "@babel/parser" "^7.22.7" "@babel/template" "^7.22.5" "@babel/traverse" "^7.22.8" "@babel/types" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" + semver "^6.3.1" -"@babel/generator@^7.22.5", "@babel/generator@^7.22.7": +"@babel/generator@^7.22.5": version "7.22.7" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.7.tgz#a6b8152d5a621893f2c9dacf9a4e286d520633d5" integrity sha512-p+jPjMG+SI8yvIaxGgeW24u7q9+5+TGpZh8/CuB7RhBKd7RCy8FayNEFNNKrNK/eUcY/4ExQqLmyrvBXKsIcwQ== @@ -67,6 +67,16 @@ "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" +"@babel/generator@^7.22.7", "@babel/generator@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.9.tgz#572ecfa7a31002fa1de2a9d91621fd895da8493d" + integrity sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw== + dependencies: + "@babel/types" "^7.22.5" + "@jridgewell/gen-mapping" "^0.3.2" + "@jridgewell/trace-mapping" "^0.3.17" + jsesc "^2.5.1" + "@babel/generator@^7.7.2": version "7.22.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.5.tgz#1e7bf768688acfb05cf30b2369ef855e82d984f7" @@ -99,40 +109,40 @@ "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/types" "^7.22.5" -"@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.6.tgz#e30d61abe9480aa5a83232eb31c111be922d2e52" - integrity sha512-534sYEqWD9VfUm3IPn2SLcH4Q3P86XL+QvqdC7ZsFrzyyPF3T4XGiVghF6PTYNdWg6pXuoqXxNQAhbYeEInTzA== +"@babel/helper-compilation-targets@^7.22.5", "@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz#f9d0a7aaaa7cd32a3f31c9316a69f5a9bcacb892" + integrity sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw== dependencies: - "@babel/compat-data" "^7.22.6" + "@babel/compat-data" "^7.22.9" "@babel/helper-validator-option" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" browserslist "^4.21.9" lru-cache "^5.1.1" + semver "^6.3.1" "@babel/helper-create-class-features-plugin@^7.22.5": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.6.tgz#58564873c889a6fea05a538e23f9f6d201f10950" - integrity sha512-iwdzgtSiBxF6ni6mzVnZCF3xt5qE6cEA0J7nFt8QOAWZ0zjCFceEgpn3vtb2V7WFR6QzP2jmIFOHMTRo7eNJjQ== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.9.tgz#c36ea240bb3348f942f08b0fbe28d6d979fab236" + integrity sha512-Pwyi89uO4YrGKxL/eNJ8lfEH55DnRloGPOseaA8NFNL6jAUnn+KccaISiFazCj5IolPPDjGSdzQzXVzODVRqUQ== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-function-name" "^7.22.5" "@babel/helper-member-expression-to-functions" "^7.22.5" "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" + "@babel/helper-replace-supers" "^7.22.9" "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" "@babel/helper-split-export-declaration" "^7.22.6" - "@nicolo-ribaudo/semver-v6" "^6.3.3" + semver "^6.3.1" "@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.22.5": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.6.tgz#87afd63012688ad792de430ceb3b6dc28e4e7a40" - integrity sha512-nBookhLKxAWo/TUCmhnaEJyLz2dekjQvv5SRpE9epWQBcpedWLKt8aZdsuT9XV5ovzR3fENLjRXVT0GsSlGGhA== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.9.tgz#9d8e61a8d9366fe66198f57c40565663de0825f6" + integrity sha512-+svjVa/tFwsNSG4NEy1h85+HQ5imbT92Q5/bgtS7P0GTQlP8WuFdqsiABmQouhiFGyV66oGxZFpeYHza1rNsKw== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" regexpu-core "^5.3.1" + semver "^6.3.1" "@babel/helper-define-polyfill-provider@^0.4.1": version "0.4.1" @@ -179,19 +189,16 @@ dependencies: "@babel/types" "^7.22.5" -"@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== +"@babel/helper-module-transforms@^7.22.5", "@babel/helper-module-transforms@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.9.tgz#92dfcb1fbbb2bc62529024f72d942a8c97142129" + integrity sha512-t+WA2Xn5K+rTeGtC8jCsdAH52bjggG5TKRuRrAGNM/mjIbO4GxvlLMFOEz9wXY5I2XQ60PMFsAG2WIcG82dQMQ== dependencies: "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-module-imports" "^7.22.5" "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" + "@babel/helper-split-export-declaration" "^7.22.6" "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" "@babel/helper-optimise-call-expression@^7.22.5": version "7.22.5" @@ -206,26 +213,22 @@ integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== "@babel/helper-remap-async-to-generator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz#14a38141a7bf2165ad38da61d61cf27b43015da2" - integrity sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.9.tgz#53a25b7484e722d7efb9c350c75c032d4628de82" + integrity sha512-8WWC4oR4Px+tr+Fp0X3RHDVfINGpF3ad1HIbrc8A77epiR6eMMc6jsgozkzT2uDiOOdoS9cLIQ+XD2XvI2WSmQ== dependencies: "@babel/helper-annotate-as-pure" "^7.22.5" "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-wrap-function" "^7.22.5" - "@babel/types" "^7.22.5" + "@babel/helper-wrap-function" "^7.22.9" -"@babel/helper-replace-supers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz#71bc5fb348856dea9fdc4eafd7e2e49f585145dc" - integrity sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg== +"@babel/helper-replace-supers@^7.22.5", "@babel/helper-replace-supers@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.9.tgz#cbdc27d6d8d18cd22c81ae4293765a5d9afd0779" + integrity sha512-LJIKvvpgPOPUThdYqcX6IXRuIcTkcAub0IaDRGCZH0p5GPUp7PhRU9QVgFcDDd51BaPkk77ZjqFwh6DZTAEmGg== dependencies: "@babel/helper-environment-visitor" "^7.22.5" "@babel/helper-member-expression-to-functions" "^7.22.5" "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" "@babel/helper-simple-access@^7.22.5": version "7.22.5" @@ -263,14 +266,13 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== -"@babel/helper-wrap-function@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz#44d205af19ed8d872b4eefb0d2fa65f45eb34f06" - integrity sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw== +"@babel/helper-wrap-function@^7.22.9": + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.9.tgz#189937248c45b0182c1dcf32f3444ca153944cb9" + integrity sha512-sZ+QzfauuUEfxSEjKFmi3qDSHgLsTPK/pEpoD/qonZKOtTPTLbf59oabPQ4rKekt9lFcj/hTZaOhWwFYrgjk+Q== dependencies: "@babel/helper-function-name" "^7.22.5" "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" "@babel/types" "^7.22.5" "@babel/helpers@^7.22.6": @@ -841,16 +843,16 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/plugin-transform-runtime@^7.22.4": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.7.tgz#eb9094b5fb756cc2d98d398b2c88aeefa9205de9" - integrity sha512-o02xM7iY7mSPI+TvaYDH0aYl+lg3+KT7qrD705JlsB/GrZSNaYO/4i+aDFKPiJ7ubq3hgv8NNLCdyB5MFxT8mg== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.22.9.tgz#a87b11e170cbbfb018e6a2bf91f5c6e533b9e027" + integrity sha512-9KjBH61AGJetCPYp/IEyLEp47SyybZb0nDRpBvmtEkm+rUIwxdlKpyNHI1TmsGkeuLclJdleQHRZ8XLBnnh8CQ== dependencies: "@babel/helper-module-imports" "^7.22.5" "@babel/helper-plugin-utils" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" babel-plugin-polyfill-corejs2 "^0.4.4" babel-plugin-polyfill-corejs3 "^0.8.2" babel-plugin-polyfill-regenerator "^0.5.1" + semver "^6.3.1" "@babel/plugin-transform-shorthand-properties@^7.22.5": version "7.22.5" @@ -930,12 +932,12 @@ "@babel/helper-plugin-utils" "^7.22.5" "@babel/preset-env@^7.11.0", "@babel/preset-env@^7.22.4": - version "7.22.7" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.7.tgz#a1ef34b64a80653c22ce4d9c25603cfa76fc168a" - integrity sha512-1whfDtW+CzhETuzYXfcgZAh8/GFMeEbz0V5dVgya8YeJyCU6Y/P2Gnx4Qb3MylK68Zu9UiwUvbPMPTpFAOJ+sQ== + version "7.22.9" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.9.tgz#57f17108eb5dfd4c5c25a44c1977eba1df310ac7" + integrity sha512-wNi5H/Emkhll/bqPjsjQorSykrlfY5OWakd6AulLvMEytpKasMVUpVy8RL4qBIBs5Ac6/5i0/Rv0b/Fg6Eag/g== dependencies: - "@babel/compat-data" "^7.22.6" - "@babel/helper-compilation-targets" "^7.22.6" + "@babel/compat-data" "^7.22.9" + "@babel/helper-compilation-targets" "^7.22.9" "@babel/helper-plugin-utils" "^7.22.5" "@babel/helper-validator-option" "^7.22.5" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.22.5" @@ -1009,11 +1011,11 @@ "@babel/plugin-transform-unicode-sets-regex" "^7.22.5" "@babel/preset-modules" "^0.1.5" "@babel/types" "^7.22.5" - "@nicolo-ribaudo/semver-v6" "^6.3.3" babel-plugin-polyfill-corejs2 "^0.4.4" babel-plugin-polyfill-corejs3 "^0.8.2" babel-plugin-polyfill-regenerator "^0.5.1" core-js-compat "^3.31.0" + semver "^6.3.1" "@babel/preset-modules@^0.1.5": version "0.1.5" @@ -1093,7 +1095,7 @@ debug "^4.1.0" globals "^11.1.0" -"@babel/traverse@^7.22.5", "@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8": +"@babel/traverse@^7.22.6", "@babel/traverse@^7.22.8": version "7.22.8" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.8.tgz#4d4451d31bc34efeae01eac222b514a77aa4000e" integrity sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw== @@ -3740,11 +3742,16 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001464: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001503.tgz#88b6ff1b2cf735f1f3361dc1a15b59f0561aa398" integrity sha512-Sf9NiF+wZxPfzv8Z3iS0rXM1Do+iOy2Lxvib38glFX+08TCYYYGR5fRJXk4d77C4AYwhUjgYgMsMudbh2TqCKw== -caniuse-lite@^1.0.30001502, caniuse-lite@^1.0.30001503: +caniuse-lite@^1.0.30001502: version "1.0.30001515" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001515.tgz#418aefeed9d024cd3129bfae0ccc782d4cb8f12b" integrity sha512-eEFDwUOZbE24sb+Ecsx3+OvNETqjWIdabMy52oOkIgcUtAsQifjUG9q4U9dgTHJM2mfk4uEPxc0+xuFdJ629QA== +caniuse-lite@^1.0.30001503: + version "1.0.30001516" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001516.tgz#621b1be7d85a8843ee7d210fd9d87b52e3daab3a" + integrity sha512-Wmec9pCBY8CWbmI4HsjBeQLqDTqV91nFVR83DnZpYyRnPI1wePDsTg0bGLPC5VU/3OIZV1fmxEea1b+tFKe86g== + chalk@5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/chalk/-/chalk-5.2.0.tgz#249623b7d66869c673699fb66d65723e54dfcfb3" @@ -4805,11 +4812,16 @@ ejs@^3.1.6: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.428, electron-to-chromium@^1.4.431: +electron-to-chromium@^1.4.428: version "1.4.457" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.457.tgz#3fdc7b4f97d628ac6b51e8b4b385befb362fe343" integrity sha512-/g3UyNDmDd6ebeWapmAoiyy+Sy2HyJ+/X8KyvNeHfKRFfHaA2W8oF5fxD5F3tjBDcjpwo0iek6YNgxNXDBoEtA== +electron-to-chromium@^1.4.431: + version "1.4.461" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.461.tgz#6b14af66042732bf883ab63a4d82cac8f35eb252" + integrity sha512-1JkvV2sgEGTDXjdsaQCeSwYYuhLRphRpc+g6EHTFELJXEiznLt3/0pZ9JuAOQ5p2rI3YxKTbivtvajirIfhrEQ== + elliptic@^6.5.3: version "6.5.4" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" @@ -10305,7 +10317,7 @@ semver@^6.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^6.3.0: +semver@^6.3.0, semver@^6.3.1: version "6.3.1" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== From f17acbca33a9f1304a9bd4fc4318055d518d3dbf Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 11:39:35 +0200 Subject: [PATCH 05/90] Update dependency immutable to v4.3.1 (#26029) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index bf3c3ecef3..823ab96ab0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6385,9 +6385,9 @@ immutable@^3.8.2: integrity sha512-15gZoQ38eYjEjxkorfbcgBKBL6R7T459OuK+CpcWt7O3KF4uPCx2tD0uFETlUDIyo+1789crbMhTvQBSR5yBMg== immutable@^4.0.0, immutable@^4.0.0-rc.1, immutable@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be" - integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg== + version "4.3.1" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.1.tgz#17988b356097ab0719e2f741d56f3ec6c317f9dc" + integrity sha512-lj9cnmB/kVS0QHsJnYKD1uo3o39nrbKxszjnqS9Fr6NB7bZzW45U6WSGBPKXDL/CvDKqDNPA4r3DoDQ8GTxo2A== import-fresh@^3.0.0, import-fresh@^3.2.1: version "3.3.0" From 97ce47e45100548f258644fc14314dbf3db94973 Mon Sep 17 00:00:00 2001 From: Michael Stanclift Date: Mon, 17 Jul 2023 04:51:00 -0500 Subject: [PATCH 06/90] Fix for "follows you" indicator in light web UI not readable (#25993) --- app/javascript/styles/mastodon/components.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index da15989ca2..beff07daa4 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4390,7 +4390,7 @@ a.status-card.compact:hover { } .relationship-tag { - color: $primary-text-color; + color: $white; margin-bottom: 4px; display: block; background-color: rgba($black, 0.45); From c667fc5a4a018128c03f73e4e4661fd2b5bd9701 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 17 Jul 2023 12:10:50 +0200 Subject: [PATCH 07/90] Fix ArgumentError in mailers when a user's timezone is blank (#26025) --- app/views/notification_mailer/_status.html.haml | 2 +- app/views/user_mailer/appeal_approved.html.haml | 2 +- app/views/user_mailer/appeal_approved.text.erb | 2 +- app/views/user_mailer/appeal_rejected.html.haml | 2 +- app/views/user_mailer/appeal_rejected.text.erb | 2 +- app/views/user_mailer/suspicious_sign_in.html.haml | 2 +- app/views/user_mailer/suspicious_sign_in.text.erb | 2 +- app/views/user_mailer/warning.html.haml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/views/notification_mailer/_status.html.haml b/app/views/notification_mailer/_status.html.haml index d8aa38b112..4ea3d2c45e 100644 --- a/app/views/notification_mailer/_status.html.haml +++ b/app/views/notification_mailer/_status.html.haml @@ -42,4 +42,4 @@ = link_to a.remote_url, a.remote_url %p.status-footer - = link_to l(status.created_at.in_time_zone(time_zone)), web_url("@#{status.account.pretty_acct}/#{status.id}") + = link_to l(status.created_at.in_time_zone(time_zone.presence)), web_url("@#{status.account.pretty_acct}/#{status.id}") diff --git a/app/views/user_mailer/appeal_approved.html.haml b/app/views/user_mailer/appeal_approved.html.haml index d62789a067..1bbd8ae75a 100644 --- a/app/views/user_mailer/appeal_approved.html.haml +++ b/app/views/user_mailer/appeal_approved.html.haml @@ -36,7 +36,7 @@ %tbody %tr %td.column-cell.text-center - %p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) + %p= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %table.email-table{ cellspacing: 0, cellpadding: 0 } %tbody diff --git a/app/views/user_mailer/appeal_approved.text.erb b/app/views/user_mailer/appeal_approved.text.erb index 99596605aa..9a4bd81c3d 100644 --- a/app/views/user_mailer/appeal_approved.text.erb +++ b/app/views/user_mailer/appeal_approved.text.erb @@ -2,6 +2,6 @@ === -<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %> +<%= t 'user_mailer.appeal_approved.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %> => <%= root_url %> diff --git a/app/views/user_mailer/appeal_rejected.html.haml b/app/views/user_mailer/appeal_rejected.html.haml index ae60775b01..22e3f62df6 100644 --- a/app/views/user_mailer/appeal_rejected.html.haml +++ b/app/views/user_mailer/appeal_rejected.html.haml @@ -36,7 +36,7 @@ %tbody %tr %td.column-cell.text-center - %p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) + %p= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %table.email-table{ cellspacing: 0, cellpadding: 0 } %tbody diff --git a/app/views/user_mailer/appeal_rejected.text.erb b/app/views/user_mailer/appeal_rejected.text.erb index 3c93777180..3b063e19df 100644 --- a/app/views/user_mailer/appeal_rejected.text.erb +++ b/app/views/user_mailer/appeal_rejected.text.erb @@ -2,6 +2,6 @@ === -<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone)) %> +<%= t 'user_mailer.appeal_rejected.explanation', appeal_date: l(@appeal.created_at.in_time_zone(@resource.time_zone.presence)), strike_date: l(@appeal.strike.created_at.in_time_zone(@resource.time_zone.presence)) %> => <%= root_url %> diff --git a/app/views/user_mailer/suspicious_sign_in.html.haml b/app/views/user_mailer/suspicious_sign_in.html.haml index 6ebba3fa55..3dbec61ffe 100644 --- a/app/views/user_mailer/suspicious_sign_in.html.haml +++ b/app/views/user_mailer/suspicious_sign_in.html.haml @@ -47,7 +47,7 @@ %strong= "#{t('sessions.browser')}:" %span{ title: @user_agent }= t 'sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: @detection.id.to_s), platform: t("sessions.platforms.#{@detection.platform.id}", default: @detection.platform.id.to_s) %br/ - = l(@timestamp.in_time_zone(@resource.time_zone)) + = l(@timestamp.in_time_zone(@resource.time_zone.presence)) %table.email-table{ cellspacing: 0, cellpadding: 0 } %tbody diff --git a/app/views/user_mailer/suspicious_sign_in.text.erb b/app/views/user_mailer/suspicious_sign_in.text.erb index 956071e774..ed01e54fa2 100644 --- a/app/views/user_mailer/suspicious_sign_in.text.erb +++ b/app/views/user_mailer/suspicious_sign_in.text.erb @@ -8,7 +8,7 @@ <%= t('sessions.ip') %>: <%= @remote_ip %> <%= t('sessions.browser') %>: <%= t('sessions.description', browser: t("sessions.browsers.#{@detection.id}", default: "#{@detection.id}"), platform: t("sessions.platforms.#{@detection.platform.id}", default: "#{@detection.platform.id}")) %> -<%= l(@timestamp.in_time_zone(@resource.time_zone)) %> +<%= l(@timestamp.in_time_zone(@resource.time_zone.presence)) %> <%= t 'user_mailer.suspicious_sign_in.further_actions_html', action: t('user_mailer.suspicious_sign_in.change_password') %> diff --git a/app/views/user_mailer/warning.html.haml b/app/views/user_mailer/warning.html.haml index 9cb73b0fee..8a878bead6 100644 --- a/app/views/user_mailer/warning.html.haml +++ b/app/views/user_mailer/warning.html.haml @@ -58,7 +58,7 @@ - unless @statuses.empty? - @statuses.each_with_index do |status, i| - = render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone + = render 'notification_mailer/status', status: status, i: i + 1, highlighted: true, time_zone: @resource.time_zone.presence %table.email-table{ cellspacing: 0, cellpadding: 0 } %tbody From 7b7a26c895dff20735abb64859e0b98072aaaa9e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:13:01 +0200 Subject: [PATCH 08/90] Update dependency postcss to v8.4.26 (#26030) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 823ab96ab0..6f31752b08 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9248,9 +9248,9 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.2.15, postcss@^8.4.24: - version "8.4.25" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.25.tgz#4a133f5e379eda7f61e906c3b1aaa9b81292726f" - integrity sha512-7taJ/8t2av0Z+sQEvNzCkpDynl0tX3uJMCODi6nT3PfASC7dYCWV9aQ+uiCf+KBD4SEFcu+GvJdGdwzQ6OSjCw== + version "8.4.26" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.26.tgz#1bc62ab19f8e1e5463d98cf74af39702a00a9e94" + integrity sha512-jrXHFF8iTloAenySjM/ob3gSj7pCu0Ji49hnjqzsgSRa50hkWCKD0HQ+gMNJkW38jBI68MpAAg7ZWwHwX8NMMw== dependencies: nanoid "^3.3.6" picocolors "^1.0.0" From ee8c8dbc6ff52f2cebfd2b59501a95793ce140d8 Mon Sep 17 00:00:00 2001 From: fusagiko / takayamaki <24884114+takayamaki@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:15:32 +0900 Subject: [PATCH 09/90] remove some file paths from rubocop_tobo.yml (#26022) --- .rubocop_todo.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 0f8fa67709..3c743842e2 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -194,7 +194,6 @@ RSpec/AnyInstance: - 'spec/models/account_spec.rb' - 'spec/models/setting_spec.rb' - 'spec/services/activitypub/process_collection_service_spec.rb' - - 'spec/validators/blacklisted_email_validator_spec.rb' - 'spec/validators/follow_limit_validator_spec.rb' - 'spec/workers/activitypub/delivery_worker_spec.rb' - 'spec/workers/web/push_notification_worker_spec.rb' @@ -333,11 +332,7 @@ RSpec/MessageChain: RSpec/MessageSpies: Exclude: - 'spec/controllers/admin/accounts_controller_spec.rb' - - 'spec/controllers/api/base_controller_spec.rb' - - 'spec/controllers/auth/registrations_controller_spec.rb' - 'spec/helpers/admin/account_moderation_notes_helper_spec.rb' - - 'spec/helpers/application_helper_spec.rb' - - 'spec/lib/status_finder_spec.rb' - 'spec/lib/webfinger_resource_spec.rb' - 'spec/models/admin/account_action_spec.rb' - 'spec/models/concerns/remotable_spec.rb' @@ -802,7 +797,6 @@ Style/MutableConstant: Exclude: - 'app/models/tag.rb' - 'app/services/delete_account_service.rb' - - 'config/initializers/twitter_regex.rb' - 'lib/mastodon/migration_warning.rb' # This cop supports safe autocorrection (--autocorrect). From cf18bfa090df8c89254ee3ac5a2d54bbf8d9d4c4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:39:50 +0200 Subject: [PATCH 10/90] Update dependency aws-sdk-s3 to v1.130.0 (#25967) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 87d8ef7d25..c534914956 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,20 +103,20 @@ GEM attr_required (1.0.1) awrence (1.2.1) aws-eventstream (1.2.0) - aws-partitions (1.780.0) - aws-sdk-core (3.175.0) + aws-partitions (1.786.0) + aws-sdk-core (3.178.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) aws-sigv4 (~> 1.5) jmespath (~> 1, >= 1.6.1) - aws-sdk-kms (1.67.0) - aws-sdk-core (~> 3, >= 3.174.0) + aws-sdk-kms (1.71.0) + aws-sdk-core (~> 3, >= 3.177.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.126.0) - aws-sdk-core (~> 3, >= 3.174.0) + aws-sdk-s3 (1.130.0) + aws-sdk-core (~> 3, >= 3.177.0) aws-sdk-kms (~> 1) - aws-sigv4 (~> 1.4) - aws-sigv4 (1.5.2) + aws-sigv4 (~> 1.6) + aws-sigv4 (1.6.0) aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.18) better_errors (2.10.1) From bf9c1a65fa37827c99769cb7e39283f7b72feeaf Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 17 Jul 2023 06:40:27 -0400 Subject: [PATCH 11/90] Update rubocop 1.54.2 (#26002) --- .rubocop_todo.yml | 6 +++--- Gemfile.lock | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3c743842e2..960d548f06 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --auto-gen-only-exclude --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.54.1. +# using RuboCop version 1.54.2. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -367,7 +367,7 @@ Rails/ApplicationController: # Configuration parameters: Database, Include. # SupportedDatabases: mysql, postgresql -# Include: db/migrate/*.rb +# Include: db/**/*.rb Rails/BulkChangeTable: Exclude: - 'db/migrate/20160222143943_add_profile_fields_to_accounts.rb' @@ -403,7 +403,7 @@ Rails/BulkChangeTable: - 'db/migrate/20220824164433_add_human_identifier_to_admin_action_logs.rb' # Configuration parameters: Include. -# Include: db/migrate/*.rb +# Include: db/**/*.rb Rails/CreateTableWithTimestamps: Exclude: - 'db/migrate/20170508230434_create_conversation_mutes.rb' diff --git a/Gemfile.lock b/Gemfile.lock index c534914956..a298c87c8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -596,7 +596,7 @@ GEM sidekiq (>= 2.4.0) rspec-support (3.12.0) rspec_chunked (0.6) - rubocop (1.54.1) + rubocop (1.54.2) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) From 626f9cf83199b75424f09589439ac4e92d1badc6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:40:54 +0200 Subject: [PATCH 12/90] Update dependency public_suffix to v5.0.3 (#26032) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index a298c87c8b..1d43b687d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -493,7 +493,7 @@ GEM net-smtp premailer (~> 1.7, >= 1.7.9) private_address_check (0.5.0) - public_suffix (5.0.1) + public_suffix (5.0.3) puma (6.3.0) nio4r (~> 2.0) pundit (2.3.0) From f18618d7f92553c33bbd0b09bf52401000b7b8e6 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 17 Jul 2023 13:13:43 +0200 Subject: [PATCH 13/90] Fix some incorrect tests (#26035) --- spec/services/batched_remove_status_service_spec.rb | 4 ++-- spec/services/remove_status_service_spec.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/services/batched_remove_status_service_spec.rb b/spec/services/batched_remove_status_service_spec.rb index 1363c81d05..8201c9d51f 100644 --- a/spec/services/batched_remove_status_service_spec.rb +++ b/spec/services/batched_remove_status_service_spec.rb @@ -34,11 +34,11 @@ RSpec.describe BatchedRemoveStatusService, type: :service do end it 'removes statuses from author\'s home feed' do - expect(HomeFeed.new(alice).get(10)).to_not include([status_alice_hello.id, status_alice_other.id]) + expect(HomeFeed.new(alice).get(10).pluck(:id)).to_not include(status_alice_hello.id, status_alice_other.id) end it 'removes statuses from local follower\'s home feed' do - expect(HomeFeed.new(jeff).get(10)).to_not include([status_alice_hello.id, status_alice_other.id]) + expect(HomeFeed.new(jeff).get(10).pluck(:id)).to_not include(status_alice_hello.id, status_alice_other.id) end it 'notifies streaming API of followers' do diff --git a/spec/services/remove_status_service_spec.rb b/spec/services/remove_status_service_spec.rb index 77b01d3072..c19b4fac15 100644 --- a/spec/services/remove_status_service_spec.rb +++ b/spec/services/remove_status_service_spec.rb @@ -28,12 +28,12 @@ RSpec.describe RemoveStatusService, type: :service do it 'removes status from author\'s home feed' do subject.call(@status) - expect(HomeFeed.new(alice).get(10)).to_not include(@status.id) + expect(HomeFeed.new(alice).get(10).pluck(:id)).to_not include(@status.id) end it 'removes status from local follower\'s home feed' do subject.call(@status) - expect(HomeFeed.new(jeff).get(10)).to_not include(@status.id) + expect(HomeFeed.new(jeff).get(10).pluck(:id)).to_not include(@status.id) end it 'sends Delete activity to followers' do From 943f27f4377cd74bc07794f15299ad05ef8a7d4f Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 17 Jul 2023 13:56:28 +0200 Subject: [PATCH 14/90] Remove unfollowed hashtag posts from home feed (#26028) --- app/controllers/api/v1/tags_controller.rb | 1 + app/lib/feed_manager.rb | 20 ++++++++++++ app/workers/tag_unmerge_worker.rb | 21 ++++++++++++ spec/workers/tag_unmerge_worker_spec.rb | 39 +++++++++++++++++++++++ 4 files changed, 81 insertions(+) create mode 100644 app/workers/tag_unmerge_worker.rb create mode 100644 spec/workers/tag_unmerge_worker_spec.rb diff --git a/app/controllers/api/v1/tags_controller.rb b/app/controllers/api/v1/tags_controller.rb index 284ec85937..672535a018 100644 --- a/app/controllers/api/v1/tags_controller.rb +++ b/app/controllers/api/v1/tags_controller.rb @@ -19,6 +19,7 @@ class Api::V1::TagsController < Api::BaseController def unfollow TagFollow.find_by(account: current_account, tag: @tag)&.destroy! + TagUnmergeWorker.perform_async(@tag.id, current_account.id) render json: @tag, serializer: REST::TagSerializer end diff --git a/app/lib/feed_manager.rb b/app/lib/feed_manager.rb index 7423d2d092..ad686c1f1a 100644 --- a/app/lib/feed_manager.rb +++ b/app/lib/feed_manager.rb @@ -180,6 +180,26 @@ class FeedManager end end + # Remove a tag's statuses from a home feed + # @param [Tag] from_tag + # @param [Account] into_account + # @return [void] + def unmerge_tag_from_home(from_tag, into_account) + timeline_key = key(:home, into_account.id) + timeline_status_ids = redis.zrange(timeline_key, 0, -1) + + # This is a bit tricky because we need posts tagged with this hashtag that are not + # also tagged with another followed hashtag or from a followed user + scope = from_tag.statuses + .where(id: timeline_status_ids) + .where.not(account: into_account.following) + .tagged_with_none(TagFollow.where(account: into_account).pluck(:tag_id)) + + scope.select('id, reblog_of_id').reorder(nil).find_each do |status| + remove_from_feed(:home, into_account.id, status, aggregate_reblogs: into_account.user&.aggregates_reblogs?) + end + end + # Clear all statuses from or mentioning target_account from a home feed # @param [Account] account # @param [Account] target_account diff --git a/app/workers/tag_unmerge_worker.rb b/app/workers/tag_unmerge_worker.rb new file mode 100644 index 0000000000..1c2a6d1e76 --- /dev/null +++ b/app/workers/tag_unmerge_worker.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class TagUnmergeWorker + include Sidekiq::Worker + include DatabaseHelper + + sidekiq_options queue: 'pull' + + def perform(from_tag_id, into_account_id) + with_primary do + @from_tag = Tag.find(from_tag_id) + @into_account = Account.find(into_account_id) + end + + with_read_replica do + FeedManager.instance.unmerge_tag_from_home(@from_tag, @into_account) + end + rescue ActiveRecord::RecordNotFound + true + end +end diff --git a/spec/workers/tag_unmerge_worker_spec.rb b/spec/workers/tag_unmerge_worker_spec.rb new file mode 100644 index 0000000000..5d3a12c449 --- /dev/null +++ b/spec/workers/tag_unmerge_worker_spec.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe TagUnmergeWorker do + subject { described_class.new } + + describe 'perform' do + let(:follower) { Fabricate(:account) } + let(:followed) { Fabricate(:account) } + let(:followed_tag) { Fabricate(:tag) } + let(:unchanged_followed_tag) { Fabricate(:tag) } + let(:status_from_followed) { Fabricate(:status, created_at: 2.hours.ago, account: followed) } + let(:tagged_status) { Fabricate(:status, created_at: 1.hour.ago) } + let(:unchanged_tagged_status) { Fabricate(:status) } + + before do + tagged_status.tags << followed_tag + unchanged_tagged_status.tags << followed_tag + unchanged_tagged_status.tags << unchanged_followed_tag + + tag_follow = TagFollow.create_with(rate_limit: false).find_or_create_by!(tag: followed_tag, account: follower) + TagFollow.create_with(rate_limit: false).find_or_create_by!(tag: unchanged_followed_tag, account: follower) + + FeedManager.instance.push_to_home(follower, status_from_followed, update: false) + FeedManager.instance.push_to_home(follower, tagged_status, update: false) + FeedManager.instance.push_to_home(follower, unchanged_tagged_status, update: false) + + tag_follow.destroy! + end + + it 'removes the expected status from the feed' do + expect { subject.perform(followed_tag.id, follower.id) } + .to change { HomeFeed.new(follower).get(10).pluck(:id) } + .from([unchanged_tagged_status.id, tagged_status.id, status_from_followed.id]) + .to([unchanged_tagged_status.id, status_from_followed.id]) + end + end +end From 2a9063e36ad107b021b85b0ce937b95974a9cd70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 17 Jul 2023 14:07:36 +0200 Subject: [PATCH 15/90] Update dependency react-select to v5.7.4 (#26033) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6f31752b08..0523961667 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1279,17 +1279,17 @@ resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.42.0.tgz#484a1d638de2911e6f5a30c12f49c7e4a3270fb6" integrity sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw== -"@floating-ui/core@^1.3.0": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.3.0.tgz#113bc85fa102cf890ae801668f43ee265c547a09" - integrity sha512-vX1WVAdPjZg9DkDkC+zEx/tKtnST6/qcNpwcjeBgco3XRNHz5PUA+ivi/yr6G3o0kMR60uKBJcfOdfzOFI7PMQ== +"@floating-ui/core@^1.3.1": + version "1.3.1" + resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.3.1.tgz#4d795b649cc3b1cbb760d191c80dcb4353c9a366" + integrity sha512-Bu+AMaXNjrpjh41znzHqaz3r2Nr8hHuHZT6V2LBKMhyMl0FgKA62PNYbqnfgmzOhoWZj70Zecisbo4H1rotP5g== "@floating-ui/dom@^1.0.1": - version "1.3.0" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.3.0.tgz#69456f2164fc3d33eb40837686eaf71537235ac9" - integrity sha512-qIAwejE3r6NeA107u4ELDKkH8+VtgRKdXqtSPaKflL2S2V+doyN+Wt9s5oHKXPDo4E8TaVXaHT3+6BbagH31xw== + version "1.4.5" + resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.4.5.tgz#336dfb9870c98b471ff5802002982e489b8bd1c5" + integrity sha512-96KnRWkRnuBSSFbj0sFGwwOUd8EkiecINVl0O9wiZlZ64EkpyAOG3Xc2vKKNJmru0Z7RqWNymA+6b8OZqjgyyw== dependencies: - "@floating-ui/core" "^1.3.0" + "@floating-ui/core" "^1.3.1" "@formatjs/cli@^6.1.1": version "6.1.3" @@ -9686,9 +9686,9 @@ react-router@^4.3.1: warning "^4.0.1" react-select@*, react-select@^5.7.3: - version "5.7.3" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.7.3.tgz#fa0dc9a23cad6ff3871ad3829f6083a4b54961a2" - integrity sha512-z8i3NCuFFWL3w27xq92rBkVI2onT0jzIIPe480HlBjXJ3b5o6Q+Clp4ydyeKrj9DZZ3lrjawwLC5NGl0FSvUDg== + version "5.7.4" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.7.4.tgz#d8cad96e7bc9d6c8e2709bdda8f4363c5dd7ea7d" + integrity sha512-NhuE56X+p9QDFh4BgeygHFIvJJszO1i1KSkg/JPcIJrbovyRtI+GuOEa4XzFCEpZRAEoEI8u/cAHK+jG/PgUzQ== dependencies: "@babel/runtime" "^7.12.0" "@emotion/cache" "^11.4.0" From 5096deb818f416c9afa8d5b612fabe267e546239 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 17 Jul 2023 08:08:56 -0400 Subject: [PATCH 16/90] Fix haml lint Rubocop `Style/RedundantStringCoercion` cop (#25975) --- .haml-lint_todo.yml | 4 ++-- app/views/settings/imports/show.html.haml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 31b79f7db2..ce214bfa51 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,13 +1,13 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-07-11 23:58:05 +0200 using Haml-Lint version 0.48.0. +# on 2023-07-13 11:24:52 -0400 using Haml-Lint version 0.48.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. linters: - # Offense count: 94 + # Offense count: 93 RuboCop: enabled: false diff --git a/app/views/settings/imports/show.html.haml b/app/views/settings/imports/show.html.haml index 65954e3e1e..893c5c8d29 100644 --- a/app/views/settings/imports/show.html.haml +++ b/app/views/settings/imports/show.html.haml @@ -1,13 +1,13 @@ - content_for :page_title do - = t("imports.titles.#{@bulk_import.type.to_s}") + = t("imports.titles.#{@bulk_import.type}") - if @bulk_import.likely_mismatched? .flash-message.warning= t("imports.mismatched_types_warning") - if @bulk_import.overwrite? - %p.hint= t("imports.overwrite_preambles.#{@bulk_import.type.to_s}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items) + %p.hint= t("imports.overwrite_preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items) - else - %p.hint= t("imports.preambles.#{@bulk_import.type.to_s}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items) + %p.hint= t("imports.preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items) .simple_form .actions From 361dd432354279281cde6a6fdf99eae68787a421 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 17 Jul 2023 09:07:29 -0400 Subject: [PATCH 17/90] Fix haml-lint Rubocop `lambda` cop (#25946) --- .haml-lint_todo.yml | 4 ++-- app/views/admin/domain_blocks/edit.html.haml | 2 +- app/views/admin/domain_blocks/new.html.haml | 2 +- app/views/admin/ip_blocks/new.html.haml | 4 ++-- app/views/admin/roles/_form.html.haml | 2 +- app/views/admin/settings/about/show.html.haml | 4 ++-- app/views/admin/settings/appearance/show.html.haml | 2 +- app/views/admin/settings/registrations/show.html.haml | 2 +- app/views/filters/_filter_fields.html.haml | 4 ++-- app/views/invites/_form.html.haml | 4 ++-- app/views/settings/applications/_fields.html.haml | 2 +- app/views/settings/preferences/appearance/show.html.haml | 6 +++--- app/views/settings/preferences/other/show.html.haml | 6 +++--- app/views/statuses_cleanup/show.html.haml | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index ce214bfa51..f13be210b7 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,13 +1,13 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-07-13 11:24:52 -0400 using Haml-Lint version 0.48.0. +# on 2023-07-17 08:54:02 -0400 using Haml-Lint version 0.48.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. linters: - # Offense count: 93 + # Offense count: 71 RuboCop: enabled: false diff --git a/app/views/admin/domain_blocks/edit.html.haml b/app/views/admin/domain_blocks/edit.html.haml index 39c6d108a7..66bc0e241a 100644 --- a/app/views/admin/domain_blocks/edit.html.haml +++ b/app/views/admin/domain_blocks/edit.html.haml @@ -12,7 +12,7 @@ = f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), hint: t('admin.domain_blocks.new.hint'), required: true, readonly: true, disabled: true .fields-row__column.fields-row__column-6.fields-group - = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t("admin.domain_blocks.new.severity.#{type}") }, hint: t('admin.domain_blocks.new.severity.desc_html') + = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: ->(type) { t("admin.domain_blocks.new.severity.#{type}") }, hint: t('admin.domain_blocks.new.severity.desc_html') .fields-group = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint') diff --git a/app/views/admin/domain_blocks/new.html.haml b/app/views/admin/domain_blocks/new.html.haml index bcaa331b56..5c28508cfa 100644 --- a/app/views/admin/domain_blocks/new.html.haml +++ b/app/views/admin/domain_blocks/new.html.haml @@ -12,7 +12,7 @@ = f.input :domain, wrapper: :with_label, label: t('admin.domain_blocks.domain'), hint: t('.hint'), required: true .fields-row__column.fields-row__column-6.fields-group - = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| t(".severity.#{type}") }, hint: t('.severity.desc_html') + = f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: ->(type) { t(".severity.#{type}") }, hint: t('.severity.desc_html') .fields-group = f.input :reject_media, as: :boolean, wrapper: :with_label, label: I18n.t('admin.domain_blocks.reject_media'), hint: I18n.t('admin.domain_blocks.reject_media_hint') diff --git a/app/views/admin/ip_blocks/new.html.haml b/app/views/admin/ip_blocks/new.html.haml index 69f6b98b9b..405c73c90e 100644 --- a/app/views/admin/ip_blocks/new.html.haml +++ b/app/views/admin/ip_blocks/new.html.haml @@ -8,10 +8,10 @@ = f.input :ip, as: :string, wrapper: :with_block_label, input_html: { placeholder: '192.0.2.0/24' } .fields-group - = f.input :expires_in, wrapper: :with_block_label, collection: [1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years].map(&:to_i), label_method: lambda { |i| I18n.t("admin.ip_blocks.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt') + = f.input :expires_in, wrapper: :with_block_label, collection: [1.day, 2.weeks, 1.month, 6.months, 1.year, 3.years].map(&:to_i), label_method: ->(i) { I18n.t("admin.ip_blocks.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt') .fields-group - = f.input :severity, as: :radio_buttons, collection: IpBlock.severities.keys, include_blank: false, wrapper: :with_block_label, label_method: lambda { |severity| safe_join([I18n.t("simple_form.labels.ip_block.severities.#{severity}"), content_tag(:span, I18n.t("simple_form.hints.ip_block.severities.#{severity}"), class: 'hint')]) } + = f.input :severity, as: :radio_buttons, collection: IpBlock.severities.keys, include_blank: false, wrapper: :with_block_label, label_method: ->(severity) { safe_join([I18n.t("simple_form.labels.ip_block.severities.#{severity}"), content_tag(:span, I18n.t("simple_form.hints.ip_block.severities.#{severity}"), class: 'hint')]) } .fields-group = f.input :comment, as: :string, wrapper: :with_block_label diff --git a/app/views/admin/roles/_form.html.haml b/app/views/admin/roles/_form.html.haml index 31f78f2405..3cbec0d0b5 100644 --- a/app/views/admin/roles/_form.html.haml +++ b/app/views/admin/roles/_form.html.haml @@ -32,7 +32,7 @@ - (@role.everyone? ? UserRole::Flags::CATEGORIES.slice(:invites) : UserRole::Flags::CATEGORIES).each do |category, permissions| %h4= t(category, scope: 'admin.roles.categories') - = f.input :permissions_as_keys, collection: permissions, wrapper: :with_block_label, include_blank: false, label_method: lambda { |privilege| safe_join([t("admin.roles.privileges.#{privilege}"), content_tag(:span, t("admin.roles.privileges.#{privilege}_description"), class: 'hint')]) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label: false, hint: false, disabled: permissions.filter { |privilege| UserRole::FLAGS[privilege] & current_user.role.computed_permissions == 0 } + = f.input :permissions_as_keys, collection: permissions, wrapper: :with_block_label, include_blank: false, label_method: ->(privilege) { safe_join([t("admin.roles.privileges.#{privilege}"), content_tag(:span, t("admin.roles.privileges.#{privilege}_description"), class: 'hint')]) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label: false, hint: false, disabled: permissions.filter { |privilege| UserRole::FLAGS[privilege] & current_user.role.computed_permissions == 0 } %hr.spacer/ diff --git a/app/views/admin/settings/about/show.html.haml b/app/views/admin/settings/about/show.html.haml index 2aaa64abe7..7b1b907ee2 100644 --- a/app/views/admin/settings/about/show.html.haml +++ b/app/views/admin/settings/about/show.html.haml @@ -22,9 +22,9 @@ .fields-row .fields-row__column.fields-row__column-6.fields-group - = f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + = f.input :show_domain_blocks, wrapper: :with_label, collection: %i(disabled users all), label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' .fields-row__column.fields-row__column-6.fields-group - = f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label_method: lambda { |value| t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + = f.input :show_domain_blocks_rationale, wrapper: :with_label, collection: %i(disabled users all), label_method: ->(value) { t("admin.settings.domain_blocks.#{value}") }, include_blank: false, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' .fields-group = f.input :status_page_url, wrapper: :with_block_label, input_html: { placeholder: "https://status.#{Rails.configuration.x.local_domain}" } diff --git a/app/views/admin/settings/appearance/show.html.haml b/app/views/admin/settings/appearance/show.html.haml index d321c4b04b..1e73ab0a24 100644 --- a/app/views/admin/settings/appearance/show.html.haml +++ b/app/views/admin/settings/appearance/show.html.haml @@ -14,7 +14,7 @@ %p.lead= t('admin.settings.appearance.preamble') .fields-group - = f.input :theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false + = f.input :theme, collection: Themes.instance.names, label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, include_blank: false .fields-group = f.input :custom_css, wrapper: :with_block_label, as: :text, input_html: { rows: 8 } diff --git a/app/views/admin/settings/registrations/show.html.haml b/app/views/admin/settings/registrations/show.html.haml index 84492a08a1..e06385bc81 100644 --- a/app/views/admin/settings/registrations/show.html.haml +++ b/app/views/admin/settings/registrations/show.html.haml @@ -15,7 +15,7 @@ .fields-row .fields-row__column.fields-row__column-6.fields-group - = f.input :registrations_mode, collection: %w(open approved none), wrapper: :with_label, include_blank: false, label_method: lambda { |mode| I18n.t("admin.settings.registrations_mode.modes.#{mode}") } + = f.input :registrations_mode, collection: %w(open approved none), wrapper: :with_label, include_blank: false, label_method: ->(mode) { I18n.t("admin.settings.registrations_mode.modes.#{mode}") } .fields-row__column.fields-row__column-6.fields-group = f.input :require_invite_text, as: :boolean, wrapper: :with_label, disabled: !approved_registrations? diff --git a/app/views/filters/_filter_fields.html.haml b/app/views/filters/_filter_fields.html.haml index a554b55ff6..0690e8dd59 100644 --- a/app/views/filters/_filter_fields.html.haml +++ b/app/views/filters/_filter_fields.html.haml @@ -2,10 +2,10 @@ .fields-row__column.fields-row__column-6.fields-group = f.input :title, as: :string, wrapper: :with_label, hint: false .fields-row__column.fields-row__column-6.fields-group - = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, include_blank: I18n.t('invites.expires_in_prompt') + = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, include_blank: I18n.t('invites.expires_in_prompt') .fields-group - = f.input :context, wrapper: :with_block_label, collection: CustomFilter::VALID_CONTEXTS, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label_method: lambda { |context| I18n.t("filters.contexts.#{context}") }, include_blank: false + = f.input :context, wrapper: :with_block_label, collection: CustomFilter::VALID_CONTEXTS, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', label_method: ->(context) { I18n.t("filters.contexts.#{context}") }, include_blank: false %hr.spacer/ diff --git a/app/views/invites/_form.html.haml b/app/views/invites/_form.html.haml index 3a2a5ef0e1..7ea521ebc7 100644 --- a/app/views/invites/_form.html.haml +++ b/app/views/invites/_form.html.haml @@ -3,9 +3,9 @@ .fields-row .fields-row__column.fields-row__column-6.fields-group - = f.input :max_uses, wrapper: :with_label, collection: [1, 5, 10, 25, 50, 100], label_method: lambda { |num| I18n.t('invites.max_uses', count: num) }, prompt: I18n.t('invites.max_uses_prompt') + = f.input :max_uses, wrapper: :with_label, collection: [1, 5, 10, 25, 50, 100], label_method: ->(num) { I18n.t('invites.max_uses', count: num) }, prompt: I18n.t('invites.max_uses_prompt') .fields-row__column.fields-row__column-6.fields-group - = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: lambda { |i| I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt') + = f.input :expires_in, wrapper: :with_label, collection: [30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week].map(&:to_i), label_method: ->(i) { I18n.t("invites.expires_in.#{i}") }, prompt: I18n.t('invites.expires_in_prompt') .fields-group = f.input :autofollow, wrapper: :with_label diff --git a/app/views/settings/applications/_fields.html.haml b/app/views/settings/applications/_fields.html.haml index ffd2491d29..f4deb5b6ff 100644 --- a/app/views/settings/applications/_fields.html.haml +++ b/app/views/settings/applications/_fields.html.haml @@ -15,4 +15,4 @@ %span.hint= t('simple_form.hints.defaults.scopes') - Doorkeeper.configuration.scopes.group_by { |s| s.split(':').first }.each do |k, v| - = f.input :scopes, label: false, hint: false, collection: v.sort, wrapper: :with_block_label, include_blank: false, label_method: lambda { |scope| safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + = f.input :scopes, label: false, hint: false, collection: v.sort, wrapper: :with_block_label, include_blank: false, label_method: ->(scope) { safe_join([content_tag(:samp, scope, class: class_for_scope(scope)), content_tag(:span, t("doorkeeper.scopes.#{scope}"), class: 'hint')]) }, selected: f.object.scopes.all, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index ce3a30c5ee..ec7a3d1401 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -7,13 +7,13 @@ = simple_form_for current_user, url: settings_preferences_appearance_path, html: { method: :put, id: 'edit_user' } do |f| .fields-row .fields-group.fields-row__column.fields-row__column-6 - = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: lambda { |locale| native_locale_name(locale) }, selected: I18n.locale, hint: false + = f.input :locale, collection: I18n.available_locales, wrapper: :with_label, include_blank: false, label_method: ->(locale) { native_locale_name(locale) }, selected: I18n.locale, hint: false .fields-group.fields-row__column.fields-row__column-6 = f.input :time_zone, wrapper: :with_label, collection: ActiveSupport::TimeZone.all.map { |tz| ["(GMT#{tz.formatted_offset}) #{tz.name}", tz.tzinfo.name] }, hint: false .fields-group = f.simple_fields_for :settings, current_user.settings do |ff| - = ff.input :theme, collection: Themes.instance.names, label_method: lambda { |theme| I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_theme'), include_blank: false, hint: false + = ff.input :theme, collection: Themes.instance.names, label_method: ->(theme) { I18n.t("themes.#{theme}", default: theme) }, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_theme'), include_blank: false, hint: false - unless I18n.locale == :en .flash-message.translation-prompt @@ -57,7 +57,7 @@ %h4= t 'appearance.sensitive_content' .fields-group - = ff.input :'web.display_media', collection: ['default', 'show_all', 'hide_all'],label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label, label: I18n.t('simple_form.labels.defaults.setting_display_media') + = ff.input :'web.display_media', collection: ['default', 'show_all', 'hide_all'], label_method: ->(item) { t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label, label: I18n.t('simple_form.labels.defaults.setting_display_media') .fields-group = ff.input :'web.use_blurhash', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_use_blurhash'), hint: I18n.t('simple_form.hints.defaults.setting_use_blurhash') diff --git a/app/views/settings/preferences/other/show.html.haml b/app/views/settings/preferences/other/show.html.haml index 6590ec7c21..b8beed394c 100644 --- a/app/views/settings/preferences/other/show.html.haml +++ b/app/views/settings/preferences/other/show.html.haml @@ -18,10 +18,10 @@ .fields-row .fields-group.fields-row__column.fields-row__column-6 - = ff.input :default_privacy, collection: Status.selectable_visibilities, wrapper: :with_label, include_blank: false, label_method: lambda { |visibility| safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') }, required: false, hint: false, label: I18n.t('simple_form.labels.defaults.setting_default_privacy') + = ff.input :default_privacy, collection: Status.selectable_visibilities, wrapper: :with_label, include_blank: false, label_method: ->(visibility) { safe_join([I18n.t("statuses.visibilities.#{visibility}"), I18n.t("statuses.visibilities.#{visibility}_long")], ' - ') }, required: false, hint: false, label: I18n.t('simple_form.labels.defaults.setting_default_privacy') .fields-group.fields-row__column.fields-row__column-6 - = ff.input :default_language, collection: [nil] + filterable_languages, wrapper: :with_label, label_method: lambda { |locale| locale.nil? ? I18n.t('statuses.default_language') : native_locale_name(locale) }, required: false, include_blank: false, hint: false, label: I18n.t('simple_form.labels.defaults.setting_default_language') + = ff.input :default_language, collection: [nil] + filterable_languages, wrapper: :with_label, label_method: ->(locale) { locale.nil? ? I18n.t('statuses.default_language') : native_locale_name(locale) }, required: false, include_blank: false, hint: false, label: I18n.t('simple_form.labels.defaults.setting_default_language') .fields-group = ff.input :default_sensitive, wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_default_sensitive'), hint: I18n.t('simple_form.hints.defaults.setting_default_sensitive') @@ -32,7 +32,7 @@ %h4= t 'preferences.public_timelines' .fields-group - = f.input :chosen_languages, collection: filterable_languages, wrapper: :with_block_label, include_blank: false, label_method: lambda { |locale| native_locale_name(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' + = f.input :chosen_languages, collection: filterable_languages, wrapper: :with_block_label, include_blank: false, label_method: ->(locale) { native_locale_name(locale) }, required: false, as: :check_boxes, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li' .actions = f.button :button, t('generic.save_changes'), type: :submit diff --git a/app/views/statuses_cleanup/show.html.haml b/app/views/statuses_cleanup/show.html.haml index 59de4b5aa6..99b9ddab93 100644 --- a/app/views/statuses_cleanup/show.html.haml +++ b/app/views/statuses_cleanup/show.html.haml @@ -10,7 +10,7 @@ .fields-row__column.fields-row__column-6.fields-group = f.input :enabled, as: :boolean, wrapper: :with_label, label: t('statuses_cleanup.enabled'), hint: t('statuses_cleanup.enabled_hint') .fields-row__column.fields-row__column-6.fields-group - = f.input :min_status_age, wrapper: :with_label, label: t('statuses_cleanup.min_age_label'), collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i), label_method: lambda { |i| t("statuses_cleanup.min_age.#{i}") }, include_blank: false, hint: false + = f.input :min_status_age, wrapper: :with_label, label: t('statuses_cleanup.min_age_label'), collection: AccountStatusesCleanupPolicy::ALLOWED_MIN_STATUS_AGE.map(&:to_i), label_method: ->(i) { t("statuses_cleanup.min_age.#{i}") }, include_blank: false, hint: false .flash-message= t('statuses_cleanup.explanation') From bd33efdf1624d484c82bb328a56df1f1ab8a878a Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 17 Jul 2023 09:38:04 -0400 Subject: [PATCH 18/90] Fix haml-lint Rubocop `Style/MinMaxComparison` cop (#25974) --- .haml-lint_todo.yml | 6 +++--- app/views/statuses/_poll.html.haml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index f13be210b7..e1314742a6 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,17 +1,17 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-07-17 08:54:02 -0400 using Haml-Lint version 0.48.0. +# on 2023-07-17 09:15:24 -0400 using Haml-Lint version 0.48.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. linters: - # Offense count: 71 + # Offense count: 70 RuboCop: enabled: false - # Offense count: 960 + # Offense count: 959 LineLength: enabled: false diff --git a/app/views/statuses/_poll.html.haml b/app/views/statuses/_poll.html.haml index 248c6058cb..0805c48958 100644 --- a/app/views/statuses/_poll.html.haml +++ b/app/views/statuses/_poll.html.haml @@ -17,7 +17,7 @@ %span.poll__voted %i.poll__voted__mark.fa.fa-check - %progress{ max: 100, value: percent < 1 ? 1 : percent, 'aria-hidden': 'true' } + %progress{ max: 100, value: [percent, 1].max, 'aria-hidden': 'true' } %span.poll__chart - else %label.poll__option>< From 664b0ca8cb10383c4c64964f830c41ddef4acb27 Mon Sep 17 00:00:00 2001 From: Jeong Arm Date: Mon, 17 Jul 2023 22:51:30 +0900 Subject: [PATCH 19/90] Check if json body is null on Activitipub::ProcessingWorker (#26021) --- app/services/activitypub/process_collection_service.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/services/activitypub/process_collection_service.rb b/app/services/activitypub/process_collection_service.rb index 52f48bd49d..4f049a5ae9 100644 --- a/app/services/activitypub/process_collection_service.rb +++ b/app/services/activitypub/process_collection_service.rb @@ -8,6 +8,8 @@ class ActivityPub::ProcessCollectionService < BaseService @json = original_json = Oj.load(body, mode: :strict) @options = options + return unless @json.is_a?(Hash) + begin @json = compact(@json) if @json['signature'].is_a?(Hash) rescue JSON::LD::JsonLdError => e From c80ecf2ff776ba14df0bff5e72e36da621cefc2b Mon Sep 17 00:00:00 2001 From: Nick Schonning Date: Mon, 17 Jul 2023 10:10:43 -0400 Subject: [PATCH 20/90] Increase PR Rebase job retries (#25926) --- .github/workflows/rebase-needed.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rebase-needed.yml b/.github/workflows/rebase-needed.yml index 295039c414..06d835c090 100644 --- a/.github/workflows/rebase-needed.yml +++ b/.github/workflows/rebase-needed.yml @@ -23,5 +23,5 @@ jobs: repoToken: '${{ secrets.GITHUB_TOKEN }}' commentOnClean: This pull request has resolved merge conflicts and is ready for review. commentOnDirty: This pull request has merge conflicts that must be resolved before it can be merged. - retryMax: 10 + retryMax: 30 continueOnMissingPermissions: false From 8a1aabaac1f22684bd80512f734636ec5d8a3642 Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:20:11 -0300 Subject: [PATCH 21/90] Migrate to request specs in `/api/v1/timelines/home` (#25743) --- .../api/v1/timelines/home_controller_spec.rb | 44 -------- spec/requests/api/v1/timelines/home_spec.rb | 101 ++++++++++++++++++ 2 files changed, 101 insertions(+), 44 deletions(-) delete mode 100644 spec/controllers/api/v1/timelines/home_controller_spec.rb create mode 100644 spec/requests/api/v1/timelines/home_spec.rb diff --git a/spec/controllers/api/v1/timelines/home_controller_spec.rb b/spec/controllers/api/v1/timelines/home_controller_spec.rb deleted file mode 100644 index bb46d0aba4..0000000000 --- a/spec/controllers/api/v1/timelines/home_controller_spec.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Api::V1::Timelines::HomeController do - render_views - - let(:user) { Fabricate(:user, current_sign_in_at: 1.day.ago) } - - before do - allow(controller).to receive(:doorkeeper_token) { token } - end - - context 'with a user context' do - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'read:statuses') } - - describe 'GET #show' do - before do - follow = Fabricate(:follow, account: user.account) - PostStatusService.new.call(follow.target_account, text: 'New status for user home timeline.') - end - - it 'returns http success' do - get :show - - expect(response).to have_http_status(200) - expect(response.headers['Link'].links.size).to eq(2) - end - end - end - - context 'without a user context' do - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil, scopes: 'read') } - - describe 'GET #show' do - it 'returns http unprocessable entity' do - get :show - - expect(response).to have_http_status(422) - expect(response.headers['Link']).to be_nil - end - end - end -end diff --git a/spec/requests/api/v1/timelines/home_spec.rb b/spec/requests/api/v1/timelines/home_spec.rb new file mode 100644 index 0000000000..5834b90955 --- /dev/null +++ b/spec/requests/api/v1/timelines/home_spec.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'Home' do + let(:user) { Fabricate(:user) } + let(:scopes) { 'read:statuses' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'GET /api/v1/timelines/home' do + subject do + get '/api/v1/timelines/home', headers: headers, params: params + end + + let(:params) { {} } + + it_behaves_like 'forbidden for wrong scope', 'write write:statuses' + + context 'when the timeline is available' do + let(:home_statuses) { bob.statuses + ana.statuses } + let!(:bob) { Fabricate(:account) } + let!(:tim) { Fabricate(:account) } + let!(:ana) { Fabricate(:account) } + + before do + user.account.follow!(bob) + user.account.follow!(ana) + PostStatusService.new.call(bob, text: 'New toot from bob.') + PostStatusService.new.call(tim, text: 'New toot from tim.') + PostStatusService.new.call(ana, text: 'New toot from ana.') + end + + it 'returns http success' do + subject + + expect(response).to have_http_status(200) + end + + it 'returns the statuses of followed users' do + subject + + expect(body_as_json.pluck(:id)).to match_array(home_statuses.map { |status| status.id.to_s }) + end + + context 'with limit param' do + let(:params) { { limit: 1 } } + + it 'returns only the requested number of statuses' do + subject + + expect(body_as_json.size).to eq(params[:limit]) + end + + it 'sets the correct pagination headers', :aggregate_failures do + subject + + headers = response.headers['Link'] + + expect(headers.find_link(%w(rel prev)).href).to eq(api_v1_timelines_home_url(limit: 1, min_id: ana.statuses.first.id.to_s)) + expect(headers.find_link(%w(rel next)).href).to eq(api_v1_timelines_home_url(limit: 1, max_id: ana.statuses.first.id.to_s)) + end + end + end + + context 'when the timeline is regenerating' do + let(:timeline) { instance_double(HomeFeed, regenerating?: true, get: []) } + + before do + allow(HomeFeed).to receive(:new).and_return(timeline) + end + + it 'returns http partial content' do + subject + + expect(response).to have_http_status(206) + end + end + + context 'without an authorization header' do + let(:headers) { {} } + + it 'returns http unauthorized' do + subject + + expect(response).to have_http_status(401) + end + end + + context 'without a user context' do + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: nil, scopes: scopes) } + + it 'returns http unprocessable entity', :aggregate_failures do + subject + + expect(response).to have_http_status(422) + expect(response.headers['Link']).to be_nil + end + end + end +end From 6cdc8408a9ac9d0fd157d18b1ff173c8f416cb8d Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:22:33 -0300 Subject: [PATCH 22/90] Migrate to request specs in `/api/v1/emails/confirmations` (#25686) --- .../api/v1/emails/confirmations_spec.rb} | 124 +++++++++++------- 1 file changed, 75 insertions(+), 49 deletions(-) rename spec/{controllers/api/v1/emails/confirmations_controller_spec.rb => requests/api/v1/emails/confirmations_spec.rb} (50%) diff --git a/spec/controllers/api/v1/emails/confirmations_controller_spec.rb b/spec/requests/api/v1/emails/confirmations_spec.rb similarity index 50% rename from spec/controllers/api/v1/emails/confirmations_controller_spec.rb rename to spec/requests/api/v1/emails/confirmations_spec.rb index 80d6c8799d..8f5171ee78 100644 --- a/spec/controllers/api/v1/emails/confirmations_controller_spec.rb +++ b/spec/requests/api/v1/emails/confirmations_spec.rb @@ -2,27 +2,34 @@ require 'rails_helper' -RSpec.describe Api::V1::Emails::ConfirmationsController do +RSpec.describe 'Confirmations' do let(:confirmed_at) { nil } let(:user) { Fabricate(:user, confirmed_at: confirmed_at) } - let(:app) { Fabricate(:application) } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes, application: app) } - let(:scopes) { 'write' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:scopes) { 'read:accounts write:accounts' } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'POST /api/v1/emails/confirmations' do + subject do + post '/api/v1/emails/confirmations', headers: headers, params: params + end + + let(:params) { {} } + + it_behaves_like 'forbidden for wrong scope', 'read read:accounts' - describe '#create' do context 'with an oauth token' do - before do - allow(controller).to receive(:doorkeeper_token) { token } - end + context 'when user was created by a different application' do + let(:user) { Fabricate(:user, confirmed_at: confirmed_at, created_by_application: Fabricate(:application)) } - context 'when from a random app' do it 'returns http forbidden' do - post :create + subject + expect(response).to have_http_status(403) end end - context 'when from an app that created the account' do + context 'when user was created by the same application' do before do user.update(created_by_application: token.application) end @@ -31,55 +38,79 @@ RSpec.describe Api::V1::Emails::ConfirmationsController do let(:confirmed_at) { Time.now.utc } it 'returns http forbidden' do - post :create + subject + expect(response).to have_http_status(403) end - context 'with user changed e-mail and has not confirmed it' do + context 'when user changed e-mail and has not confirmed it' do before do user.update(email: 'foo@bar.com') end it 'returns http success' do - post :create - expect(response).to have_http_status(:success) + subject + + expect(response).to have_http_status(200) end end end context 'when the account is unconfirmed' do it 'returns http success' do - post :create - expect(response).to have_http_status(:success) + subject + + expect(response).to have_http_status(200) + end + end + + context 'with email param' do + let(:params) { { email: 'foo@bar.com' } } + + it "updates the user's e-mail address", :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.reload.unconfirmed_email).to eq('foo@bar.com') + end + end + + context 'with invalid email param' do + let(:params) { { email: 'invalid' } } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) end end end end context 'without an oauth token' do + let(:headers) { {} } + it 'returns http unauthorized' do - post :create + subject + expect(response).to have_http_status(401) end end end - describe '#check' do - let(:scopes) { 'read' } + describe 'GET /api/v1/emails/check_confirmation' do + subject do + get '/api/v1/emails/check_confirmation', headers: headers + end + + it_behaves_like 'forbidden for wrong scope', 'write' context 'with an oauth token' do - before do - allow(controller).to receive(:doorkeeper_token) { token } - end - context 'when the account is not confirmed' do - it 'returns http success' do - get :check - expect(response).to have_http_status(200) - end + it 'returns the confirmation status successfully', :aggregate_failures do + subject - it 'returns false' do - get :check + expect(response).to have_http_status(200) expect(body_as_json).to be false end end @@ -87,31 +118,27 @@ RSpec.describe Api::V1::Emails::ConfirmationsController do context 'when the account is confirmed' do let(:confirmed_at) { Time.now.utc } - it 'returns http success' do - get :check - expect(response).to have_http_status(200) - end + it 'returns the confirmation status successfully', :aggregate_failures do + subject - it 'returns true' do - get :check + expect(response).to have_http_status(200) expect(body_as_json).to be true end end end context 'with an authentication cookie' do + let(:headers) { {} } + before do sign_in user, scope: :user end context 'when the account is not confirmed' do - it 'returns http success' do - get :check - expect(response).to have_http_status(200) - end + it 'returns the confirmation status successfully', :aggregate_failures do + subject - it 'returns false' do - get :check + expect(response).to have_http_status(200) expect(body_as_json).to be false end end @@ -119,21 +146,20 @@ RSpec.describe Api::V1::Emails::ConfirmationsController do context 'when the account is confirmed' do let(:confirmed_at) { Time.now.utc } - it 'returns http success' do - get :check - expect(response).to have_http_status(200) - end + it 'returns the confirmation status successfully', :aggregate_failures do + subject - it 'returns true' do - get :check + expect(response).to have_http_status(200) expect(body_as_json).to be true end end end context 'without an oauth token and an authentication cookie' do + let(:headers) { {} } + it 'returns http unauthorized' do - get :check + subject expect(response).to have_http_status(401) end From 1aea938d3d43207b82ac59e0c0f982583875c5ea Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:24:05 -0300 Subject: [PATCH 23/90] Migrate to request specs in `/api/v1/statuses/:status_id/pin` (#25635) --- .../api/v1/statuses/pins_controller_spec.rb | 57 -------- spec/requests/api/v1/statuses/pins_spec.rb | 131 ++++++++++++++++++ 2 files changed, 131 insertions(+), 57 deletions(-) delete mode 100644 spec/controllers/api/v1/statuses/pins_controller_spec.rb create mode 100644 spec/requests/api/v1/statuses/pins_spec.rb diff --git a/spec/controllers/api/v1/statuses/pins_controller_spec.rb b/spec/controllers/api/v1/statuses/pins_controller_spec.rb deleted file mode 100644 index 8bdaf8b548..0000000000 --- a/spec/controllers/api/v1/statuses/pins_controller_spec.rb +++ /dev/null @@ -1,57 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Api::V1::Statuses::PinsController do - render_views - - let(:user) { Fabricate(:user) } - let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write:accounts', application: app) } - - context 'with an oauth token' do - before do - allow(controller).to receive(:doorkeeper_token) { token } - end - - describe 'POST #create' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - post :create, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the pinned attribute' do - expect(user.account.pinned?(status)).to be true - end - - it 'return json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:pinned]).to be true - end - end - - describe 'POST #destroy' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - Fabricate(:status_pin, status: status, account: user.account) - post :destroy, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the pinned attribute' do - expect(user.account.pinned?(status)).to be false - end - end - end -end diff --git a/spec/requests/api/v1/statuses/pins_spec.rb b/spec/requests/api/v1/statuses/pins_spec.rb new file mode 100644 index 0000000000..db07fa424f --- /dev/null +++ b/spec/requests/api/v1/statuses/pins_spec.rb @@ -0,0 +1,131 @@ +# frozen_string_literal: true + +require 'rails_helper' + +describe 'Pins' do + let(:user) { Fabricate(:user) } + let(:scopes) { 'write:accounts' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'POST /api/v1/statuses/:status_id/pin' do + subject do + post "/api/v1/statuses/#{status.id}/pin", headers: headers + end + + let(:status) { Fabricate(:status, account: user.account) } + + it_behaves_like 'forbidden for wrong scope', 'read read:accounts' + + context 'when the status is public' do + it 'pins the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.pinned?(status)).to be true + end + + it 'return json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, pinned: true) + ) + end + end + + context 'when the status is private' do + let(:status) { Fabricate(:status, account: user.account, visibility: :private) } + + it 'pins the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.pinned?(status)).to be true + end + end + + context 'when the status belongs to somebody else' do + let(:status) { Fabricate(:status) } + + it 'returns http unprocessable entity' do + subject + + expect(response).to have_http_status(422) + end + end + + context 'when the status does not exist' do + it 'returns http not found' do + post '/api/v1/statuses/-1/pin', headers: headers + + expect(response).to have_http_status(404) + end + end + + context 'without an authorization header' do + let(:headers) { {} } + + it 'returns http unauthorized' do + subject + + expect(response).to have_http_status(401) + end + end + end + + describe 'POST /api/v1/statuses/:status_id/unpin' do + subject do + post "/api/v1/statuses/#{status.id}/unpin", headers: headers + end + + let(:status) { Fabricate(:status, account: user.account) } + + context 'when the status is pinned' do + before do + Fabricate(:status_pin, status: status, account: user.account) + end + + it 'unpins the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.pinned?(status)).to be false + end + + it 'return json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, pinned: false) + ) + end + end + + context 'when the status is not pinned' do + it 'returns http success' do + subject + + expect(response).to have_http_status(200) + end + end + + context 'when the status does not exist' do + it 'returns http not found' do + post '/api/v1/statuses/-1/unpin', headers: headers + + expect(response).to have_http_status(404) + end + end + + context 'without an authorization header' do + let(:headers) { {} } + + it 'returns http unauthorized' do + subject + + expect(response).to have_http_status(401) + end + end + end +end From 4859958a0c1b405bb7a16646430d044e82f5e923 Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:50:00 -0300 Subject: [PATCH 24/90] Migrate to request specs in `/api/v1/polls` (#25596) --- .../api/v1/polls_controller_spec.rb | 37 --------------- spec/requests/api/v1/polls_spec.rb | 47 +++++++++++++++++++ 2 files changed, 47 insertions(+), 37 deletions(-) delete mode 100644 spec/controllers/api/v1/polls_controller_spec.rb create mode 100644 spec/requests/api/v1/polls_spec.rb diff --git a/spec/controllers/api/v1/polls_controller_spec.rb b/spec/controllers/api/v1/polls_controller_spec.rb deleted file mode 100644 index 3aae5496db..0000000000 --- a/spec/controllers/api/v1/polls_controller_spec.rb +++ /dev/null @@ -1,37 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe Api::V1::PollsController do - render_views - - let(:user) { Fabricate(:user) } - let(:scopes) { 'read:statuses' } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } - - before { allow(controller).to receive(:doorkeeper_token) { token } } - - describe 'GET #show' do - let(:poll) { Fabricate(:poll, status: Fabricate(:status, visibility: visibility)) } - - before do - get :show, params: { id: poll.id } - end - - context 'when parent status is public' do - let(:visibility) { 'public' } - - it 'returns http success' do - expect(response).to have_http_status(200) - end - end - - context 'when parent status is private' do - let(:visibility) { 'private' } - - it 'returns http not found' do - expect(response).to have_http_status(404) - end - end - end -end diff --git a/spec/requests/api/v1/polls_spec.rb b/spec/requests/api/v1/polls_spec.rb new file mode 100644 index 0000000000..1c8a818d59 --- /dev/null +++ b/spec/requests/api/v1/polls_spec.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'Polls' do + let(:user) { Fabricate(:user) } + let(:scopes) { 'read:statuses' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'GET /api/v1/polls/:id' do + subject do + get "/api/v1/polls/#{poll.id}", headers: headers + end + + let(:poll) { Fabricate(:poll, status: Fabricate(:status, visibility: visibility)) } + let(:visibility) { 'public' } + + it_behaves_like 'forbidden for wrong scope', 'write write:statuses' + + context 'when parent status is public' do + it 'returns the poll data successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(body_as_json).to match( + a_hash_including( + id: poll.id.to_s, + voted: false, + voters_count: poll.voters_count, + votes_count: poll.votes_count + ) + ) + end + end + + context 'when parent status is private' do + let(:visibility) { 'private' } + + it 'returns http not found' do + subject + + expect(response).to have_http_status(404) + end + end + end +end From 6fb4a756ffa97197c47859f09acb5ff29ef0175a Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:51:49 -0300 Subject: [PATCH 25/90] Migrate to request specs in `/api/v1/statuses/:status_id/bookmark` (#25624) --- .../v1/statuses/bookmarks_controller_spec.rb | 113 ------------- .../api/v1/statuses/bookmarks_spec.rb | 155 ++++++++++++++++++ 2 files changed, 155 insertions(+), 113 deletions(-) delete mode 100644 spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb create mode 100644 spec/requests/api/v1/statuses/bookmarks_spec.rb diff --git a/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb b/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb deleted file mode 100644 index 46d7b6c0a5..0000000000 --- a/spec/controllers/api/v1/statuses/bookmarks_controller_spec.rb +++ /dev/null @@ -1,113 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Api::V1::Statuses::BookmarksController do - render_views - - let(:user) { Fabricate(:user) } - let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write:bookmarks', application: app) } - - context 'with an oauth token' do - before do - allow(controller).to receive(:doorkeeper_token) { token } - end - - describe 'POST #create' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - post :create, params: { status_id: status.id } - end - - context 'with public status' do - it 'returns http success' do - expect(response).to have_http_status(:success) - end - - it 'updates the bookmarked attribute' do - expect(user.account.bookmarked?(status)).to be true - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:bookmarked]).to be true - end - end - - context 'with private status of not-followed account' do - let(:status) { Fabricate(:status, visibility: :private) } - - it 'returns http not found' do - expect(response).to have_http_status(404) - end - end - end - - describe 'POST #destroy' do - context 'with public status' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - Bookmark.find_or_create_by!(account: user.account, status: status) - post :destroy, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(:success) - end - - it 'updates the bookmarked attribute' do - expect(user.account.bookmarked?(status)).to be false - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:bookmarked]).to be false - end - end - - context 'with public status when blocked by its author' do - let(:status) { Fabricate(:status) } - - before do - Bookmark.find_or_create_by!(account: user.account, status: status) - status.account.block!(user.account) - post :destroy, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the bookmarked attribute' do - expect(user.account.bookmarked?(status)).to be false - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:bookmarked]).to be false - end - end - - context 'with private status that was not bookmarked' do - let(:status) { Fabricate(:status, visibility: :private) } - - before do - post :destroy, params: { status_id: status.id } - end - - it 'returns http not found' do - expect(response).to have_http_status(404) - end - end - end - end -end diff --git a/spec/requests/api/v1/statuses/bookmarks_spec.rb b/spec/requests/api/v1/statuses/bookmarks_spec.rb new file mode 100644 index 0000000000..d3007740a5 --- /dev/null +++ b/spec/requests/api/v1/statuses/bookmarks_spec.rb @@ -0,0 +1,155 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'Bookmarks' do + let(:user) { Fabricate(:user) } + let(:scopes) { 'write:bookmarks' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'POST /api/v1/statuses/:status_id/bookmark' do + subject do + post "/api/v1/statuses/#{status.id}/bookmark", headers: headers + end + + let(:status) { Fabricate(:status) } + + it_behaves_like 'forbidden for wrong scope', 'read' + + context 'with public status' do + it 'bookmarks the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.bookmarked?(status)).to be true + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, bookmarked: true) + ) + end + end + + context 'with private status of not-followed account' do + let(:status) { Fabricate(:status, visibility: :private) } + + it 'returns http not found' do + subject + + expect(response).to have_http_status(404) + end + end + + context 'with private status of followed account' do + let(:status) { Fabricate(:status, visibility: :private) } + + before do + user.account.follow!(status.account) + end + + it 'bookmarks the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.bookmarked?(status)).to be true + end + end + + context 'when the status does not exist' do + it 'returns http not found' do + post '/api/v1/statuses/-1/bookmark', headers: headers + + expect(response).to have_http_status(404) + end + end + + context 'without an authorization header' do + let(:headers) { {} } + + it 'returns http unauthorized' do + subject + + expect(response).to have_http_status(401) + end + end + end + + describe 'POST /api/v1/statuses/:status_id/unbookmark' do + subject do + post "/api/v1/statuses/#{status.id}/unbookmark", headers: headers + end + + let(:status) { Fabricate(:status) } + + it_behaves_like 'forbidden for wrong scope', 'read' + + context 'with public status' do + context 'when the status was previously bookmarked' do + before do + Bookmark.find_or_create_by!(account: user.account, status: status) + end + + it 'unbookmarks the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.bookmarked?(status)).to be false + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, bookmarked: false) + ) + end + end + + context 'when the requesting user was blocked by the status author' do + let(:status) { Fabricate(:status) } + + before do + Bookmark.find_or_create_by!(account: user.account, status: status) + status.account.block!(user.account) + end + + it 'unbookmarks the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.bookmarked?(status)).to be false + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, bookmarked: false) + ) + end + end + + context 'when the status is not bookmarked' do + it 'returns http success' do + subject + + expect(response).to have_http_status(200) + end + end + end + + context 'with private status that was not bookmarked' do + let(:status) { Fabricate(:status, visibility: :private) } + + it 'returns http not found' do + subject + + expect(response).to have_http_status(404) + end + end + end +end From 19208aa4226cf257aedc20dfae5971f1076b1f24 Mon Sep 17 00:00:00 2001 From: Daniel M Brasil Date: Mon, 17 Jul 2023 11:53:57 -0300 Subject: [PATCH 26/90] Migrate to request specs in `/api/v1/statuses/:status_id/favourite` (#25626) --- .../v1/statuses/favourites_controller_spec.rb | 123 --------------- .../api/v1/statuses/favourites_spec.rb | 143 ++++++++++++++++++ 2 files changed, 143 insertions(+), 123 deletions(-) delete mode 100644 spec/controllers/api/v1/statuses/favourites_controller_spec.rb create mode 100644 spec/requests/api/v1/statuses/favourites_spec.rb diff --git a/spec/controllers/api/v1/statuses/favourites_controller_spec.rb b/spec/controllers/api/v1/statuses/favourites_controller_spec.rb deleted file mode 100644 index 609957e3ef..0000000000 --- a/spec/controllers/api/v1/statuses/favourites_controller_spec.rb +++ /dev/null @@ -1,123 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -describe Api::V1::Statuses::FavouritesController do - render_views - - let(:user) { Fabricate(:user) } - let(:app) { Fabricate(:application, name: 'Test app', website: 'http://testapp.com') } - let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: 'write:favourites', application: app) } - - context 'with an oauth token' do - before do - allow(controller).to receive(:doorkeeper_token) { token } - end - - describe 'POST #create' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - post :create, params: { status_id: status.id } - end - - context 'with public status' do - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the favourites count' do - expect(status.favourites.count).to eq 1 - end - - it 'updates the favourited attribute' do - expect(user.account.favourited?(status)).to be true - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:favourites_count]).to eq 1 - expect(hash_body[:favourited]).to be true - end - end - - context 'with private status of not-followed account' do - let(:status) { Fabricate(:status, visibility: :private) } - - it 'returns http not found' do - expect(response).to have_http_status(404) - end - end - end - - describe 'POST #destroy' do - context 'with public status' do - let(:status) { Fabricate(:status, account: user.account) } - - before do - FavouriteService.new.call(user.account, status) - post :destroy, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the favourites count' do - expect(status.favourites.count).to eq 0 - end - - it 'updates the favourited attribute' do - expect(user.account.favourited?(status)).to be false - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:favourites_count]).to eq 0 - expect(hash_body[:favourited]).to be false - end - end - - context 'with public status when blocked by its author' do - let(:status) { Fabricate(:status) } - - before do - FavouriteService.new.call(user.account, status) - status.account.block!(user.account) - post :destroy, params: { status_id: status.id } - end - - it 'returns http success' do - expect(response).to have_http_status(200) - end - - it 'updates the favourite attribute' do - expect(user.account.favourited?(status)).to be false - end - - it 'returns json with updated attributes' do - hash_body = body_as_json - - expect(hash_body[:id]).to eq status.id.to_s - expect(hash_body[:favourited]).to be false - end - end - - context 'with private status that was not favourited' do - let(:status) { Fabricate(:status, visibility: :private) } - - before do - post :destroy, params: { status_id: status.id } - end - - it 'returns http not found' do - expect(response).to have_http_status(404) - end - end - end - end -end diff --git a/spec/requests/api/v1/statuses/favourites_spec.rb b/spec/requests/api/v1/statuses/favourites_spec.rb new file mode 100644 index 0000000000..021b8806ed --- /dev/null +++ b/spec/requests/api/v1/statuses/favourites_spec.rb @@ -0,0 +1,143 @@ +# frozen_string_literal: true + +require 'rails_helper' + +RSpec.describe 'Favourites' do + let(:user) { Fabricate(:user) } + let(:scopes) { 'write:favourites' } + let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) } + let(:headers) { { 'Authorization' => "Bearer #{token.token}" } } + + describe 'POST /api/v1/statuses/:status_id/favourite' do + subject do + post "/api/v1/statuses/#{status.id}/favourite", headers: headers + end + + let(:status) { Fabricate(:status) } + + it_behaves_like 'forbidden for wrong scope', 'read read:favourites' + + context 'with public status' do + it 'favourites the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.favourited?(status)).to be true + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, favourites_count: 1, favourited: true) + ) + end + end + + context 'with private status of not-followed account' do + let(:status) { Fabricate(:status, visibility: :private) } + + it 'returns http not found' do + subject + + expect(response).to have_http_status(404) + end + end + + context 'with private status of followed account' do + let(:status) { Fabricate(:status, visibility: :private) } + + before do + user.account.follow!(status.account) + end + + it 'favourites the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.favourited?(status)).to be true + end + end + + context 'without an authorization header' do + let(:headers) { {} } + + it 'returns http unauthorized' do + subject + + expect(response).to have_http_status(401) + end + end + end + + describe 'POST /api/v1/statuses/:status_id/unfavourite' do + subject do + post "/api/v1/statuses/#{status.id}/unfavourite", headers: headers + end + + let(:status) { Fabricate(:status) } + + it_behaves_like 'forbidden for wrong scope', 'read read:favourites' + + context 'with public status' do + before do + FavouriteService.new.call(user.account, status) + end + + it 'unfavourites the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.favourited?(status)).to be false + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, favourites_count: 0, favourited: false) + ) + end + end + + context 'when the requesting user was blocked by the status author' do + before do + FavouriteService.new.call(user.account, status) + status.account.block!(user.account) + end + + it 'unfavourites the status successfully', :aggregate_failures do + subject + + expect(response).to have_http_status(200) + expect(user.account.favourited?(status)).to be false + end + + it 'returns json with updated attributes' do + subject + + expect(body_as_json).to match( + a_hash_including(id: status.id.to_s, favourites_count: 0, favourited: false) + ) + end + end + + context 'when status is not favourited' do + it 'returns http success' do + subject + + expect(response).to have_http_status(200) + end + end + + context 'with private status that was not favourited' do + let(:status) { Fabricate(:status, visibility: :private) } + + it 'returns http not found' do + subject + + expect(response).to have_http_status(404) + end + end + end +end From d0f00206dc115cb3a21281b532c59a166c21ce71 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 17 Jul 2023 10:57:18 -0400 Subject: [PATCH 27/90] Fix haml-lint Rubocop `Style/StringLiterals` cop (#25948) --- .haml-lint_todo.yml | 4 ++-- app/views/settings/imports/show.html.haml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index e1314742a6..f9debfd129 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -1,13 +1,13 @@ # This configuration was generated by # `haml-lint --auto-gen-config` -# on 2023-07-17 09:15:24 -0400 using Haml-Lint version 0.48.0. +# on 2023-07-17 09:59:21 -0400 using Haml-Lint version 0.48.0. # The point is for the user to remove these configuration records # one by one as the lints are removed from the code base. # Note that changes in the inspected code, or installation of new # versions of Haml-Lint, may require this file to be generated again. linters: - # Offense count: 70 + # Offense count: 69 RuboCop: enabled: false diff --git a/app/views/settings/imports/show.html.haml b/app/views/settings/imports/show.html.haml index 893c5c8d29..4d50049d3d 100644 --- a/app/views/settings/imports/show.html.haml +++ b/app/views/settings/imports/show.html.haml @@ -2,7 +2,7 @@ = t("imports.titles.#{@bulk_import.type}") - if @bulk_import.likely_mismatched? - .flash-message.warning= t("imports.mismatched_types_warning") + .flash-message.warning= t('imports.mismatched_types_warning') - if @bulk_import.overwrite? %p.hint= t("imports.overwrite_preambles.#{@bulk_import.type}_html", filename: @bulk_import.original_filename, total_items: @bulk_import.total_items) From a442a1d1c69e5d477ca1c05f0bc5fc0f6894b223 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 17 Jul 2023 17:32:46 +0200 Subject: [PATCH 28/90] =?UTF-8?q?Fix=20=E2=80=9CBack=E2=80=9D=20button=20s?= =?UTF-8?q?ometimes=20redirecting=20out=20of=20Mastodon=20(#25281)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/column_back_button.jsx | 4 +-- .../mastodon/components/column_header.jsx | 11 ++++--- app/javascript/mastodon/components/router.tsx | 31 ++++++++++++++++--- app/javascript/mastodon/features/ui/index.jsx | 8 +++-- 4 files changed, 40 insertions(+), 14 deletions(-) diff --git a/app/javascript/mastodon/components/column_back_button.jsx b/app/javascript/mastodon/components/column_back_button.jsx index 38ffa607a9..74a03b093a 100644 --- a/app/javascript/mastodon/components/column_back_button.jsx +++ b/app/javascript/mastodon/components/column_back_button.jsx @@ -23,9 +23,7 @@ export default class ColumnBackButton extends PureComponent { if (onClick) { onClick(); - // Check if there is a previous page in the app to go back to per https://stackoverflow.com/a/70532858/9703201 - // When upgrading to V6, check `location.key !== 'default'` instead per https://github.com/remix-run/history/blob/main/docs/api-reference.md#location - } else if (router.route.location.key) { + } else if (router.history.location?.state?.fromMastodon) { router.history.goBack(); } else { router.history.push('/'); diff --git a/app/javascript/mastodon/components/column_header.jsx b/app/javascript/mastodon/components/column_header.jsx index 89eade262e..9d29bbae03 100644 --- a/app/javascript/mastodon/components/column_header.jsx +++ b/app/javascript/mastodon/components/column_header.jsx @@ -63,10 +63,12 @@ class ColumnHeader extends PureComponent { }; handleBackClick = () => { - if (window.history && window.history.state) { - this.context.router.history.goBack(); + const { router } = this.context; + + if (router.history.location?.state?.fromMastodon) { + router.history.goBack(); } else { - this.context.router.history.push('/'); + router.history.push('/'); } }; @@ -83,6 +85,7 @@ class ColumnHeader extends PureComponent { }; render () { + const { router } = this.context; const { title, icon, active, children, pinned, multiColumn, extraButton, showBackButton, intl: { formatMessage }, placeholder, appendContent, collapseIssues } = this.props; const { collapsed, animating } = this.state; @@ -126,7 +129,7 @@ class ColumnHeader extends PureComponent { pinButton = ; } - if (!pinned && (multiColumn || showBackButton)) { + if (!pinned && ((multiColumn && router.history.location?.state?.fromMastodon) || showBackButton)) { backButton = ( - + {(revealed || editable) &&
-
-
-
- - +
+
-
-
- - +
+
+
+
-
-
- - -
- - {(detailed || fullscreen) && ( - - {formatTime(Math.floor(currentTime))} - / - {formatTime(Math.floor(duration))} - - )} +
-
- {(!onCloseVideo && !editable && !fullscreen && !this.props.alwaysVisible) && } - {(!fullscreen && onOpenVideo) && } - {onCloseVideo && } - +
+
+ + + +
+
+ + +
+ + {(detailed || fullscreen) && ( + + {formatTime(Math.floor(currentTime))} + / + {formatTime(Math.floor(duration))} + + )} +
+ +
+ {(!onCloseVideo && !editable && !fullscreen && !this.props.alwaysVisible) && } + {(!fullscreen && onOpenVideo) && } + {onCloseVideo && } + +
diff --git a/app/javascript/mastodon/initial_state.js b/app/javascript/mastodon/initial_state.js index 67fb068432..1ada5bfb93 100644 --- a/app/javascript/mastodon/initial_state.js +++ b/app/javascript/mastodon/initial_state.js @@ -51,7 +51,6 @@ * @property {boolean} activity_api_enabled * @property {string} admin * @property {boolean=} boost_modal - * @property {boolean} crop_images * @property {boolean=} delete_modal * @property {boolean=} disable_swiping * @property {string=} disabled_account_id @@ -111,7 +110,6 @@ const getMeta = (prop) => initialState?.meta && initialState.meta[prop]; export const activityApiEnabled = getMeta('activity_api_enabled'); export const autoPlayGif = getMeta('auto_play_gif'); export const boostModal = getMeta('boost_modal'); -export const cropImages = getMeta('crop_images'); export const deleteModal = getMeta('delete_modal'); export const disableSwiping = getMeta('disable_swiping'); export const disabledAccountId = getMeta('disabled_account_id'); diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index bb0febaaef..64c245de34 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -5172,9 +5172,9 @@ a.status-card.compact:hover { display: flex; } -.video-modal__container { +.video-modal .video-player { + max-height: 80vh; max-width: 100vw; - max-height: 100vh; } .audio-modal__container { @@ -6192,7 +6192,7 @@ a.status-card.compact:hover { box-sizing: border-box; margin-top: 8px; overflow: hidden; - border-radius: 4px; + border-radius: 8px; position: relative; width: 100%; min-height: 64px; @@ -6207,7 +6207,7 @@ a.status-card.compact:hover { box-sizing: border-box; display: block; position: relative; - border-radius: 4px; + border-radius: 8px; overflow: hidden; &--tall { @@ -6293,7 +6293,7 @@ a.status-card.compact:hover { box-sizing: border-box; position: relative; background: darken($ui-base-color, 8%); - border-radius: 4px; + border-radius: 8px; padding-bottom: 44px; width: 100%; @@ -6360,7 +6360,7 @@ a.status-card.compact:hover { position: relative; background: $base-shadow-color; max-width: 100%; - border-radius: 4px; + border-radius: 8px; box-sizing: border-box; color: $white; display: flex; @@ -6377,8 +6377,6 @@ a.status-card.compact:hover { video { display: block; - max-width: 100vw; - max-height: 80vh; z-index: 1; } @@ -6386,22 +6384,15 @@ a.status-card.compact:hover { width: 100% !important; height: 100% !important; margin: 0; + aspect-ratio: auto !important; video { - max-width: 100% !important; - max-height: 100% !important; width: 100% !important; height: 100% !important; outline: 0; } } - &.inline { - video { - object-fit: contain; - } - } - &__controls { position: absolute; direction: ltr; diff --git a/app/models/concerns/has_user_settings.rb b/app/models/concerns/has_user_settings.rb index b3fa1f683b..5d05019f6b 100644 --- a/app/models/concerns/has_user_settings.rb +++ b/app/models/concerns/has_user_settings.rb @@ -91,10 +91,6 @@ module HasUserSettings settings['web.trends'] end - def setting_crop_images - settings['web.crop_images'] - end - def setting_disable_swiping settings['web.disable_swiping'] end diff --git a/app/models/user_settings.rb b/app/models/user_settings.rb index 71af7aaeb0..a707e28ce9 100644 --- a/app/models/user_settings.rb +++ b/app/models/user_settings.rb @@ -17,7 +17,6 @@ class UserSettings setting :default_privacy, default: nil, in: %w(public unlisted private) namespace :web do - setting :crop_images, default: true setting :advanced_layout, default: false setting :trends, default: true setting :use_blurhash, default: true diff --git a/app/serializers/initial_state_serializer.rb b/app/serializers/initial_state_serializer.rb index b333eaf997..b90db4f58f 100644 --- a/app/serializers/initial_state_serializer.rb +++ b/app/serializers/initial_state_serializer.rb @@ -48,13 +48,11 @@ class InitialStateSerializer < ActiveModel::Serializer store[:use_blurhash] = object.current_account.user.setting_use_blurhash store[:use_pending_items] = object.current_account.user.setting_use_pending_items store[:show_trends] = Setting.trends && object.current_account.user.setting_trends - store[:crop_images] = object.current_account.user.setting_crop_images else store[:auto_play_gif] = Setting.auto_play_gif store[:display_media] = Setting.display_media store[:reduce_motion] = Setting.reduce_motion store[:use_blurhash] = Setting.use_blurhash - store[:crop_images] = Setting.crop_images end store[:disabled_account_id] = object.disabled_account.id.to_s if object.disabled_account diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index 2f194d689c..ea33487c3c 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -37,11 +37,6 @@ = ff.input :'web.disable_swiping', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_disable_swiping') = ff.input :'web.use_system_font', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_system_font_ui') - %h4= t 'appearance.toot_layout' - - .fields-group - = ff.input :'web.crop_images', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_crop_images') - %h4= t 'appearance.discovery' .fields-group diff --git a/config/locales/an.yml b/config/locales/an.yml index d643c556b6..2b71c2f58e 100644 --- a/config/locales/an.yml +++ b/config/locales/an.yml @@ -923,7 +923,6 @@ an: guide_link: https://crowdin.com/project/mastodon guide_link_text: Totz pueden contribuyir. sensitive_content: Conteniu sensible - toot_layout: Disenyo d'as publicacions application_mailer: notification_preferences: Cambiar preferencias de correu electronico salutation: "%{name}:" diff --git a/config/locales/ar.yml b/config/locales/ar.yml index 538b040203..302304f5a3 100644 --- a/config/locales/ar.yml +++ b/config/locales/ar.yml @@ -982,7 +982,6 @@ ar: guide_link: https://crowdin.com/project/mastodon guide_link_text: يمكن للجميع المساهمة. sensitive_content: المحتوى الحساس - toot_layout: شكل المنشور application_mailer: notification_preferences: تعديل تفضيلات البريد الإلكتروني salutation: "%{name}،" diff --git a/config/locales/ast.yml b/config/locales/ast.yml index cdb7a38e8f..660ea4e238 100644 --- a/config/locales/ast.yml +++ b/config/locales/ast.yml @@ -439,7 +439,6 @@ ast: guide_link: https://crowdin.com/project/mastodon guide_link_text: tol mundu pue collaborar. sensitive_content: Conteníu sensible - toot_layout: Distribución de los artículos application_mailer: notification_preferences: Camudar les preferencies de los mensaxes de corréu electrónicu applications: diff --git a/config/locales/be.yml b/config/locales/be.yml index 712f0bacdb..00f66f5814 100644 --- a/config/locales/be.yml +++ b/config/locales/be.yml @@ -1009,7 +1009,6 @@ be: guide_link: https://be.crowdin.com/project/mastodon/be guide_link_text: Кожны можа зрабіць унёсак. sensitive_content: Далікатны змест - toot_layout: Макет допісу application_mailer: notification_preferences: Змяніць налады эл. пошты salutation: "%{name}," diff --git a/config/locales/bg.yml b/config/locales/bg.yml index 8c530cedb1..1ebd38787a 100644 --- a/config/locales/bg.yml +++ b/config/locales/bg.yml @@ -973,7 +973,6 @@ bg: guide_link: https://ru.crowdin.com/project/mastodon guide_link_text: Всеки може да участва. sensitive_content: Деликатно съдържание - toot_layout: Оформление на публикацията application_mailer: notification_preferences: Промяна на предпочитанията за имейл salutation: "%{name}," diff --git a/config/locales/ca.yml b/config/locales/ca.yml index fc82484f42..d105f53a6e 100644 --- a/config/locales/ca.yml +++ b/config/locales/ca.yml @@ -973,7 +973,6 @@ ca: guide_link: https://crowdin.com/project/mastodon guide_link_text: Tothom hi pot contribuir. sensitive_content: Contingut sensible - toot_layout: Disseny dels tuts application_mailer: notification_preferences: Canvia les preferències de correu salutation: "%{name}," diff --git a/config/locales/ckb.yml b/config/locales/ckb.yml index ad0af9a3d0..a9020a84e0 100644 --- a/config/locales/ckb.yml +++ b/config/locales/ckb.yml @@ -571,7 +571,6 @@ ckb: body: ماستۆدۆن لەلایەن خۆبەخشەوە وەردەگێڕێت. guide_link_text: هەموو کەسێک دەتوانێت بەشداری بکات. sensitive_content: ناوەڕۆکی هەستیار - toot_layout: لۆی توت application_mailer: notification_preferences: گۆڕینی پەسەندکراوەکانی ئیمەیڵ salutation: "%{name}," diff --git a/config/locales/co.yml b/config/locales/co.yml index ebd7ab6649..26907ca7b5 100644 --- a/config/locales/co.yml +++ b/config/locales/co.yml @@ -537,7 +537,6 @@ co: guide_link: https://fr.crowdin.com/project/mastodon guide_link_text: Tuttu u mondu pò participà. sensitive_content: Cuntinutu sensibile - toot_layout: Urganizazione application_mailer: notification_preferences: Cambià e priferenze e-mail salutation: "%{name}," diff --git a/config/locales/cs.yml b/config/locales/cs.yml index b32a0c69f2..d7059c55db 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -997,7 +997,6 @@ cs: guide_link: https://cs.crowdin.com/project/mastodon guide_link_text: Zapojit se může každý. sensitive_content: Citlivý obsah - toot_layout: Rozložení příspěvků application_mailer: notification_preferences: Změnit předvolby e-mailů salutation: "%{name}," diff --git a/config/locales/cy.yml b/config/locales/cy.yml index be0c2737d5..8ac9895b3b 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -1045,7 +1045,6 @@ cy: guide_link: https://crowdin.com/project/mastodon guide_link_text: Gall pawb gyfrannu. sensitive_content: Cynnwys sensitif - toot_layout: Cynllun postiad application_mailer: notification_preferences: Newid gosodiadau e-bost salutation: "%{name}," diff --git a/config/locales/da.yml b/config/locales/da.yml index da41e7ac58..a5bc68c04e 100644 --- a/config/locales/da.yml +++ b/config/locales/da.yml @@ -973,7 +973,6 @@ da: guide_link: https://da.crowdin.com/project/mastodon guide_link_text: Alle kan bidrage. sensitive_content: Sensitivt indhold - toot_layout: Indlægslayout application_mailer: notification_preferences: Skift e-mailpræferencer salutation: "%{name}" diff --git a/config/locales/de.yml b/config/locales/de.yml index 56dcd3da64..945c25cbf1 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -973,7 +973,6 @@ de: guide_link: https://de.crowdin.com/project/mastodon/de guide_link_text: Alle können mitmachen und etwas dazu beitragen. sensitive_content: Inhaltswarnung - toot_layout: Timeline-Layout application_mailer: notification_preferences: E-Mail-Einstellungen ändern salutation: "%{name}," diff --git a/config/locales/el.yml b/config/locales/el.yml index 024be1551b..43af651772 100644 --- a/config/locales/el.yml +++ b/config/locales/el.yml @@ -961,7 +961,6 @@ el: guide_link: https://crowdin.com/project/mastodon guide_link_text: Μπορεί να συνεισφέρει ο οποιοσδήποτε. sensitive_content: Ευαίσθητο περιεχόμενο - toot_layout: Διαρρύθμιση αναρτήσεων application_mailer: notification_preferences: Αλλαγή προτιμήσεων email salutation: "%{name}," diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 1f06ad078b..190fd44261 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -973,7 +973,6 @@ en-GB: guide_link: https://crowdin.com/project/mastodon guide_link_text: Everyone can contribute. sensitive_content: Sensitive content - toot_layout: Post layout application_mailer: notification_preferences: Change e-mail preferences salutation: "%{name}," diff --git a/config/locales/en.yml b/config/locales/en.yml index d31da27284..10b6867afa 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -973,7 +973,6 @@ en: guide_link: https://crowdin.com/project/mastodon guide_link_text: Everyone can contribute. sensitive_content: Sensitive content - toot_layout: Post layout application_mailer: notification_preferences: Change e-mail preferences salutation: "%{name}," diff --git a/config/locales/eo.yml b/config/locales/eo.yml index 16b6882703..c5956cbd96 100644 --- a/config/locales/eo.yml +++ b/config/locales/eo.yml @@ -973,7 +973,6 @@ eo: guide_link: https://crowdin.com/project/mastodon guide_link_text: Ĉiu povas kontribui. sensitive_content: Tikla enhavo - toot_layout: Mesaĝo aranĝo application_mailer: notification_preferences: Ŝanĝi retmesaĝajn preferojn salutation: "%{name}," diff --git a/config/locales/es-AR.yml b/config/locales/es-AR.yml index 5fe0ef4f77..a64d643432 100644 --- a/config/locales/es-AR.yml +++ b/config/locales/es-AR.yml @@ -973,7 +973,6 @@ es-AR: guide_link: https://es.crowdin.com/project/mastodon guide_link_text: Todos pueden contribuir. sensitive_content: Contenido sensible - toot_layout: Diseño del mensaje application_mailer: notification_preferences: Cambiar configuración de correo electrónico salutation: "%{name}:" diff --git a/config/locales/es-MX.yml b/config/locales/es-MX.yml index a733189f41..cc94b68843 100644 --- a/config/locales/es-MX.yml +++ b/config/locales/es-MX.yml @@ -973,7 +973,6 @@ es-MX: guide_link: https://es.crowdin.com/project/mastodon guide_link_text: Todos pueden contribuir. sensitive_content: Contenido sensible - toot_layout: Diseño de los toots application_mailer: notification_preferences: Cambiar preferencias de correo electrónico salutation: "%{name}:" diff --git a/config/locales/es.yml b/config/locales/es.yml index b9ddeaed0e..209e41b35a 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -973,7 +973,6 @@ es: guide_link: https://es.crowdin.com/project/mastodon guide_link_text: Todos pueden contribuir. sensitive_content: Contenido sensible - toot_layout: Diseño de las publicaciones application_mailer: notification_preferences: Cambiar preferencias de correo electrónico salutation: "%{name}:" diff --git a/config/locales/et.yml b/config/locales/et.yml index 9d5508dcf3..554070c6a3 100644 --- a/config/locales/et.yml +++ b/config/locales/et.yml @@ -973,7 +973,6 @@ et: guide_link: https://crowdin.com/project/mastodon/et guide_link_text: Panustada võib igaüks! sensitive_content: Tundlik sisu - toot_layout: Postituse väljanägemine application_mailer: notification_preferences: Muuda e-kirjade eelistusi salutation: "%{name}!" diff --git a/config/locales/eu.yml b/config/locales/eu.yml index 0cf19a6636..f6aeae0326 100644 --- a/config/locales/eu.yml +++ b/config/locales/eu.yml @@ -972,7 +972,6 @@ eu: guide_link: https://crowdin.com/project/mastodon guide_link_text: Edonork lagundu dezake. sensitive_content: Eduki hunkigarria - toot_layout: Bidalketen diseinua application_mailer: notification_preferences: Aldatu e-mail hobespenak salutation: "%{name}," diff --git a/config/locales/fa.yml b/config/locales/fa.yml index ae7cb3cdaf..3744fc73ba 100644 --- a/config/locales/fa.yml +++ b/config/locales/fa.yml @@ -821,7 +821,6 @@ fa: guide_link: https://crowdin.com/project/mastodon guide_link_text: همه می‌توانند کمک کنند. sensitive_content: محتوای حساس - toot_layout: آرایش فرسته application_mailer: notification_preferences: تغییر ترجیحات ایمیل salutation: "%{name}،" diff --git a/config/locales/fi.yml b/config/locales/fi.yml index f9ec015c74..df513af8ff 100644 --- a/config/locales/fi.yml +++ b/config/locales/fi.yml @@ -973,7 +973,6 @@ fi: guide_link: https://crowdin.com/project/mastodon guide_link_text: Kaikki voivat osallistua. sensitive_content: Arkaluonteinen sisältö - toot_layout: Viestin asettelu application_mailer: notification_preferences: Muuta sähköpostiasetuksia salutation: "%{name}," diff --git a/config/locales/fo.yml b/config/locales/fo.yml index e11cc10b30..4e1e9d9c7d 100644 --- a/config/locales/fo.yml +++ b/config/locales/fo.yml @@ -973,7 +973,6 @@ fo: guide_link: https://crowdin.com/project/mastodon guide_link_text: Øll kunnu geva íkast. sensitive_content: Viðkvæmt innihald - toot_layout: Uppseting av postum application_mailer: notification_preferences: Broyt teldupostastillingar salutation: "%{name}" diff --git a/config/locales/fr-QC.yml b/config/locales/fr-QC.yml index 056433a721..408bc62a3b 100644 --- a/config/locales/fr-QC.yml +++ b/config/locales/fr-QC.yml @@ -973,7 +973,6 @@ fr-QC: guide_link: https://fr.crowdin.com/project/mastodon guide_link_text: Tout le monde peut y contribuer. sensitive_content: Contenu sensible - toot_layout: Agencement des messages application_mailer: notification_preferences: Modifier les préférences de courriel salutation: "%{name}," diff --git a/config/locales/fr.yml b/config/locales/fr.yml index a64d8edc04..bfd1e242d1 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -973,7 +973,6 @@ fr: guide_link: https://fr.crowdin.com/project/mastodon guide_link_text: Tout le monde peut y contribuer. sensitive_content: Contenu sensible - toot_layout: Agencement des messages application_mailer: notification_preferences: Modifier les préférences de courriel salutation: "%{name}," diff --git a/config/locales/fy.yml b/config/locales/fy.yml index 77d41e0919..62d41663ff 100644 --- a/config/locales/fy.yml +++ b/config/locales/fy.yml @@ -973,7 +973,6 @@ fy: guide_link: https://crowdin.com/project/mastodon/fy guide_link_text: Elkenien kin bydrage. sensitive_content: Gefoelige ynhâld - toot_layout: Lay-out fan berjochten application_mailer: notification_preferences: E-mailynstellingen wizigje salutation: "%{name}," diff --git a/config/locales/gd.yml b/config/locales/gd.yml index 7ff820c296..8ba79c3329 100644 --- a/config/locales/gd.yml +++ b/config/locales/gd.yml @@ -1009,7 +1009,6 @@ gd: guide_link: https://crowdin.com/project/mastodon guide_link_text: "’S urrainn do neach sam bith cuideachadh." sensitive_content: Susbaint fhrionasach - toot_layout: Co-dhealbhachd nam postaichean application_mailer: notification_preferences: Atharraich roghainnean a’ phuist-d salutation: "%{name}," diff --git a/config/locales/gl.yml b/config/locales/gl.yml index abde828b33..b823a9f08b 100644 --- a/config/locales/gl.yml +++ b/config/locales/gl.yml @@ -973,7 +973,6 @@ gl: guide_link: https://crowdin.com/project/mastodon guide_link_text: Todas podemos contribuír. sensitive_content: Contido sensible - toot_layout: Disposición da publicación application_mailer: notification_preferences: Cambiar os axustes de email salutation: "%{name}," diff --git a/config/locales/he.yml b/config/locales/he.yml index ead8feb8f3..9e8e7d8848 100644 --- a/config/locales/he.yml +++ b/config/locales/he.yml @@ -1009,7 +1009,6 @@ he: guide_link: https://crowdin.com/project/mastodon guide_link_text: כולם יכולים לתרום. sensitive_content: תוכן רגיש - toot_layout: פריסת הודעה application_mailer: notification_preferences: שינוי העדפות דוא"ל salutation: "%{name}," diff --git a/config/locales/hu.yml b/config/locales/hu.yml index 10b5ae3d7f..4b620896a5 100644 --- a/config/locales/hu.yml +++ b/config/locales/hu.yml @@ -973,7 +973,6 @@ hu: guide_link: https://crowdin.com/project/mastodon guide_link_text: Bárki közreműködhet. sensitive_content: Kényes tartalom - toot_layout: Bejegyzések elrendezése application_mailer: notification_preferences: E-mail beállítások módosítása salutation: "%{name}!" diff --git a/config/locales/id.yml b/config/locales/id.yml index 5eb453cc94..69298c4b13 100644 --- a/config/locales/id.yml +++ b/config/locales/id.yml @@ -901,7 +901,6 @@ id: guide_link: https://crowdin.com/project/mastodon guide_link_text: Siapa saja bisa berkontribusi. sensitive_content: Konten sensitif - toot_layout: Tata letak kiriman application_mailer: notification_preferences: Ubah pilihan email salutation: "%{name}," diff --git a/config/locales/io.yml b/config/locales/io.yml index 1873fdaee5..ce37eda4ee 100644 --- a/config/locales/io.yml +++ b/config/locales/io.yml @@ -880,7 +880,6 @@ io: guide_link: https://crowdin.com/project/mastodon guide_link_text: Omnu povas kontributar. sensitive_content: Sentoza kontenajo - toot_layout: Postostrukturo application_mailer: notification_preferences: Chanjez retpostopreferaji salutation: "%{name}," diff --git a/config/locales/is.yml b/config/locales/is.yml index 4306321e97..0311296d96 100644 --- a/config/locales/is.yml +++ b/config/locales/is.yml @@ -975,7 +975,6 @@ is: guide_link: https://crowdin.com/project/mastodon/is guide_link_text: Allir geta tekið þátt. sensitive_content: Viðkvæmt efni - toot_layout: Framsetning færslu application_mailer: notification_preferences: Breyta kjörstillingum tölvupósts salutation: "%{name}," diff --git a/config/locales/it.yml b/config/locales/it.yml index ad73707c26..22c628e7d4 100644 --- a/config/locales/it.yml +++ b/config/locales/it.yml @@ -975,7 +975,6 @@ it: guide_link: https://it.crowdin.com/project/mastodon guide_link_text: Tutti possono contribuire. sensitive_content: Contenuto sensibile - toot_layout: Layout dei toot application_mailer: notification_preferences: Cambia preferenze email salutation: "%{name}," diff --git a/config/locales/ja.yml b/config/locales/ja.yml index 14a8584e70..5a52dff8bf 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -955,7 +955,6 @@ ja: guide_link: https://ja.crowdin.com/project/mastodon guide_link_text: 誰でも参加することができます。 sensitive_content: 閲覧注意コンテンツ - toot_layout: 投稿のレイアウト application_mailer: notification_preferences: メール設定の変更 salutation: "%{name}さん" diff --git a/config/locales/kk.yml b/config/locales/kk.yml index a38c9407d7..d891dfa37b 100644 --- a/config/locales/kk.yml +++ b/config/locales/kk.yml @@ -320,7 +320,6 @@ kk: confirmation_dialogs: Пікірталас диалогтары discovery: Пікірталас sensitive_content: Нәзік контент - toot_layout: Жазба формасы application_mailer: notification_preferences: Change e-mail prеferences settings: 'Change e-mail preferеnces: %{link}' diff --git a/config/locales/ko.yml b/config/locales/ko.yml index 1e9b5a28e0..f78fa8c0e5 100644 --- a/config/locales/ko.yml +++ b/config/locales/ko.yml @@ -957,7 +957,6 @@ ko: guide_link: https://crowdin.com/project/mastodon guide_link_text: 누구나 기여할 수 있습니다. sensitive_content: 민감한 내용 - toot_layout: 게시물 레이아웃 application_mailer: notification_preferences: 메일 설정 변경 salutation: "%{name} 님," diff --git a/config/locales/ku.yml b/config/locales/ku.yml index 7c639c6340..bfa9db1d22 100644 --- a/config/locales/ku.yml +++ b/config/locales/ku.yml @@ -920,7 +920,6 @@ ku: guide_link: https://crowdin.com/project/mastodon guide_link_text: Herkes dikare beşdar bibe. sensitive_content: Naveroka hestiyarî - toot_layout: Xêzkirina şandîya application_mailer: notification_preferences: Sazkariyên e-nameyê biguherîne salutation: "%{name}," diff --git a/config/locales/lv.yml b/config/locales/lv.yml index a74b7d62ca..b951855595 100644 --- a/config/locales/lv.yml +++ b/config/locales/lv.yml @@ -979,7 +979,6 @@ lv: guide_link: https://crowdin.com/project/mastodon guide_link_text: Ikviens var piedalīties. sensitive_content: Sensitīvs saturs - toot_layout: Ziņas izskats application_mailer: notification_preferences: Mainīt e-pasta uztādījumus salutation: "%{name}," diff --git a/config/locales/my.yml b/config/locales/my.yml index b47c1f4300..439d1eabea 100644 --- a/config/locales/my.yml +++ b/config/locales/my.yml @@ -955,7 +955,6 @@ my: guide_link: https://crowdin.com/project/mastodon guide_link_text: လူတိုင်းပါဝင်ကူညီနိုင်ပါတယ်။ sensitive_content: သတိထားရသော အကြောင်းအရာ - toot_layout: ပို့စ်အပြင်အဆင် application_mailer: notification_preferences: အီးမေးလ် သတ်မှတ်ချက်များကို ပြောင်းပါ salutation: "%{name}" diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 3c192dd3e6..5949fcdca3 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -973,7 +973,6 @@ nl: guide_link: https://crowdin.com/project/mastodon/nl guide_link_text: Iedereen kan bijdragen. sensitive_content: Gevoelige inhoud - toot_layout: Lay-out van berichten application_mailer: notification_preferences: E-mailvoorkeuren wijzigen salutation: "%{name}," diff --git a/config/locales/nn.yml b/config/locales/nn.yml index 05151bc5f7..393b48037c 100644 --- a/config/locales/nn.yml +++ b/config/locales/nn.yml @@ -965,7 +965,6 @@ nn: guide_link: https://crowdin.com/project/mastodon guide_link_text: Alle kan bidra. sensitive_content: Ømtolig innhald - toot_layout: Tutoppsett application_mailer: notification_preferences: Endr e-post-innstillingane salutation: Hei %{name}, diff --git a/config/locales/no.yml b/config/locales/no.yml index 7ab60e588c..cc6b4b2aa8 100644 --- a/config/locales/no.yml +++ b/config/locales/no.yml @@ -914,7 +914,6 @@ guide_link: https://crowdin.com/project/mastodon guide_link_text: Alle kan bidra. sensitive_content: Følsomt innhold - toot_layout: Innleggsoppsett application_mailer: notification_preferences: Endre E-postinnstillingene salutation: "%{name}," diff --git a/config/locales/oc.yml b/config/locales/oc.yml index b867245628..e531a91f42 100644 --- a/config/locales/oc.yml +++ b/config/locales/oc.yml @@ -459,7 +459,6 @@ oc: body: Mastodon es traduch per de benevòls. guide_link_text: Tot lo monde pòt contribuïr. sensitive_content: Contengut sensible - toot_layout: Disposicion del tut application_mailer: notification_preferences: Cambiar las preferéncias de corrièl salutation: "%{name}," diff --git a/config/locales/pl.yml b/config/locales/pl.yml index 5f4b57e296..dd35e06f47 100644 --- a/config/locales/pl.yml +++ b/config/locales/pl.yml @@ -1009,7 +1009,6 @@ pl: guide_link: https://pl.crowdin.com/project/mastodon guide_link_text: Każdy może wnieść swój wkład. sensitive_content: Wrażliwa zawartość - toot_layout: Wygląd wpisów application_mailer: notification_preferences: Zmień ustawienia e-maili salutation: "%{name}," diff --git a/config/locales/pt-BR.yml b/config/locales/pt-BR.yml index b38596cd1f..8195d42758 100644 --- a/config/locales/pt-BR.yml +++ b/config/locales/pt-BR.yml @@ -973,7 +973,6 @@ pt-BR: guide_link: https://br.crowdin.com/project/mastodon guide_link_text: Todos podem contribuir. sensitive_content: Conteúdo sensível - toot_layout: Formato da publicação application_mailer: notification_preferences: Alterar preferências de e-mail salutation: "%{name}," diff --git a/config/locales/pt-PT.yml b/config/locales/pt-PT.yml index 379f1ecd90..eedc115a8f 100644 --- a/config/locales/pt-PT.yml +++ b/config/locales/pt-PT.yml @@ -973,7 +973,6 @@ pt-PT: guide_link: https://pt.crowdin.com/project/mastodon/ guide_link_text: Todos podem contribuir. sensitive_content: Conteúdo problemático - toot_layout: Disposição da publicação application_mailer: notification_preferences: Alterar preferências de e-mail salutation: "%{name}," diff --git a/config/locales/ro.yml b/config/locales/ro.yml index 587e7d390c..ae32b11772 100644 --- a/config/locales/ro.yml +++ b/config/locales/ro.yml @@ -408,7 +408,6 @@ ro: localization: guide_link_text: Toată lumea poate contribui. sensitive_content: Conținut sensibil - toot_layout: Aspect postare application_mailer: notification_preferences: Modifică preferințe e-mail settings: 'Modifică preferințe e-mail: %{link}' diff --git a/config/locales/ru.yml b/config/locales/ru.yml index fe698c0629..98112f6ee9 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -1009,7 +1009,6 @@ ru: guide_link: https://ru.crowdin.com/project/mastodon guide_link_text: Каждый может внести свой вклад. sensitive_content: Содержимое деликатного характера - toot_layout: Структура постов application_mailer: notification_preferences: Настроить уведомления можно здесь salutation: "%{name}," diff --git a/config/locales/sc.yml b/config/locales/sc.yml index bbbdd5d258..b67d673912 100644 --- a/config/locales/sc.yml +++ b/config/locales/sc.yml @@ -491,7 +491,6 @@ sc: guide_link: https://crowdin.com/project/mastodon guide_link_text: Chie si siat podet contribuire. sensitive_content: Cuntenutu sensìbile - toot_layout: Dispositzione de is tuts application_mailer: notification_preferences: Muda is preferèntzias de posta salutation: "%{name}," diff --git a/config/locales/sco.yml b/config/locales/sco.yml index 4922303e12..b53f715d69 100644 --- a/config/locales/sco.yml +++ b/config/locales/sco.yml @@ -913,7 +913,6 @@ sco: guide_link: https://crowdin.com/project/mastodon guide_link_text: Awbody kin contribute. sensitive_content: Sensitive content - toot_layout: Post leyoot application_mailer: notification_preferences: Chynge email preferences salutation: "%{name}," diff --git a/config/locales/si.yml b/config/locales/si.yml index 974728a058..11804ef09b 100644 --- a/config/locales/si.yml +++ b/config/locales/si.yml @@ -757,7 +757,6 @@ si: guide_link: https://crowdin.com/project/mastodon guide_link_text: සෑම කෙනෙකුටම දායක විය හැකිය. sensitive_content: සංවේදී අන්තර්ගතය - toot_layout: පෝස්ට් පිරිසැලසුම application_mailer: notification_preferences: ඊමේල් මනාප වෙනස් කරන්න salutation: "%{name}," diff --git a/config/locales/simple_form.an.yml b/config/locales/simple_form.an.yml index 53e99b9e06..51e7910786 100644 --- a/config/locales/simple_form.an.yml +++ b/config/locales/simple_form.an.yml @@ -192,7 +192,6 @@ an: setting_always_send_emails: Ninviar siempre notificacions per correu setting_auto_play_gif: Reproducir automaticament los GIFs animaus setting_boost_modal: Amostrar finestra de confirmación antes de retutar - setting_crop_images: Retallar a 16x9 las imachens d'as publicacions no expandidas setting_default_language: Idioma de publicación setting_default_privacy: Privacidat de publicacions setting_default_sensitive: Marcar siempre imachens como sensibles diff --git a/config/locales/simple_form.ar.yml b/config/locales/simple_form.ar.yml index dd875123cd..907221cdd7 100644 --- a/config/locales/simple_form.ar.yml +++ b/config/locales/simple_form.ar.yml @@ -200,7 +200,6 @@ ar: setting_always_send_emails: ارسل إشعارات البريد الإلكتروني دائماً setting_auto_play_gif: تشغيل تلقائي لِوَسائط جيف المتحركة setting_boost_modal: إظهار مربع حوار التأكيد قبل إعادة مشاركة أي منشور - setting_crop_images: قص الصور في المنشورات غير الموسعة إلى 16x9 setting_default_language: لغة النشر setting_default_privacy: خصوصية المنشور setting_default_sensitive: اعتبر الوسائط دائما كمحتوى حساس diff --git a/config/locales/simple_form.ast.yml b/config/locales/simple_form.ast.yml index 213b9dfbe2..3269605618 100644 --- a/config/locales/simple_form.ast.yml +++ b/config/locales/simple_form.ast.yml @@ -111,7 +111,6 @@ ast: setting_always_send_emails: Unviar siempres los avisos per corréu electrónicu setting_auto_play_gif: Reproducir automáticamente los GIFs setting_boost_modal: Amosar el diálogu de confirmación enantes de compartir un artículu - setting_crop_images: Recortar les imáxenes de los artículos ensin espander a la proporción 16:9 setting_default_language: Llingua de los artículos setting_default_privacy: Privacidá de los artículos setting_default_sensitive: Marcar siempres tol conteníu como sensible diff --git a/config/locales/simple_form.be.yml b/config/locales/simple_form.be.yml index c692a96d6c..3298745c4c 100644 --- a/config/locales/simple_form.be.yml +++ b/config/locales/simple_form.be.yml @@ -200,7 +200,6 @@ be: setting_always_send_emails: Заўжды дасылаць для апавяшчэнні эл. пошты setting_auto_play_gif: Аўтапрайграванне анімаваных GIF setting_boost_modal: Паказваць акно пацвярджэння перад пашырэннем - setting_crop_images: У неразгорнутых допісах абразаць відарысы да 16:9 setting_default_language: Мова допісаў setting_default_privacy: Прыватнасць допісаў setting_default_sensitive: Заўсёды пазначаць кантэнт як далікатны diff --git a/config/locales/simple_form.bg.yml b/config/locales/simple_form.bg.yml index d8057e0968..6b319e2721 100644 --- a/config/locales/simple_form.bg.yml +++ b/config/locales/simple_form.bg.yml @@ -200,7 +200,6 @@ bg: setting_always_send_emails: Все да се пращат известия по имейла setting_auto_play_gif: Самопускащи се анимирани гифчета setting_boost_modal: Показване на прозорец за потвърждение преди подсилване - setting_crop_images: Изрязване на образи в неразгънати публикации до 16x9 setting_default_language: Език на публикуване setting_default_privacy: Поверителност на публикуване setting_default_sensitive: Все да се бележи мултимедията като деликатна diff --git a/config/locales/simple_form.ca.yml b/config/locales/simple_form.ca.yml index c86509631a..3c6635c0f0 100644 --- a/config/locales/simple_form.ca.yml +++ b/config/locales/simple_form.ca.yml @@ -200,7 +200,6 @@ ca: setting_always_send_emails: Envia'm sempre notificacions per correu electrònic setting_auto_play_gif: Reprodueix automàticament els GIF animats setting_boost_modal: Mostra la finestra de confirmació abans d'impulsar - setting_crop_images: Retalla les imatges en tuts no ampliats a 16x9 setting_default_language: Llengua dels tuts setting_default_privacy: Privacitat dels tuts setting_default_sensitive: Marcar sempre el contingut gràfic com a sensible diff --git a/config/locales/simple_form.ckb.yml b/config/locales/simple_form.ckb.yml index b649541f4f..0d129dd702 100644 --- a/config/locales/simple_form.ckb.yml +++ b/config/locales/simple_form.ckb.yml @@ -136,7 +136,6 @@ ckb: setting_aggregate_reblogs: گرووپی توتەکان یەکبخە setting_auto_play_gif: خۆکاربەخشکردنی GIFــەکان setting_boost_modal: پیشاندانی دیالۆگی دووپاتکردنەوە پێش دوبارە توتاندن - setting_crop_images: لە تووتی نەکراوە،وینەکان لە ئەندازی ۱٦×۹ ببڕە setting_default_language: زمانی نووسراوەکانتان setting_default_privacy: چوارچێوەی تایبەتێتی ئێوە setting_default_sensitive: هەمیشە نیشانکردنی میدیا وەک هەستیار diff --git a/config/locales/simple_form.co.yml b/config/locales/simple_form.co.yml index 9ad1751a90..105c67efbf 100644 --- a/config/locales/simple_form.co.yml +++ b/config/locales/simple_form.co.yml @@ -137,7 +137,6 @@ co: setting_aggregate_reblogs: Gruppà e spartere indè e linee setting_auto_play_gif: Lettura autumatica di i GIF animati setting_boost_modal: Mustrà una cunfirmazione per sparte un statutu - setting_crop_images: Riquatrà i ritratti in 16x9 indè i statuti micca selezziunati setting_default_language: Lingua di pubblicazione setting_default_privacy: Cunfidenzialità di i statuti setting_default_sensitive: Sempre cunsiderà media cum’è sensibili diff --git a/config/locales/simple_form.cs.yml b/config/locales/simple_form.cs.yml index 0148911867..05dd9c54b1 100644 --- a/config/locales/simple_form.cs.yml +++ b/config/locales/simple_form.cs.yml @@ -195,7 +195,6 @@ cs: setting_always_send_emails: Vždy posílat e-mailová oznámení setting_auto_play_gif: Automaticky přehrávat animace GIF setting_boost_modal: Před boostnutím zobrazovat potvrzovací okno - setting_crop_images: Ořezávat obrázky v nerozbalených příspěvcích na 16x9 setting_default_language: Jazyk příspěvků setting_default_privacy: Soukromí příspěvků setting_default_sensitive: Vždy označovat média jako citlivá diff --git a/config/locales/simple_form.cy.yml b/config/locales/simple_form.cy.yml index e58b3d1be2..0c85f0667a 100644 --- a/config/locales/simple_form.cy.yml +++ b/config/locales/simple_form.cy.yml @@ -200,7 +200,6 @@ cy: setting_always_send_emails: Anfonwch hysbysiadau e-bost bob amser setting_auto_play_gif: Chwarae GIFs wedi'u hanimeiddio yn awtomatig setting_boost_modal: Dangos deialog cadarnhau cyn rhoi hwb - setting_crop_images: Tocio delweddau o fewn postiadau nad ydynt wedi'u hehangu i 16x9 setting_default_language: Iaith postio setting_default_privacy: Preifatrwydd cyhoeddi setting_default_sensitive: Marcio cyfryngau fel eu bod yn sensitif bob tro diff --git a/config/locales/simple_form.da.yml b/config/locales/simple_form.da.yml index cda0f759d1..d99750faab 100644 --- a/config/locales/simple_form.da.yml +++ b/config/locales/simple_form.da.yml @@ -200,7 +200,6 @@ da: setting_always_send_emails: Send altid en e-mailnotifikationer setting_auto_play_gif: Autoafspil animerede GIF'er setting_boost_modal: Vis bekræftelsesdialog inden boosting - setting_crop_images: Beskær billeder i ikke-ekspanderede indlæg til 16x9 setting_default_language: Sprog for indlæg setting_default_privacy: Fortrolighed for indlæg setting_default_sensitive: Markér altid medier som sensitive diff --git a/config/locales/simple_form.de.yml b/config/locales/simple_form.de.yml index 0db5bccffa..150c07bcf5 100644 --- a/config/locales/simple_form.de.yml +++ b/config/locales/simple_form.de.yml @@ -200,7 +200,6 @@ de: setting_always_send_emails: Benachrichtigungen immer senden setting_auto_play_gif: Animierte GIFs automatisch abspielen setting_boost_modal: Bestätigungsdialog beim Teilen eines Beitrags anzeigen - setting_crop_images: Bilder in nicht ausgeklappten Beiträgen auf 16:9 zuschneiden setting_default_language: Beitragssprache setting_default_privacy: Beitragssichtbarkeit setting_default_sensitive: Eigene Medien immer mit einer Inhaltswarnung versehen diff --git a/config/locales/simple_form.el.yml b/config/locales/simple_form.el.yml index b9e8ce3b5a..339b4b5303 100644 --- a/config/locales/simple_form.el.yml +++ b/config/locales/simple_form.el.yml @@ -195,7 +195,6 @@ el: setting_always_send_emails: Πάντα να αποστέλλονται ειδοποίησεις μέσω email setting_auto_play_gif: Αυτόματη αναπαραγωγή των GIF setting_boost_modal: Επιβεβαίωση πριν την προώθηση - setting_crop_images: Περιορισμός των εικόνων σε μη-ανεπτυγμένα τουτ σε αναλογία 16x9 setting_default_language: Γλώσσα δημοσιεύσεων setting_default_privacy: Ιδιωτικότητα δημοσιεύσεων setting_default_sensitive: Σημείωση όλων των πολυμέσων ως ευαίσθητου περιεχομένου diff --git a/config/locales/simple_form.en-GB.yml b/config/locales/simple_form.en-GB.yml index 689a544964..150ce85023 100644 --- a/config/locales/simple_form.en-GB.yml +++ b/config/locales/simple_form.en-GB.yml @@ -200,7 +200,6 @@ en-GB: setting_always_send_emails: Always send e-mail notifications setting_auto_play_gif: Auto-play animated GIFs setting_boost_modal: Show confirmation dialogue before boosting - setting_crop_images: Crop images in non-expanded posts to 16x9 setting_default_language: Posting language setting_default_privacy: Posting privacy setting_default_sensitive: Always mark media as sensitive diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index a81b6627a0..4307d65e9b 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -200,7 +200,6 @@ en: setting_always_send_emails: Always send e-mail notifications setting_auto_play_gif: Auto-play animated GIFs setting_boost_modal: Show confirmation dialog before boosting - setting_crop_images: Crop images in non-expanded posts to 16x9 setting_default_language: Posting language setting_default_privacy: Posting privacy setting_default_sensitive: Always mark media as sensitive diff --git a/config/locales/simple_form.eo.yml b/config/locales/simple_form.eo.yml index 76b2af96d4..f7adede7c7 100644 --- a/config/locales/simple_form.eo.yml +++ b/config/locales/simple_form.eo.yml @@ -200,7 +200,6 @@ eo: setting_always_send_emails: Ĉiam sendi la sciigojn per retpoŝto setting_auto_play_gif: Aŭtomate ekigi GIF-ojn setting_boost_modal: Montri konfirman fenestron antaŭ ol diskonigi mesaĝon - setting_crop_images: Stuci bildojn en negrandigitaj mesaĝoj al 16x9 setting_default_language: Publikada lingvo setting_default_privacy: Privateco de afiŝado setting_default_sensitive: Ĉiam marki plurmediojn kiel tiklaj diff --git a/config/locales/simple_form.es-AR.yml b/config/locales/simple_form.es-AR.yml index 3f5498e9f5..ec00f5dd1d 100644 --- a/config/locales/simple_form.es-AR.yml +++ b/config/locales/simple_form.es-AR.yml @@ -200,7 +200,6 @@ es-AR: setting_always_send_emails: Siempre enviar notificaciones por correo electrónico setting_auto_play_gif: Reproducir automáticamente los GIFs animados setting_boost_modal: Mostrar diálogo de confirmación antes de adherir - setting_crop_images: Recortar imágenes en mensajes no expandidos a 16x9 setting_default_language: Idioma de tus mensajes setting_default_privacy: Privacidad de mensajes setting_default_sensitive: Siempre marcar medios como sensibles diff --git a/config/locales/simple_form.es-MX.yml b/config/locales/simple_form.es-MX.yml index 010c1436f7..7a1577cdb0 100644 --- a/config/locales/simple_form.es-MX.yml +++ b/config/locales/simple_form.es-MX.yml @@ -200,7 +200,6 @@ es-MX: setting_always_send_emails: Enviar siempre notificaciones por correo setting_auto_play_gif: Reproducir automáticamente los GIFs animados setting_boost_modal: Mostrar ventana de confirmación antes de un Retoot - setting_crop_images: Recortar a 16x9 las imágenes de los toots no expandidos setting_default_language: Idioma de publicación setting_default_privacy: Privacidad de publicaciones setting_default_sensitive: Marcar siempre imágenes como sensibles diff --git a/config/locales/simple_form.es.yml b/config/locales/simple_form.es.yml index 1f11eeee97..e314bb4557 100644 --- a/config/locales/simple_form.es.yml +++ b/config/locales/simple_form.es.yml @@ -200,7 +200,6 @@ es: setting_always_send_emails: Enviar siempre notificaciones por correo setting_auto_play_gif: Reproducir automáticamente los GIFs animados setting_boost_modal: Mostrar ventana de confirmación antes de impulsar - setting_crop_images: Recortar a 16x9 las imágenes de las publicaciones no expandidas setting_default_language: Idioma de publicación setting_default_privacy: Privacidad de publicaciones setting_default_sensitive: Marcar siempre imágenes como sensibles diff --git a/config/locales/simple_form.et.yml b/config/locales/simple_form.et.yml index 4a89adfa92..65cafb7d19 100644 --- a/config/locales/simple_form.et.yml +++ b/config/locales/simple_form.et.yml @@ -200,7 +200,6 @@ et: setting_always_send_emails: Edasta kõik teavitused meilile setting_auto_play_gif: Esita GIF-e automaatselt setting_boost_modal: Näita enne jagamist kinnitusdialoogi - setting_crop_images: Laiendamata postitustes kärbi pildid 16:9 küljesuhtesse setting_default_language: Postituse keel setting_default_privacy: Postituse nähtavus setting_default_sensitive: Alati märgista meedia tundlikuks diff --git a/config/locales/simple_form.eu.yml b/config/locales/simple_form.eu.yml index 5e8c395690..5ab8ab612d 100644 --- a/config/locales/simple_form.eu.yml +++ b/config/locales/simple_form.eu.yml @@ -195,7 +195,6 @@ eu: setting_always_send_emails: Bidali beti eposta jakinarazpenak setting_auto_play_gif: Erreproduzitu GIF animatuak automatikoki setting_boost_modal: Erakutsi baieztapen elkarrizketa-koadroa bultzada eman aurretik - setting_crop_images: Moztu irudiak hedatu gabeko tootetan 16x9 proportzioan setting_default_language: Argitalpenen hizkuntza setting_default_privacy: Mezuen pribatutasuna setting_default_sensitive: Beti markatu edukiak hunkigarri gisa diff --git a/config/locales/simple_form.fa.yml b/config/locales/simple_form.fa.yml index 408e16b576..0d6cf3e565 100644 --- a/config/locales/simple_form.fa.yml +++ b/config/locales/simple_form.fa.yml @@ -169,7 +169,6 @@ fa: setting_always_send_emails: فرستادن همیشگی آگاهی‌های رایانامه‌ای setting_auto_play_gif: پخش خودکار تصویرهای متحرک setting_boost_modal: نمایش پیغام تأیید پیش از تقویت کردن - setting_crop_images: در فرسته‌های ناگسترده، تصویرها را به ابعاد ‎۱۶×۹ کوچک کن setting_default_language: زبان نوشته‌های شما setting_default_privacy: حریم خصوصی نوشته‌ها setting_default_sensitive: همیشه تصاویر را به عنوان حساس علامت بزن diff --git a/config/locales/simple_form.fi.yml b/config/locales/simple_form.fi.yml index 396af1ee86..e89583eadc 100644 --- a/config/locales/simple_form.fi.yml +++ b/config/locales/simple_form.fi.yml @@ -200,7 +200,6 @@ fi: setting_always_send_emails: Lähetä aina sähköposti-ilmoituksia setting_auto_play_gif: Toista GIF-animaatiot automaattisesti setting_boost_modal: Kysy vahvistus ennen tehostusta - setting_crop_images: Rajaa kuvat avaamattomissa tuuttauksissa 16:9 kuvasuhteeseen setting_default_language: Julkaisujen kieli setting_default_privacy: Viestin näkyvyys setting_default_sensitive: Merkitse media aina arkaluontoiseksi diff --git a/config/locales/simple_form.fo.yml b/config/locales/simple_form.fo.yml index fc3169502b..27edf181bd 100644 --- a/config/locales/simple_form.fo.yml +++ b/config/locales/simple_form.fo.yml @@ -200,7 +200,6 @@ fo: setting_always_send_emails: Send altíð fráboðanir við telduposti setting_auto_play_gif: Spæl teknimyndagjørdar GIFar sjálvvirkandi setting_boost_modal: Vís váttanarmynd, áðrenn tú stimbrar postar - setting_crop_images: Sker myndir til lutfallið 16x9 í postum, sum ikki eru víðkaðir setting_default_language: Mál, sum verður brúkt til postar setting_default_privacy: Hvussu privatir eru postar? setting_default_sensitive: Merk altíð miðlafílur sum viðkvæmar diff --git a/config/locales/simple_form.fr-QC.yml b/config/locales/simple_form.fr-QC.yml index 35ff5d9b4a..010e534045 100644 --- a/config/locales/simple_form.fr-QC.yml +++ b/config/locales/simple_form.fr-QC.yml @@ -200,7 +200,6 @@ fr-QC: setting_always_send_emails: Toujours envoyer les notifications par courriel setting_auto_play_gif: Lire automatiquement les GIFs animés setting_boost_modal: Demander confirmation avant de partager un message - setting_crop_images: Recadrer en 16x9 les images des messages qui ne sont pas ouverts en vue détaillée setting_default_language: Langue de publication setting_default_privacy: Confidentialité des messages setting_default_sensitive: Toujours marquer les médias comme sensibles diff --git a/config/locales/simple_form.fr.yml b/config/locales/simple_form.fr.yml index 756e686650..45494e8748 100644 --- a/config/locales/simple_form.fr.yml +++ b/config/locales/simple_form.fr.yml @@ -200,7 +200,6 @@ fr: setting_always_send_emails: Toujours envoyer les notifications par courriel setting_auto_play_gif: Lire automatiquement les GIFs animés setting_boost_modal: Demander confirmation avant de partager un message - setting_crop_images: Recadrer en 16x9 les images des messages qui ne sont pas ouverts en vue détaillée setting_default_language: Langue de publication setting_default_privacy: Confidentialité des messages setting_default_sensitive: Toujours marquer les médias comme sensibles diff --git a/config/locales/simple_form.fy.yml b/config/locales/simple_form.fy.yml index cc453c2389..ea50164bcb 100644 --- a/config/locales/simple_form.fy.yml +++ b/config/locales/simple_form.fy.yml @@ -200,7 +200,6 @@ fy: setting_always_send_emails: Altyd e-mailmeldingen ferstjoere setting_auto_play_gif: Spylje animearre GIF’s automatysk ôf setting_boost_modal: Freegje foar it boosten fan in berjocht in befêstiging - setting_crop_images: Ofbyldingen bysnije oant 16x9 yn berjochten op tiidlinen setting_default_language: Taal fan jo berjochten setting_default_privacy: Sichtberheid fan nije berjochten setting_default_sensitive: Media altyd as gefoelich markearje diff --git a/config/locales/simple_form.gd.yml b/config/locales/simple_form.gd.yml index 2f31a1c68c..f1b1e06ad1 100644 --- a/config/locales/simple_form.gd.yml +++ b/config/locales/simple_form.gd.yml @@ -200,7 +200,6 @@ gd: setting_always_send_emails: Cuir brathan puist-d an-còmhnaidh setting_auto_play_gif: Cluich GIFs beòthaichte gu fèin-obrachail setting_boost_modal: Seall còmhradh dearbhaidh mus dèan thu brosnachadh - setting_crop_images: Beàrr na dealbhan sna postaichean gun leudachadh air 16x9 setting_default_language: Cànan postaidh setting_default_privacy: Prìobhaideachd postaidh setting_default_sensitive: Cuir comharra ri meadhanan an-còmhnaidh gu bheil iad frionasach diff --git a/config/locales/simple_form.gl.yml b/config/locales/simple_form.gl.yml index 8183020d46..6ca24a2dcd 100644 --- a/config/locales/simple_form.gl.yml +++ b/config/locales/simple_form.gl.yml @@ -200,7 +200,6 @@ gl: setting_always_send_emails: Enviar sempre notificacións por correo electrónico setting_auto_play_gif: Reprodución automática de GIFs animados setting_boost_modal: Solicitar confirmación antes de promover - setting_crop_images: Recortar imaxes a 16x9 en publicacións non despregadas setting_default_language: Idioma de publicación setting_default_privacy: Privacidade da publicación setting_default_sensitive: Marcar sempre multimedia como sensible diff --git a/config/locales/simple_form.he.yml b/config/locales/simple_form.he.yml index 11cb4cea83..994f4bd5d4 100644 --- a/config/locales/simple_form.he.yml +++ b/config/locales/simple_form.he.yml @@ -200,7 +200,6 @@ he: setting_always_send_emails: תמיד שלח התראות לדוא"ל setting_auto_play_gif: ניגון אוטומטי של גיפים setting_boost_modal: הצגת דיאלוג אישור לפני הדהוד - setting_crop_images: קטום תמונות בהודעות לא מורחבות ל 16 על 9 setting_default_language: שפת ברירת מחדל להודעה setting_default_privacy: פרטיות ההודעות setting_default_sensitive: תמיד לתת סימון "רגיש" למדיה diff --git a/config/locales/simple_form.hu.yml b/config/locales/simple_form.hu.yml index b34d8d119a..c9680fd012 100644 --- a/config/locales/simple_form.hu.yml +++ b/config/locales/simple_form.hu.yml @@ -200,7 +200,6 @@ hu: setting_always_send_emails: E-mail értesítések küldése mindig setting_auto_play_gif: GIF-ek automatikus lejátszása setting_boost_modal: Megerősítés kérése megtolás előtt - setting_crop_images: Képek 16x9-re vágása nem kinyitott bejegyzéseknél setting_default_language: Bejegyzések nyelve setting_default_privacy: Bejegyzések láthatósága setting_default_sensitive: Minden médiafájl megjelölése kényesként diff --git a/config/locales/simple_form.hy.yml b/config/locales/simple_form.hy.yml index e8eb741183..c16a0a74f0 100644 --- a/config/locales/simple_form.hy.yml +++ b/config/locales/simple_form.hy.yml @@ -135,7 +135,6 @@ hy: setting_aggregate_reblogs: Տարծածները խմբաւորել հոսքում setting_auto_play_gif: Աւտոմատ մեկնարկել GIFs անիմացիաները setting_boost_modal: Ցուցադրել հաստատման պատուհանը տարածելուց առաջ - setting_crop_images: Ցոյց տալ գրառման նկարը 16x9 համամասնութեամբ setting_default_language: Հրապարակման լեզու setting_default_privacy: Հրապարակման գաղտնիութիւն setting_default_sensitive: Միշտ նշել մեդիան որպէս դիւրազգաց diff --git a/config/locales/simple_form.id.yml b/config/locales/simple_form.id.yml index 4e20b6d964..ae99a256b4 100644 --- a/config/locales/simple_form.id.yml +++ b/config/locales/simple_form.id.yml @@ -188,7 +188,6 @@ id: setting_always_send_emails: Selalu kirim notifikasi email setting_auto_play_gif: Mainkan otomatis animasi GIF setting_boost_modal: Tampilkan dialog konfirmasi dialog sebelum boost - setting_crop_images: Potong gambar ke 16x9 pada toot yang tidak dibentangkan setting_default_language: Bahasa posting setting_default_privacy: Privasi postingan setting_default_sensitive: Selalu tandai media sebagai sensitif diff --git a/config/locales/simple_form.io.yml b/config/locales/simple_form.io.yml index 913fc3b2f1..3291ba4cff 100644 --- a/config/locales/simple_form.io.yml +++ b/config/locales/simple_form.io.yml @@ -186,7 +186,6 @@ io: setting_always_send_emails: Sempre sendez retpostoavizi setting_auto_play_gif: Automate pleez animigita GIFi setting_boost_modal: Montrez konfirmdialogo ante bustar - setting_crop_images: Ektranchez imaji en neexpansigita posti a 16x9 setting_default_language: Postolinguo setting_default_privacy: Videbleso di la mesaji setting_default_sensitive: Sempre markizez medii quale sentoza diff --git a/config/locales/simple_form.is.yml b/config/locales/simple_form.is.yml index 3f42da693b..63f6c436e0 100644 --- a/config/locales/simple_form.is.yml +++ b/config/locales/simple_form.is.yml @@ -200,7 +200,6 @@ is: setting_always_send_emails: Alltaf senda tilkynningar í tölvupósti setting_auto_play_gif: Spila sjálfkrafa GIF-hreyfimyndir setting_boost_modal: Sýna staðfestingarglugga fyrir endurbirtingu - setting_crop_images: Utansníða myndir í ekki-útfelldum færslum í 16x9 setting_default_language: Tungumál sem skrifað er á setting_default_privacy: Gagnaleynd færslna setting_default_sensitive: Alltaf merkja myndefni sem viðkvæmt diff --git a/config/locales/simple_form.it.yml b/config/locales/simple_form.it.yml index 2bca829d30..1bd93243fa 100644 --- a/config/locales/simple_form.it.yml +++ b/config/locales/simple_form.it.yml @@ -200,7 +200,6 @@ it: setting_always_send_emails: Manda sempre notifiche via email setting_auto_play_gif: Riproduci automaticamente le GIF animate setting_boost_modal: Mostra dialogo di conferma prima del boost - setting_crop_images: Ritaglia immagini in post non espansi a 16x9 setting_default_language: Lingua dei post setting_default_privacy: Privacy dei post setting_default_sensitive: Segna sempre i media come sensibili diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index 1eb077c815..4169a9abca 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -200,7 +200,6 @@ ja: setting_always_send_emails: 常にメール通知を送信する setting_auto_play_gif: アニメーションGIFを自動再生する setting_boost_modal: ブーストする前に確認ダイアログを表示する - setting_crop_images: 投稿の詳細以外では画像を16:9に切り抜く setting_default_language: 投稿する言語 setting_default_privacy: 投稿の公開範囲 setting_default_sensitive: メディアを常に閲覧注意としてマークする diff --git a/config/locales/simple_form.kk.yml b/config/locales/simple_form.kk.yml index 7932e54beb..c1c7b4c2fd 100644 --- a/config/locales/simple_form.kk.yml +++ b/config/locales/simple_form.kk.yml @@ -46,7 +46,6 @@ kk: setting_advanced_layout: Кеңейтілген веб-интерфейс қосу setting_auto_play_gif: GIF анимацияларды бірден қосу setting_boost_modal: Бөлісу алдында растау диалогын көрсету - setting_crop_images: Кеңейтілмеген жазбаларда суреттерді 16х9 көлеміне кес setting_default_language: Жазба тілі setting_default_privacy: Жазба құпиялылығы setting_default_sensitive: Медиаларды әрдайым нәзік ретінде белгілеу diff --git a/config/locales/simple_form.ko.yml b/config/locales/simple_form.ko.yml index 6ac99f3a8c..0caecbb992 100644 --- a/config/locales/simple_form.ko.yml +++ b/config/locales/simple_form.ko.yml @@ -200,7 +200,6 @@ ko: setting_always_send_emails: 항상 이메일 알림 보내기 setting_auto_play_gif: 애니메이션 GIF를 자동 재생 setting_boost_modal: 부스트 전 확인 창을 표시 - setting_crop_images: 확장되지 않은 게시물의 이미지를 16x9로 자르기 setting_default_language: 게시물 언어 setting_default_privacy: 게시물 프라이버시 setting_default_sensitive: 미디어를 언제나 민감한 콘텐츠로 설정 diff --git a/config/locales/simple_form.ku.yml b/config/locales/simple_form.ku.yml index 295de7aff9..9194c8b122 100644 --- a/config/locales/simple_form.ku.yml +++ b/config/locales/simple_form.ku.yml @@ -190,7 +190,6 @@ ku: setting_always_send_emails: Her dem agahdariya e-nameyê bişîne setting_auto_play_gif: GIF ên livok bi xweber bilîzine setting_boost_modal: Gotûbêja pejirandinê nîşan bide berî ku şandî werê bilindkirin - setting_crop_images: Wêneyên di nav şandiyên ku nehatine berfireh kirin wek 16×9 jê bike setting_default_language: Zimanê weşanê setting_default_privacy: Ewlehiya weşanê setting_default_sensitive: Her dem medya wek hestyar bide nîşan diff --git a/config/locales/simple_form.lv.yml b/config/locales/simple_form.lv.yml index 746e4bab80..ab0decf986 100644 --- a/config/locales/simple_form.lv.yml +++ b/config/locales/simple_form.lv.yml @@ -195,7 +195,6 @@ lv: setting_always_send_emails: Vienmēr sūtīt e-pasta paziņojumus setting_auto_play_gif: Automātiski atskaņot animētos GIF setting_boost_modal: Rādīt apstiprinājuma dialogu pirms izcelšanas - setting_crop_images: Apgrieziet attēlus neizvērstajās ziņās līdz 16x9 setting_default_language: Publicēšanas valoda setting_default_privacy: Publicēšanas privātums setting_default_sensitive: Atļaut atzīmēt multividi kā sensitīvu diff --git a/config/locales/simple_form.my.yml b/config/locales/simple_form.my.yml index 0f374739b6..fc41c27f81 100644 --- a/config/locales/simple_form.my.yml +++ b/config/locales/simple_form.my.yml @@ -200,7 +200,6 @@ my: setting_always_send_emails: အီးမေးလ်သတိပေးချက်များကို အမြဲပို့ပါ setting_auto_play_gif: ကာတွန်း GIF များကို အလိုအလျောက်ဖွင့်ပါ setting_boost_modal: Boost မလုပ်မီ အတည်ပြုချက်ပြပါ - setting_crop_images: အကျယ်မချဲ့ထားသော စာစုများတွင် ပုံများကို ၁၆း၉ အရွယ် ဖြတ်တောက်ပါ။ setting_default_language: ပို့စ်တင်မည့်ဘာသာစကား setting_default_privacy: ပို့စ်ကို ဘယ်သူမြင်နိုင်မလဲ setting_default_sensitive: သတိထားရသောမီဒီယာအဖြစ် အမြဲအမှတ်အသားပြုပါ diff --git a/config/locales/simple_form.nl.yml b/config/locales/simple_form.nl.yml index 6e53821e83..d58a55e9ad 100644 --- a/config/locales/simple_form.nl.yml +++ b/config/locales/simple_form.nl.yml @@ -200,7 +200,6 @@ nl: setting_always_send_emails: Altijd e-mailmeldingen verzenden setting_auto_play_gif: Geanimeerde GIF's automatisch afspelen setting_boost_modal: Vraag voor het boosten van een bericht een bevestiging - setting_crop_images: Afbeeldingen in tijdlijnberichten bijsnijden tot 16x9 setting_default_language: Taal van jouw berichten setting_default_privacy: Zichtbaarheid van nieuwe berichten setting_default_sensitive: Media altijd als gevoelig markeren diff --git a/config/locales/simple_form.nn.yml b/config/locales/simple_form.nn.yml index 79e8af774a..a8e9f474bc 100644 --- a/config/locales/simple_form.nn.yml +++ b/config/locales/simple_form.nn.yml @@ -195,7 +195,6 @@ nn: setting_always_send_emails: Alltid send epostvarsel setting_auto_play_gif: Spel av animerte GIF-ar automatisk setting_boost_modal: Vis stadfesting før framheving - setting_crop_images: Skjer bilete i ikkje-utvida tut til 16x9 setting_default_language: Språk på innlegg setting_default_privacy: Privatliv setting_default_sensitive: Merk alltid media som nærtakande diff --git a/config/locales/simple_form.no.yml b/config/locales/simple_form.no.yml index 41866f6839..6889638fa5 100644 --- a/config/locales/simple_form.no.yml +++ b/config/locales/simple_form.no.yml @@ -183,7 +183,6 @@ setting_always_send_emails: Alltid send e-postvarslinger setting_auto_play_gif: Autoavspill animert GIF-filer setting_boost_modal: Vis bekreftelse før fremheving - setting_crop_images: Klipp bilder i ikke-utvidede innlegg til 16:9 setting_default_language: Innleggsspråk setting_default_privacy: Postintegritet setting_default_sensitive: Merk alltid media som følsomt diff --git a/config/locales/simple_form.oc.yml b/config/locales/simple_form.oc.yml index 6b5f2e2ddd..32ecbf34cf 100644 --- a/config/locales/simple_form.oc.yml +++ b/config/locales/simple_form.oc.yml @@ -139,7 +139,6 @@ oc: setting_always_send_emails: Totjorn enviar los corrièls de notificacion setting_auto_play_gif: Lectura automatica dels GIFS animats setting_boost_modal: Mostrar una fenèstra de confirmacion abans de partejar un estatut - setting_crop_images: Retalhar los imatges dins los tuts pas desplegats a 16x9 setting_default_language: Lenga de publicacion setting_default_privacy: Confidencialitat dels tuts setting_default_sensitive: Totjorn marcar los mèdias coma sensibles diff --git a/config/locales/simple_form.pl.yml b/config/locales/simple_form.pl.yml index 89c8f3d7ae..64acdb09ac 100644 --- a/config/locales/simple_form.pl.yml +++ b/config/locales/simple_form.pl.yml @@ -200,7 +200,6 @@ pl: setting_always_send_emails: Zawsze wysyłaj powiadomienia e-mail setting_auto_play_gif: Automatycznie odtwarzaj animowane GIFy setting_boost_modal: Pytaj o potwierdzenie przed podbiciem - setting_crop_images: Przycinaj obrazki w nierozwiniętych wpisach do 16x9 setting_default_language: Język wpisów setting_default_privacy: Widoczność wpisów setting_default_sensitive: Zawsze oznaczaj zawartość multimedialną jako wrażliwą diff --git a/config/locales/simple_form.pt-BR.yml b/config/locales/simple_form.pt-BR.yml index 0af041dd98..46cf516032 100644 --- a/config/locales/simple_form.pt-BR.yml +++ b/config/locales/simple_form.pt-BR.yml @@ -200,7 +200,6 @@ pt-BR: setting_always_send_emails: Sempre enviar notificações por e-mail setting_auto_play_gif: Reproduzir GIFs automaticamente setting_boost_modal: Solicitar confirmação antes de dar boost - setting_crop_images: Cortar imagens no formato 16x9 em publicações não expandidas setting_default_language: Idioma dos toots setting_default_privacy: Privacidade dos toots setting_default_sensitive: Sempre marcar mídia como sensível diff --git a/config/locales/simple_form.pt-PT.yml b/config/locales/simple_form.pt-PT.yml index dbdf77c9b1..951a3850bf 100644 --- a/config/locales/simple_form.pt-PT.yml +++ b/config/locales/simple_form.pt-PT.yml @@ -200,7 +200,6 @@ pt-PT: setting_always_send_emails: Enviar sempre notificações de email setting_auto_play_gif: Reproduzir GIF automaticamente setting_boost_modal: Solicitar confirmação antes de partilhar uma publicação - setting_crop_images: Recortar imagens para o formato 16x9 nas publicações não expandidas setting_default_language: Língua de publicação setting_default_privacy: Privacidade da publicação setting_default_sensitive: Marcar sempre os media como problemáticos diff --git a/config/locales/simple_form.ro.yml b/config/locales/simple_form.ro.yml index c76cf89cf1..d894cc0cea 100644 --- a/config/locales/simple_form.ro.yml +++ b/config/locales/simple_form.ro.yml @@ -124,7 +124,6 @@ ro: setting_aggregate_reblogs: Grupează impulsurile în fluxuri setting_auto_play_gif: Redă automat animațiile GIF setting_boost_modal: Arată dialogul de confirmare înainte de a impulsiona - setting_crop_images: Decupează imaginile în postările non-extinse la 16x9 setting_default_language: În ce limbă postezi setting_default_privacy: Cine vede postările tale setting_default_sensitive: Întotdeauna marchează conținutul media ca fiind sensibil diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml index e23fef979c..a848a4b11c 100644 --- a/config/locales/simple_form.ru.yml +++ b/config/locales/simple_form.ru.yml @@ -195,7 +195,6 @@ ru: setting_always_send_emails: Всегда отправлять уведомления по электронной почте setting_auto_play_gif: Автоматически проигрывать GIF анимации setting_boost_modal: Всегда спрашивать перед продвижением - setting_crop_images: Кадрировать изображения в нераскрытых постах до 16:9 setting_default_language: Язык публикуемых постов setting_default_privacy: Видимость постов setting_default_sensitive: Всегда отмечать медиафайлы как «деликатного характера» diff --git a/config/locales/simple_form.sc.yml b/config/locales/simple_form.sc.yml index ad768a66d8..09a55eed5b 100644 --- a/config/locales/simple_form.sc.yml +++ b/config/locales/simple_form.sc.yml @@ -141,7 +141,6 @@ sc: setting_aggregate_reblogs: Agrupa is cumpartziduras in is lìnias de tempus setting_auto_play_gif: Riprodui is GIF animadas in automàticu setting_boost_modal: Ammustra unu diàlogu de cunfirma in antis de cumpartzire - setting_crop_images: Retàllia a 16x9 is immàgines de is tuts no ismanniados setting_default_language: Idioma de publicatzione setting_default_privacy: Riservadesa de is publicatziones setting_default_sensitive: Marca semper is elementos multimediales comente sensìbiles diff --git a/config/locales/simple_form.sco.yml b/config/locales/simple_form.sco.yml index b061aa76d7..eb8128cd4a 100644 --- a/config/locales/simple_form.sco.yml +++ b/config/locales/simple_form.sco.yml @@ -188,7 +188,6 @@ sco: setting_always_send_emails: Aye sen email notifications setting_auto_play_gif: Auto-pley animatit GIFs setting_boost_modal: Shaw confirmation dialog afore heezin - setting_crop_images: Crap images in non-expandit posts tae 16x9 setting_default_language: Postin leid setting_default_privacy: Postin privacy setting_default_sensitive: Aye mairk media as sensitive diff --git a/config/locales/simple_form.si.yml b/config/locales/simple_form.si.yml index a2571dcb1e..9835b126a2 100644 --- a/config/locales/simple_form.si.yml +++ b/config/locales/simple_form.si.yml @@ -157,7 +157,6 @@ si: setting_always_send_emails: සෑම විටම විද්‍යුත් තැපැල් දැනුම්දීම් යවන්න setting_auto_play_gif: සජීවිකරණ GIF ස්වයංක්‍රීයව ධාවනය කරන්න setting_boost_modal: වැඩි කිරීමට පෙර තහවුරු කිරීමේ සංවාදය පෙන්වන්න - setting_crop_images: ප්‍රසාරණය නොකළ පළ කිරීම් වල පින්තූර 16x9 දක්වා කප්පාදු කරන්න setting_default_language: පළ කිරීමේ භාෂාව setting_default_privacy: පුද්ගලිකත්වය පළ කිරීම setting_default_sensitive: සෑම විටම මාධ්‍ය සංවේදී ලෙස සලකුණු කරන්න diff --git a/config/locales/simple_form.sk.yml b/config/locales/simple_form.sk.yml index 3cadada4fa..fe9f16eb92 100644 --- a/config/locales/simple_form.sk.yml +++ b/config/locales/simple_form.sk.yml @@ -117,7 +117,6 @@ sk: setting_aggregate_reblogs: Zoskupuj vyzdvihnutia v časovej osi setting_auto_play_gif: Automaticky prehrávaj animované GIFy setting_boost_modal: Zobrazuj potvrdzovacie okno pred povýšením - setting_crop_images: Orež obrázky v nerozbalených príspevkoch na 16x9 setting_default_language: Píšeš v jazyku setting_default_privacy: Súkromie príspevkov setting_default_sensitive: Označ všetky mediálne súbory ako chúlostivé diff --git a/config/locales/simple_form.sl.yml b/config/locales/simple_form.sl.yml index c1f5c64488..180835c37c 100644 --- a/config/locales/simple_form.sl.yml +++ b/config/locales/simple_form.sl.yml @@ -198,7 +198,6 @@ sl: setting_always_send_emails: Vedno pošlji e-obvestila setting_auto_play_gif: Samodejno predvajanje animiranih GIF-ov setting_boost_modal: Pred izpostavljanjem pokaži potrditveno okno - setting_crop_images: Obreži slike v nerazširjenih objavah v razmerju 16:9 setting_default_language: Jezik objavljanja setting_default_privacy: Zasebnost objave setting_default_sensitive: Vedno označi medije kot občutljive diff --git a/config/locales/simple_form.sq.yml b/config/locales/simple_form.sq.yml index ea022a493c..496d752ebf 100644 --- a/config/locales/simple_form.sq.yml +++ b/config/locales/simple_form.sq.yml @@ -200,7 +200,6 @@ sq: setting_always_send_emails: Dërgo përherë njoftime me email setting_auto_play_gif: Vetëluaji GIF-et e animuar setting_boost_modal: Shfaq dialog ripohimi përpara përforcimi - setting_crop_images: Në mesazhe jo të zgjerueshëm, qethi figurat në 16x9 setting_default_language: Gjuhë postimi setting_default_privacy: Privatësi postimi setting_default_sensitive: Mediave vëru përherë shenjë si rezervat diff --git a/config/locales/simple_form.sr-Latn.yml b/config/locales/simple_form.sr-Latn.yml index 5289f66067..d7e05ecb84 100644 --- a/config/locales/simple_form.sr-Latn.yml +++ b/config/locales/simple_form.sr-Latn.yml @@ -200,7 +200,6 @@ sr-Latn: setting_always_send_emails: Uvek šalji obaveštenja e-poštom setting_auto_play_gif: Automatski reprodukuj animirane GIF-ove setting_boost_modal: Prikaži dijalog za potvrdu pre davanja podrške - setting_crop_images: Izreži slike u neproširenim objavama na 16x9 setting_default_language: Jezik objavljivanja setting_default_privacy: Privatnost objava setting_default_sensitive: Uvek označi multimediju kao osetljivu diff --git a/config/locales/simple_form.sr.yml b/config/locales/simple_form.sr.yml index 800e2d56b0..b4a96f9808 100644 --- a/config/locales/simple_form.sr.yml +++ b/config/locales/simple_form.sr.yml @@ -200,7 +200,6 @@ sr: setting_always_send_emails: Увек шаљи обавештења е-поштом setting_auto_play_gif: Аутоматски репродукуј анимиране GIF-ове setting_boost_modal: Прикажи дијалог за потврду пре давања подршке - setting_crop_images: Изрежи слике у непроширеним објавама на 16x9 setting_default_language: Језик објављивања setting_default_privacy: Приватност објава setting_default_sensitive: Увек означи мултимедију као осетљиву diff --git a/config/locales/simple_form.sv.yml b/config/locales/simple_form.sv.yml index bad46443f6..b4b8f262f1 100644 --- a/config/locales/simple_form.sv.yml +++ b/config/locales/simple_form.sv.yml @@ -195,7 +195,6 @@ sv: setting_always_send_emails: Skicka alltid e-postnotiser setting_auto_play_gif: Spela upp GIF:ar automatiskt setting_boost_modal: Visa bekräftelsedialog innan boostning - setting_crop_images: Beskär bilder i icke-utökade inlägg till 16x9 setting_default_language: Inläggsspråk setting_default_privacy: Inläggsintegritet setting_default_sensitive: Markera alltid media som känsligt diff --git a/config/locales/simple_form.th.yml b/config/locales/simple_form.th.yml index 9d20263c78..b752f0d002 100644 --- a/config/locales/simple_form.th.yml +++ b/config/locales/simple_form.th.yml @@ -200,7 +200,6 @@ th: setting_always_send_emails: ส่งการแจ้งเตือนอีเมลเสมอ setting_auto_play_gif: เล่น GIF แบบเคลื่อนไหวโดยอัตโนมัติ setting_boost_modal: แสดงกล่องโต้ตอบการยืนยันก่อนดัน - setting_crop_images: ครอบตัดภาพในโพสต์ที่ไม่ได้ขยายเป็น 16x9 setting_default_language: ภาษาของการโพสต์ setting_default_privacy: ความเป็นส่วนตัวของการโพสต์ setting_default_sensitive: ทำเครื่องหมายสื่อว่าละเอียดอ่อนเสมอ diff --git a/config/locales/simple_form.tr.yml b/config/locales/simple_form.tr.yml index ec71034d51..778b3df487 100644 --- a/config/locales/simple_form.tr.yml +++ b/config/locales/simple_form.tr.yml @@ -200,7 +200,6 @@ tr: setting_always_send_emails: Her zaman e-posta bildirimleri gönder setting_auto_play_gif: Hareketli GIF'leri otomatik oynat setting_boost_modal: Boostlamadan önce onay iletişim kutusu göster - setting_crop_images: Genişletilmemiş gönderilerdeki resimleri 16x9 olarak kırp setting_default_language: Gönderi dili setting_default_privacy: Gönderi gizliliği setting_default_sensitive: Medyayı her zaman hassas olarak işaretle diff --git a/config/locales/simple_form.uk.yml b/config/locales/simple_form.uk.yml index 0fd4a5e967..e1401f4d41 100644 --- a/config/locales/simple_form.uk.yml +++ b/config/locales/simple_form.uk.yml @@ -203,7 +203,6 @@ uk: setting_always_send_emails: Завжди надсилати сповіщення електронною поштою setting_auto_play_gif: Автоматично відтворювати анімовані GIF setting_boost_modal: Показувати діалог підтвердження під час поширення - setting_crop_images: Обрізати зображення в нерозгорнутих дописах до 16x9 setting_default_language: Мова дописів setting_default_privacy: Видимість дописів setting_default_sensitive: Позначати медіа делікатними diff --git a/config/locales/simple_form.vi.yml b/config/locales/simple_form.vi.yml index fa17b05b17..243d7a133b 100644 --- a/config/locales/simple_form.vi.yml +++ b/config/locales/simple_form.vi.yml @@ -200,7 +200,6 @@ vi: setting_always_send_emails: Luôn gửi email thông báo setting_auto_play_gif: Tự động phát ảnh GIF setting_boost_modal: Yêu cầu xác nhận trước khi đăng lại tút - setting_crop_images: Hiển thị ảnh theo tỉ lệ 16x9 setting_default_language: Ngôn ngữ đăng setting_default_privacy: Kiểu đăng setting_default_sensitive: Ảnh/video là nội dung nhạy cảm diff --git a/config/locales/simple_form.zh-CN.yml b/config/locales/simple_form.zh-CN.yml index 5579423364..607c4ac2c8 100644 --- a/config/locales/simple_form.zh-CN.yml +++ b/config/locales/simple_form.zh-CN.yml @@ -200,7 +200,6 @@ zh-CN: setting_always_send_emails: 总是发送电子邮件通知 setting_auto_play_gif: 自动播放 GIF 动画 setting_boost_modal: 在转嘟前询问我 - setting_crop_images: 把未展开嘟文中的图片裁剪到 16x9 setting_default_language: 发布语言 setting_default_privacy: 嘟文默认可见范围 setting_default_sensitive: 始终标记媒体为敏感内容 diff --git a/config/locales/simple_form.zh-HK.yml b/config/locales/simple_form.zh-HK.yml index 0f18d1fc9d..92b7b906e7 100644 --- a/config/locales/simple_form.zh-HK.yml +++ b/config/locales/simple_form.zh-HK.yml @@ -194,7 +194,6 @@ zh-HK: setting_always_send_emails: 總是傳送電郵通知 setting_auto_play_gif: 自動播放 GIF setting_boost_modal: 在轉推前詢問我 - setting_crop_images: 將未展開文章中的圖片裁剪到 16x9 setting_default_language: 文章語言 setting_default_privacy: 文章預設為 setting_default_sensitive: 預設我的內容為敏感內容 diff --git a/config/locales/simple_form.zh-TW.yml b/config/locales/simple_form.zh-TW.yml index f705cd8e76..1485e23f4d 100644 --- a/config/locales/simple_form.zh-TW.yml +++ b/config/locales/simple_form.zh-TW.yml @@ -200,7 +200,6 @@ zh-TW: setting_always_send_emails: 總是發送電子郵件通知 setting_auto_play_gif: 自動播放 GIF 動畫 setting_boost_modal: 轉嘟前先詢問我 - setting_crop_images: 將未展開嘟文中的圖片裁剪至 16x9 setting_default_language: 嘟文語言 setting_default_privacy: 嘟文可見範圍 setting_default_sensitive: 總是將媒體標記為敏感內容 diff --git a/config/locales/sk.yml b/config/locales/sk.yml index 2838d86489..a98a97d1c5 100644 --- a/config/locales/sk.yml +++ b/config/locales/sk.yml @@ -684,7 +684,6 @@ sk: body: Mastodon je prekladaný dobrovoľníkmi. guide_link_text: Prispievať môže každý. sensitive_content: Chúlostivý obsah - toot_layout: Rozloženie príspevkov application_mailer: notification_preferences: Zmeň emailové voľby settings: 'Zmeň emailové voľby: %{link}' diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 2f6e3551d8..8295425540 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -1002,7 +1002,6 @@ sl: guide_link: https://crowdin.com/project/mastodon guide_link_text: Vsakdo lahko prispeva. sensitive_content: Občutljiva vsebina - toot_layout: Postavitev objave application_mailer: notification_preferences: Spremenite e-poštne nastavitve salutation: "%{name}," diff --git a/config/locales/sq.yml b/config/locales/sq.yml index 7994029c2f..11b9a7f4c8 100644 --- a/config/locales/sq.yml +++ b/config/locales/sq.yml @@ -973,7 +973,6 @@ sq: guide_link: https://crowdin.com/project/mastodon guide_link_text: Çdokush mund të kontribuojë. sensitive_content: Lëndë rezervat - toot_layout: Skemë mesazhesh application_mailer: notification_preferences: Ndryshoni parapëlqime email-i salutation: "%{name}," diff --git a/config/locales/sr-Latn.yml b/config/locales/sr-Latn.yml index 3c055392b8..f34692b579 100644 --- a/config/locales/sr-Latn.yml +++ b/config/locales/sr-Latn.yml @@ -991,7 +991,6 @@ sr-Latn: guide_link: https://crowdin.com/project/mastodon guide_link_text: Svako može doprineti. sensitive_content: Osetljiv sadržaj - toot_layout: Raspored objava application_mailer: notification_preferences: Promeni preference E-pošte salutation: Poštovani %{name}, diff --git a/config/locales/sr.yml b/config/locales/sr.yml index 132e9468b7..bd216aff42 100644 --- a/config/locales/sr.yml +++ b/config/locales/sr.yml @@ -991,7 +991,6 @@ sr: guide_link: https://crowdin.com/project/mastodon guide_link_text: Свако може допринети. sensitive_content: Осетљив садржај - toot_layout: Распоред објава application_mailer: notification_preferences: Промени преференце Е-поште salutation: Поштовани %{name}, diff --git a/config/locales/sv.yml b/config/locales/sv.yml index 5836d21bfb..c8c1e4868f 100644 --- a/config/locales/sv.yml +++ b/config/locales/sv.yml @@ -963,7 +963,6 @@ sv: guide_link: https://crowdin.com/project/mastodon guide_link_text: Alla kan bidra. sensitive_content: Känsligt innehåll - toot_layout: Inläggslayout application_mailer: notification_preferences: Ändra e-postinställningar salutation: "%{name}," diff --git a/config/locales/th.yml b/config/locales/th.yml index 2ceadc9b0f..9a034126ad 100644 --- a/config/locales/th.yml +++ b/config/locales/th.yml @@ -955,7 +955,6 @@ th: guide_link: https://crowdin.com/project/mastodon/th guide_link_text: ทุกคนสามารถมีส่วนร่วม sensitive_content: เนื้อหาที่ละเอียดอ่อน - toot_layout: เค้าโครงโพสต์ application_mailer: notification_preferences: เปลี่ยนการกำหนดลักษณะอีเมล salutation: "%{name}," diff --git a/config/locales/tr.yml b/config/locales/tr.yml index 71b76c8934..e16ba9abbc 100644 --- a/config/locales/tr.yml +++ b/config/locales/tr.yml @@ -973,7 +973,6 @@ tr: guide_link: https://crowdin.com/project/mastodon guide_link_text: Herkes katkıda bulunabilir. sensitive_content: Hassas içerik - toot_layout: Gönderi düzeni application_mailer: notification_preferences: E-posta tercihlerini değiştir salutation: "%{name}," diff --git a/config/locales/uk.yml b/config/locales/uk.yml index b0df7108fe..280b423cb0 100644 --- a/config/locales/uk.yml +++ b/config/locales/uk.yml @@ -1009,7 +1009,6 @@ uk: guide_link: https://uk.crowdin.com/project/mastodon guide_link_text: Кожен може взяти участь. sensitive_content: Дражливий зміст - toot_layout: Зовнішній вигляд дописів application_mailer: notification_preferences: Змінити налаштування електронної пошти salutation: "%{name}," diff --git a/config/locales/vi.yml b/config/locales/vi.yml index 7a64be31ed..5ee9761745 100644 --- a/config/locales/vi.yml +++ b/config/locales/vi.yml @@ -955,7 +955,6 @@ vi: guide_link: https://crowdin.com/project/mastodon guide_link_text: Ai cũng có thể đóng góp. sensitive_content: Nội dung nhạy cảm - toot_layout: Tút application_mailer: notification_preferences: Thay đổi tùy chọn email salutation: "%{name}," diff --git a/config/locales/zh-CN.yml b/config/locales/zh-CN.yml index 8f7c7a5ce6..a6b77fc667 100644 --- a/config/locales/zh-CN.yml +++ b/config/locales/zh-CN.yml @@ -955,7 +955,6 @@ zh-CN: guide_link: https://crowdin.com/project/mastodon guide_link_text: 每个人都可以参与翻译。 sensitive_content: 敏感内容 - toot_layout: 嘟文布局 application_mailer: notification_preferences: 更改电子邮件首选项 salutation: "%{name}:" diff --git a/config/locales/zh-HK.yml b/config/locales/zh-HK.yml index 37023eede7..23de5f830b 100644 --- a/config/locales/zh-HK.yml +++ b/config/locales/zh-HK.yml @@ -941,7 +941,6 @@ zh-HK: guide_link: https://crowdin.com/project/mastodon guide_link_text: 每個人都能貢獻。 sensitive_content: 敏感內容 - toot_layout: 發文介面 application_mailer: notification_preferences: 更改電郵設定 salutation: "%{name}:" diff --git a/config/locales/zh-TW.yml b/config/locales/zh-TW.yml index 349970cd47..833fba11fb 100644 --- a/config/locales/zh-TW.yml +++ b/config/locales/zh-TW.yml @@ -959,7 +959,6 @@ zh-TW: guide_link: https://crowdin.com/project/mastodon guide_link_text: 每個人都能貢獻。 sensitive_content: 敏感內容 - toot_layout: 嘟文排版 application_mailer: notification_preferences: 變更電子郵件設定 salutation: "%{name}、" From 6b2952d1dd2c21a8a8854f1df5fa532f8fed5af4 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 24 Jul 2023 13:47:28 +0200 Subject: [PATCH 76/90] Change design of link previews in web UI (#26136) --- .../features/status/components/card.jsx | 39 +++--- app/javascript/mastodon/locales/en.json | 1 + .../styles/mastodon-light/diff.scss | 6 +- .../styles/mastodon-light/variables.scss | 2 +- .../styles/mastodon/components.scss | 130 ++++++++---------- app/lib/link_details_extractor.rb | 5 + .../rest/preview_card_serializer.rb | 6 +- 7 files changed, 90 insertions(+), 99 deletions(-) diff --git a/app/javascript/mastodon/features/status/components/card.jsx b/app/javascript/mastodon/features/status/components/card.jsx index d23bbf16a7..7cf324760e 100644 --- a/app/javascript/mastodon/features/status/components/card.jsx +++ b/app/javascript/mastodon/features/status/components/card.jsx @@ -12,6 +12,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import { Blurhash } from 'mastodon/components/blurhash'; import { Icon } from 'mastodon/components/icon'; +import { RelativeTimestamp } from 'mastodon/components/relative_timestamp'; import { useBlurhash } from 'mastodon/initial_state'; const IDNA_PREFIX = 'xn--'; @@ -57,14 +58,9 @@ export default class Card extends PureComponent { static propTypes = { card: ImmutablePropTypes.map, onOpenMedia: PropTypes.func.isRequired, - compact: PropTypes.bool, sensitive: PropTypes.bool, }; - static defaultProps = { - compact: false, - }; - state = { previewLoaded: false, embedded: false, @@ -148,7 +144,7 @@ export default class Card extends PureComponent { } render () { - const { card, compact } = this.props; + const { card } = this.props; const { embedded, revealed } = this.state; if (card === null) { @@ -156,29 +152,24 @@ export default class Card extends PureComponent { } const provider = card.get('provider_name').length === 0 ? decodeIDNA(getHostname(card.get('url'))) : card.get('provider_name'); - const horizontal = (!compact && card.get('width') > card.get('height')) || card.get('type') !== 'link' || embedded; const interactive = card.get('type') !== 'link'; - const className = classnames('status-card', { horizontal, compact, interactive }); - const title = interactive ? {card.get('title')} : {card.get('title')}; const language = card.get('language') || ''; const description = (
- {title} - {!(horizontal || compact) &&

{card.get('description')}

} - {provider} + {provider}{card.get('published_at') && <> · } + {card.get('title')} + {card.get('author_name').length > 0 && {card.get('author_name')} }} />}
); const thumbnailStyle = { - visibility: revealed? null : 'hidden', + visibility: revealed ? null : 'hidden', + aspectRatio: `${card.get('width')} / ${card.get('height')}` }; - if (horizontal) { - thumbnailStyle.aspectRatio = (compact && !embedded) ? '16 / 9' : `${card.get('width')} / ${card.get('height')}`; - } + let embed; - let embed = ''; let canvas = ( ); + let thumbnail = ; + let spoilerButton = ( ); + spoilerButton = (
{spoilerButton} @@ -219,19 +213,20 @@ export default class Card extends PureComponent {
- {horizontal && } +
)} + {!revealed && spoilerButton}
); } return ( -
+
{embed} - {!compact && description} + {description}
); } else if (card.get('image')) { @@ -243,14 +238,14 @@ export default class Card extends PureComponent { ); } else { embed = ( -
+
); } return ( - + {embed} {description} diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json index cf4e802eb4..cc9bffd80f 100644 --- a/app/javascript/mastodon/locales/en.json +++ b/app/javascript/mastodon/locales/en.json @@ -363,6 +363,7 @@ "lightbox.previous": "Previous", "limited_account_hint.action": "Show profile anyway", "limited_account_hint.title": "This profile has been hidden by the moderators of {domain}.", + "link_preview.author": "By {name}", "lists.account.add": "Add to list", "lists.account.remove": "Remove from list", "lists.delete": "Delete list", diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss index f7835ac2f4..df89d9a5a5 100644 --- a/app/javascript/styles/mastodon-light/diff.scss +++ b/app/javascript/styles/mastodon-light/diff.scss @@ -77,6 +77,10 @@ html { background: $white; } +.column-header { + border-bottom: 0; +} + .column-header__button.active { color: $ui-highlight-color; @@ -414,7 +418,7 @@ html { .column-header__collapsible-inner { background: darken($ui-base-color, 4%); border: 1px solid lighten($ui-base-color, 8%); - border-top: 0; + border-bottom: 0; } .dashboard__quick-access, diff --git a/app/javascript/styles/mastodon-light/variables.scss b/app/javascript/styles/mastodon-light/variables.scss index 250e200fc6..ac8a831215 100644 --- a/app/javascript/styles/mastodon-light/variables.scss +++ b/app/javascript/styles/mastodon-light/variables.scss @@ -5,7 +5,7 @@ $white: #ffffff; $classic-base-color: #282c37; $classic-primary-color: #9baec8; $classic-secondary-color: #d9e1e8; -$classic-highlight-color: #6364ff; +$classic-highlight-color: #858afa; $blurple-600: #563acc; // Iris $blurple-500: #6364ff; // Brand purple diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 64c245de34..b06a7130f8 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -252,13 +252,14 @@ &.overlayed { box-sizing: content-box; - background: rgba($base-overlay-background, 0.6); - color: rgba($primary-text-color, 0.7); + background: rgba($black, 0.65); + backdrop-filter: blur(10px) saturate(180%) contrast(75%) brightness(70%); + color: rgba($white, 0.7); border-radius: 4px; padding: 2px; &:hover { - background: rgba($base-overlay-background, 0.9); + background: rgba($black, 0.9); } } @@ -1352,6 +1353,10 @@ body > [data-popper-placement] { } } +.scrollable > div:first-child .detailed-status { + border-top: 0; +} + .detailed-status__meta { margin-top: 16px; color: $dark-text-color; @@ -3504,12 +3509,10 @@ button.icon-button.active i.fa-retweet { } .status-card { + display: block; position: relative; - display: flex; font-size: 14px; - border: 1px solid lighten($ui-base-color, 8%); - border-radius: 4px; - color: $dark-text-color; + color: $darker-text-color; margin-top: 14px; text-decoration: none; overflow: hidden; @@ -3563,8 +3566,29 @@ button.icon-button.active i.fa-retweet { a.status-card { cursor: pointer; - &:hover { - background: lighten($ui-base-color, 8%); + &:hover, + &:focus, + &:active { + .status-card__title, + .status-card__host, + .status-card__author { + color: $highlight-text-color; + } + } +} + +.status-card a { + color: inherit; + text-decoration: none; + + &:hover, + &:focus, + &:active { + .status-card__title, + .status-card__host, + .status-card__author { + color: $highlight-text-color; + } } } @@ -3590,42 +3614,42 @@ a.status-card { .status-card__title { display: block; - font-weight: 500; - margin-bottom: 5px; - color: $darker-text-color; + font-weight: 700; + font-size: 19px; + line-height: 24px; + color: $primary-text-color; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - text-decoration: none; } .status-card__content { flex: 1 1 auto; overflow: hidden; - padding: 14px 14px 14px 8px; -} - -.status-card__description { - color: $darker-text-color; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 2; + padding: 15px 0; + padding-bottom: 0; } .status-card__host { display: block; - margin-top: 5px; - font-size: 13px; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; + font-size: 14px; + margin-bottom: 8px; +} + +.status-card__author { + display: block; + margin-top: 8px; + font-size: 14px; + color: $primary-text-color; + + strong { + font-weight: 500; + } } .status-card__image { - flex: 0 0 100px; + width: 100%; background: lighten($ui-base-color, 8%); position: relative; + border-radius: 8px; & > .fa { font-size: 21px; @@ -3637,50 +3661,8 @@ a.status-card { } } -.status-card.horizontal { - display: block; - - .status-card__image { - width: 100%; - } - - .status-card__image-image, - .status-card__image-preview { - border-radius: 4px 4px 0 0; - } - - .status-card__title { - white-space: inherit; - } -} - -.status-card.compact { - border-color: lighten($ui-base-color, 4%); - - &.interactive { - border: 0; - } - - .status-card__content { - padding: 8px; - padding-top: 10px; - } - - .status-card__title { - white-space: nowrap; - } - - .status-card__image { - flex: 0 0 60px; - } -} - -a.status-card.compact:hover { - background-color: lighten($ui-base-color, 4%); -} - .status-card__image-image { - border-radius: 4px 0 0 4px; + border-radius: 8px; display: block; margin: 0; width: 100%; @@ -3691,7 +3673,7 @@ a.status-card.compact:hover { } .status-card__image-preview { - border-radius: 4px 0 0 4px; + border-radius: 8px; display: block; margin: 0; width: 100%; diff --git a/app/lib/link_details_extractor.rb b/app/lib/link_details_extractor.rb index f0aeec0b3e..a350cadf90 100644 --- a/app/lib/link_details_extractor.rb +++ b/app/lib/link_details_extractor.rb @@ -124,6 +124,7 @@ class LinkDetailsExtractor author_url: author_url || '', embed_url: embed_url || '', language: language, + created_at: published_at, } end @@ -159,6 +160,10 @@ class LinkDetailsExtractor html_entities.decode(structured_data&.description || opengraph_tag('og:description') || meta_tag('description')) end + def published_at + structured_data&.date_published || opengraph_tag('article:published_time') + end + def image valid_url_or_nil(opengraph_tag('og:image')) end diff --git a/app/serializers/rest/preview_card_serializer.rb b/app/serializers/rest/preview_card_serializer.rb index 08bc07edd4..db44abb382 100644 --- a/app/serializers/rest/preview_card_serializer.rb +++ b/app/serializers/rest/preview_card_serializer.rb @@ -6,7 +6,7 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer attributes :url, :title, :description, :language, :type, :author_name, :author_url, :provider_name, :provider_url, :html, :width, :height, - :image, :embed_url, :blurhash + :image, :embed_url, :blurhash, :published_at def image object.image? ? full_asset_url(object.image.url(:original)) : nil @@ -15,4 +15,8 @@ class REST::PreviewCardSerializer < ActiveModel::Serializer def html Sanitize.fragment(object.html, Sanitize::Config::MASTODON_OEMBED) end + + def published_at + object.created_at + end end From 80809ef33efcb80e18ff2193eb6ec30b3bb0fdf7 Mon Sep 17 00:00:00 2001 From: Trevor Wolf Date: Mon, 24 Jul 2023 21:48:09 +1000 Subject: [PATCH 77/90] change poll form element colors to fit with the rest of the ui (#26139) --- app/javascript/styles/mastodon/basics.scss | 4 ++++ app/javascript/styles/mastodon/polls.scss | 17 ++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/app/javascript/styles/mastodon/basics.scss b/app/javascript/styles/mastodon/basics.scss index 234c703f23..a77f8425dd 100644 --- a/app/javascript/styles/mastodon/basics.scss +++ b/app/javascript/styles/mastodon/basics.scss @@ -175,6 +175,10 @@ a { button { font-family: inherit; cursor: pointer; + + &:focus:not(:focus-visible) { + outline: none; + } } .app-holder { diff --git a/app/javascript/styles/mastodon/polls.scss b/app/javascript/styles/mastodon/polls.scss index bdb87d7cfa..bcc8cfaaec 100644 --- a/app/javascript/styles/mastodon/polls.scss +++ b/app/javascript/styles/mastodon/polls.scss @@ -105,7 +105,7 @@ &__input { display: inline-block; position: relative; - border: 1px solid $ui-primary-color; + border: 1px solid $ui-button-background-color; box-sizing: border-box; width: 18px; height: 18px; @@ -121,15 +121,10 @@ border-radius: 4px; } - &.active { - border-color: $valid-value-color; - background: $valid-value-color; - } - &:active, &:focus, &:hover { - border-color: lighten($valid-value-color, 15%); + border-color: $ui-button-focus-background-color; border-width: 4px; } @@ -241,6 +236,14 @@ color: $action-button-color; border-color: $action-button-color; margin-inline-end: 5px; + + &:hover, + &:focus, + &.active { + border-color: $action-button-color; + background-color: $action-button-color; + color: $ui-button-color; + } } li { From 76fce34ebb455d88a34290154ad8f02f582a67c0 Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 24 Jul 2023 13:48:23 +0200 Subject: [PATCH 78/90] Add `lang` attribute to trending links (#26111) --- .../mastodon/features/explore/components/story.jsx | 7 ++++--- app/javascript/mastodon/features/explore/links.jsx | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/explore/components/story.jsx b/app/javascript/mastodon/features/explore/components/story.jsx index 73ec99c14b..42b65e7dcc 100644 --- a/app/javascript/mastodon/features/explore/components/story.jsx +++ b/app/javascript/mastodon/features/explore/components/story.jsx @@ -13,6 +13,7 @@ export default class Story extends PureComponent { static propTypes = { url: PropTypes.string, title: PropTypes.string, + lang: PropTypes.string, publisher: PropTypes.string, sharedTimes: PropTypes.number, thumbnail: PropTypes.string, @@ -26,15 +27,15 @@ export default class Story extends PureComponent { handleImageLoad = () => this.setState({ thumbnailLoaded: true }); render () { - const { url, title, publisher, sharedTimes, thumbnail, blurhash } = this.props; + const { url, title, lang, publisher, sharedTimes, thumbnail, blurhash } = this.props; const { thumbnailLoaded } = this.state; return (
-
{publisher ? publisher : }
-
{title ? title : }
+
{publisher ? publisher : }
+
{title ? title : }
{typeof sharedTimes === 'number' ? : }
diff --git a/app/javascript/mastodon/features/explore/links.jsx b/app/javascript/mastodon/features/explore/links.jsx index 8b199bf47c..6f402decbf 100644 --- a/app/javascript/mastodon/features/explore/links.jsx +++ b/app/javascript/mastodon/features/explore/links.jsx @@ -58,6 +58,7 @@ class Links extends PureComponent { {isLoading ? () : links.map(link => ( Date: Mon, 24 Jul 2023 14:05:12 +0200 Subject: [PATCH 79/90] Update dependency rdf-normalize to v0.6.1 (#26130) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index bc4f3522bb..42a0d410e9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -569,7 +569,7 @@ GEM rake (13.0.6) rdf (3.2.11) link_header (~> 0.0, >= 0.0.8) - rdf-normalize (0.6.0) + rdf-normalize (0.6.1) rdf (~> 3.2) redcarpet (3.6.0) redis (4.8.1) From e56dc936e332e8c64b59665416d61ced6f2ae018 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 15:43:08 +0200 Subject: [PATCH 80/90] Update dependency brakeman to v6.0.1 (#26141) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 42a0d410e9..fb3fd05da7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -144,7 +144,7 @@ GEM blurhash (0.1.7) bootsnap (1.16.0) msgpack (~> 1.2) - brakeman (6.0.0) + brakeman (6.0.1) browser (5.3.1) brpoplpush-redis_script (0.1.3) concurrent-ruby (~> 1.0, >= 1.0.5) From 3cbc69f13d4ed4186a57634ffdf5ac6deca856c2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:03:49 +0200 Subject: [PATCH 81/90] Update dependency postcss to v8.4.27 (#26144) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0523961667..0789a5f6de 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9248,9 +9248,9 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@^8.2.15, postcss@^8.4.24: - version "8.4.26" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.26.tgz#1bc62ab19f8e1e5463d98cf74af39702a00a9e94" - integrity sha512-jrXHFF8iTloAenySjM/ob3gSj7pCu0Ji49hnjqzsgSRa50hkWCKD0HQ+gMNJkW38jBI68MpAAg7ZWwHwX8NMMw== + version "8.4.27" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.27.tgz#234d7e4b72e34ba5a92c29636734349e0d9c3057" + integrity sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ== dependencies: nanoid "^3.3.6" picocolors "^1.0.0" From b629e21515d54cf933d9167003b2a08d57192c80 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 24 Jul 2023 16:06:32 +0200 Subject: [PATCH 82/90] Fix unexpected redirection to /explore after sign-in (#26143) --- app/controllers/auth/sessions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/auth/sessions_controller.rb b/app/controllers/auth/sessions_controller.rb index 1380e6f283..06a3deee2b 100644 --- a/app/controllers/auth/sessions_controller.rb +++ b/app/controllers/auth/sessions_controller.rb @@ -108,7 +108,7 @@ class Auth::SessionsController < Devise::SessionsController end def home_paths(resource) - paths = [about_path] + paths = [about_path, '/explore'] paths << short_account_path(username: resource.account) if single_user_mode? && resource.is_a?(User) From 173a268025255879b6a251d7e7f484a759aa28b5 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 24 Jul 2023 16:18:19 +0200 Subject: [PATCH 83/90] Update dependency aws-sdk-s3 to v1.131.0 (#26145) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- Gemfile.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index fb3fd05da7..d308192e8b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -103,7 +103,7 @@ GEM attr_required (1.0.1) awrence (1.2.1) aws-eventstream (1.2.0) - aws-partitions (1.786.0) + aws-partitions (1.791.0) aws-sdk-core (3.178.0) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.651.0) @@ -112,7 +112,7 @@ GEM aws-sdk-kms (1.71.0) aws-sdk-core (~> 3, >= 3.177.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.130.0) + aws-sdk-s3 (1.131.0) aws-sdk-core (~> 3, >= 3.177.0) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.6) From 394d1f19b1d45c386dff021b1a333f4c020c0cb5 Mon Sep 17 00:00:00 2001 From: Vyr Cossont Date: Mon, 24 Jul 2023 08:37:38 -0700 Subject: [PATCH 84/90] Add report.updated webhook (#24211) --- app/models/report.rb | 9 +++++++-- app/models/webhook.rb | 3 ++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/models/report.rb b/app/models/report.rb index 533e3f72ab..f6fd23cf3a 100644 --- a/app/models/report.rb +++ b/app/models/report.rb @@ -58,7 +58,8 @@ class Report < ApplicationRecord before_validation :set_uri, only: :create - after_create_commit :trigger_webhooks + after_create_commit :trigger_create_webhooks + after_update_commit :trigger_update_webhooks def object_type :flag @@ -155,7 +156,11 @@ class Report < ApplicationRecord errors.add(:rule_ids, I18n.t('reports.errors.invalid_rules')) unless rules.size == rule_ids&.size end - def trigger_webhooks + def trigger_create_webhooks TriggerWebhookWorker.perform_async('report.created', 'Report', id) end + + def trigger_update_webhooks + TriggerWebhookWorker.perform_async('report.updated', 'Report', id) + end end diff --git a/app/models/webhook.rb b/app/models/webhook.rb index 14f33c5fc4..044097921e 100644 --- a/app/models/webhook.rb +++ b/app/models/webhook.rb @@ -20,6 +20,7 @@ class Webhook < ApplicationRecord account.created account.updated report.created + report.updated status.created status.updated ).freeze @@ -59,7 +60,7 @@ class Webhook < ApplicationRecord case event when 'account.approved', 'account.created', 'account.updated' :manage_users - when 'report.created' + when 'report.created', 'report.updated' :manage_reports when 'status.created', 'status.updated' :view_devops From 2dfa8f797a50364268c0e8434e37a29f9eeb652c Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 24 Jul 2023 17:55:36 +0200 Subject: [PATCH 85/90] Fix LinkCrawlWorker crashing on `null` `created_at` (#26151) --- app/lib/link_details_extractor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/link_details_extractor.rb b/app/lib/link_details_extractor.rb index a350cadf90..ffb25db2c1 100644 --- a/app/lib/link_details_extractor.rb +++ b/app/lib/link_details_extractor.rb @@ -124,7 +124,7 @@ class LinkDetailsExtractor author_url: author_url || '', embed_url: embed_url || '', language: language, - created_at: published_at, + created_at: published_at.presence || Time.now.utc, } end From 9a567ec1d1fdb50573c882b7e454285ef7f4200c Mon Sep 17 00:00:00 2001 From: gol-cha Date: Tue, 25 Jul 2023 00:56:20 +0900 Subject: [PATCH 86/90] Fix UI Overlap with the loupe icon in the Explore Tab (#26113) --- app/javascript/styles/mastodon/components.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index b06a7130f8..91c2a0f641 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -5015,7 +5015,6 @@ a.status-card { position: absolute; top: 16px; inset-inline-end: 10px; - z-index: 2; display: inline-block; opacity: 0; transition: all 100ms linear; @@ -8136,6 +8135,7 @@ noscript { .search__input { border: 1px solid lighten($ui-base-color, 8%); padding: 10px; + padding-inline-end: 28px; } .search__popout { From d1a9f601c7eac36f94e91814d3b28ecebaf6ff32 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 24 Jul 2023 19:53:33 +0200 Subject: [PATCH 87/90] Fix missing border on error screen in light theme in web UI (#26152) --- app/javascript/styles/mastodon-light/diff.scss | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon-light/diff.scss b/app/javascript/styles/mastodon-light/diff.scss index df89d9a5a5..601d515765 100644 --- a/app/javascript/styles/mastodon-light/diff.scss +++ b/app/javascript/styles/mastodon-light/diff.scss @@ -24,13 +24,16 @@ html { .column > .scrollable, .getting-started, .column-inline-form, -.error-column, .regeneration-indicator { background: $white; border: 1px solid lighten($ui-base-color, 8%); border-top: 0; } +.error-column { + border: 1px solid lighten($ui-base-color, 8%); +} + .column > .scrollable.about { border-top: 1px solid lighten($ui-base-color, 8%); } From 714a20697f5e2f7994df012a5a8bbb49bc56f2e7 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 24 Jul 2023 22:04:38 +0200 Subject: [PATCH 88/90] Fix missing action label on sensitive videos and embeds in web UI (#26135) --- app/javascript/mastodon/features/audio/index.jsx | 6 +++++- app/javascript/mastodon/features/status/components/card.jsx | 5 ++++- app/javascript/mastodon/features/video/index.jsx | 5 ++++- app/javascript/styles/mastodon/components.scss | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/app/javascript/mastodon/features/audio/index.jsx b/app/javascript/mastodon/features/audio/index.jsx index 72e76413b8..3f642bc74e 100644 --- a/app/javascript/mastodon/features/audio/index.jsx +++ b/app/javascript/mastodon/features/audio/index.jsx @@ -470,6 +470,7 @@ class Audio extends PureComponent { const progress = Math.min((currentTime / duration) * 100, 100); let warning; + if (sensitive) { warning = ; } else { @@ -515,7 +516,10 @@ class Audio extends PureComponent {
diff --git a/app/javascript/mastodon/features/status/components/card.jsx b/app/javascript/mastodon/features/status/components/card.jsx index 7cf324760e..dcc699e385 100644 --- a/app/javascript/mastodon/features/status/components/card.jsx +++ b/app/javascript/mastodon/features/status/components/card.jsx @@ -184,7 +184,10 @@ export default class Card extends PureComponent { let spoilerButton = ( ); diff --git a/app/javascript/mastodon/features/video/index.jsx b/app/javascript/mastodon/features/video/index.jsx index b6a024c6e7..3f7e0ada14 100644 --- a/app/javascript/mastodon/features/video/index.jsx +++ b/app/javascript/mastodon/features/video/index.jsx @@ -567,7 +567,10 @@ class Video extends PureComponent {
diff --git a/app/javascript/styles/mastodon/components.scss b/app/javascript/styles/mastodon/components.scss index 91c2a0f641..e75e55fb33 100644 --- a/app/javascript/styles/mastodon/components.scss +++ b/app/javascript/styles/mastodon/components.scss @@ -4186,6 +4186,7 @@ a.status-card { margin: 0; border: 0; border-radius: 4px; + color: $white; &__label { display: flex; @@ -4193,7 +4194,6 @@ a.status-card { justify-content: center; gap: 8px; flex-direction: column; - color: $primary-text-color; font-weight: 500; font-size: 14px; } From 42992084872a74cfe6be2b56b35cf3d3cfa69c9f Mon Sep 17 00:00:00 2001 From: Christian Schmidt Date: Mon, 24 Jul 2023 23:01:31 +0200 Subject: [PATCH 89/90] Fix `lang` for UI texts in link preview (#26149) --- .../mastodon/features/status/components/card.jsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/features/status/components/card.jsx b/app/javascript/mastodon/features/status/components/card.jsx index dcc699e385..29a12c87bf 100644 --- a/app/javascript/mastodon/features/status/components/card.jsx +++ b/app/javascript/mastodon/features/status/components/card.jsx @@ -156,9 +156,12 @@ export default class Card extends PureComponent { const language = card.get('language') || ''; const description = ( -
- {provider}{card.get('published_at') && <> · } - {card.get('title')} +
+ + {provider} + {card.get('published_at') && <> · } + + {card.get('title')} {card.get('author_name').length > 0 && {card.get('author_name')} }} />}
); From f826a95f6e98b36841a87389590a65e79877fc7d Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Tue, 25 Jul 2023 00:57:15 +0200 Subject: [PATCH 90/90] Add published date and author to news on the explore screen in web UI (#26155) --- .../features/explore/components/story.jsx | 14 +++++-- .../mastodon/features/explore/links.jsx | 5 ++- .../styles/mastodon/components.scss | 41 +++++++++++++++---- 3 files changed, 47 insertions(+), 13 deletions(-) diff --git a/app/javascript/mastodon/features/explore/components/story.jsx b/app/javascript/mastodon/features/explore/components/story.jsx index 42b65e7dcc..92eb41cff8 100644 --- a/app/javascript/mastodon/features/explore/components/story.jsx +++ b/app/javascript/mastodon/features/explore/components/story.jsx @@ -1,10 +1,13 @@ import PropTypes from 'prop-types'; import { PureComponent } from 'react'; +import { FormattedMessage } from 'react-intl'; + import classNames from 'classnames'; import { Blurhash } from 'mastodon/components/blurhash'; import { accountsCountRenderer } from 'mastodon/components/hashtag'; +import { RelativeTimestamp } from 'mastodon/components/relative_timestamp'; import { ShortNumber } from 'mastodon/components/short_number'; import { Skeleton } from 'mastodon/components/skeleton'; @@ -15,9 +18,12 @@ export default class Story extends PureComponent { title: PropTypes.string, lang: PropTypes.string, publisher: PropTypes.string, + publishedAt: PropTypes.string, + author: PropTypes.string, sharedTimes: PropTypes.number, thumbnail: PropTypes.string, blurhash: PropTypes.string, + expanded: PropTypes.bool, }; state = { @@ -27,16 +33,16 @@ export default class Story extends PureComponent { handleImageLoad = () => this.setState({ thumbnailLoaded: true }); render () { - const { url, title, lang, publisher, sharedTimes, thumbnail, blurhash } = this.props; + const { expanded, url, title, lang, publisher, author, publishedAt, sharedTimes, thumbnail, blurhash } = this.props; const { thumbnailLoaded } = this.state; return ( - +
-
{publisher ? publisher : }
+
{publisher ? {publisher} : }{publishedAt && <> · }
{title ? title : }
-
{typeof sharedTimes === 'number' ? : }
+
{author && <>{author} }} /> · }{typeof sharedTimes === 'number' ? : }
diff --git a/app/javascript/mastodon/features/explore/links.jsx b/app/javascript/mastodon/features/explore/links.jsx index 6f402decbf..489ab6dd61 100644 --- a/app/javascript/mastodon/features/explore/links.jsx +++ b/app/javascript/mastodon/features/explore/links.jsx @@ -55,13 +55,16 @@ class Links extends PureComponent {
{banner} - {isLoading ? () : links.map(link => ( + {isLoading ? () : links.map((link, i) => (