Update patches for mastodon v4.3.0

This commit is contained in:
dump_stack() 2024-10-14 12:51:55 +00:00
parent d5b81255d0
commit 080e089f19
Signed by: dump_stack
GPG Key ID: C9905BA72B5E02BB
4 changed files with 23 additions and 44 deletions

View File

@ -25,7 +25,6 @@ let
./patches/add-merveilles-theme.patch
./patches/add-black-theme.patch
./patches/themes-config.patch
./patches/fix-mastodon-light-highlight-color.patch
./patches/fix-character-limit.patch
./patches/max-toot-chars-api.patch

View File

@ -1,25 +1,16 @@
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx
index 9222b2dc8..e2ce71b96 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.jsx
+++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx
@@ -100,7 +100,7 @@ class ComposeForm extends ImmutablePureComponent {
const fulltext = this.getFulltextForCharacterCounting();
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
diff --git a/app/javascript/mastodon/features/compose/containers/compose_form_container.js b/app/javascript/mastodon/features/compose/containers/compose_form_container.js
index bda2edba6..8bc4018d7 100644
--- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js
+++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js
@@ -28,7 +28,7 @@ const mapStateToProps = state => ({
anyMedia: state.getIn(['compose', 'media_attachments']).size > 0,
isInReply: state.getIn(['compose', 'in_reply_to']) !== null,
lang: state.getIn(['compose', 'language']),
- maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 500),
+ maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 100500),
});
- return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
+ return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 100500 || (isOnlyWhitespace && !anyMedia));
};
handleSubmit = (e) => {
@@ -297,7 +297,7 @@ class ComposeForm extends ImmutablePureComponent {
</div>
<div className='character-counter__wrapper'>
- <CharacterCounter max={500} text={this.getFulltextForCharacterCounting()} />
+ <CharacterCounter max={100500} text={this.getFulltextForCharacterCounting()} />
</div>
</div>
</div>
const mapDispatchToProps = (dispatch) => ({
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
index dc841ded3..734ab143b 100644
--- a/app/validators/status_length_validator.rb

View File

@ -1,13 +0,0 @@
diff --git a/app/javascript/styles/mastodon-light/variables.scss b/app/javascript/styles/mastodon-light/variables.scss
index cae065878..29de2a9b3 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: #858afa;
+$classic-highlight-color: #5c90c7;
// Differences
$success-green: lighten(#3c754d, 8%);

View File

@ -1,13 +1,14 @@
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb
index 5ae1099d0..c9c76c700 100644
index 19361277a..03dc1ad85 100644
--- a/app/serializers/rest/instance_serializer.rb
+++ b/app/serializers/rest/instance_serializer.rb
@@ -11,11 +11,16 @@ class REST::InstanceSerializer < ActiveModel::Serializer
@@ -11,12 +11,17 @@ class REST::InstanceSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :domain, :title, :version, :source_url, :description,
:usage, :thumbnail, :languages, :configuration,
+ :max_toot_chars,
:registrations
:usage, :thumbnail, :icon, :languages, :configuration,
:registrations, :api_versions
has_one :contact, serializer: ContactSerializer
has_many :rules, serializer: REST::RuleSerializer
@ -20,17 +21,18 @@ index 5ae1099d0..c9c76c700 100644
if object.thumbnail
{
diff --git a/app/serializers/rest/v1/instance_serializer.rb b/app/serializers/rest/v1/instance_serializer.rb
index 99d1b2bd6..b5e6c8185 100644
index 7f9f21c5a..c99f1f9c1 100644
--- a/app/serializers/rest/v1/instance_serializer.rb
+++ b/app/serializers/rest/v1/instance_serializer.rb
@@ -6,12 +6,17 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
@@ -4,6 +4,7 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
include RoutingHelper
attributes :uri, :title, :short_description, :description, :email,
+ :max_toot_chars,
:version, :urls, :stats, :thumbnail,
:languages, :registrations, :approval_required, :invites_enabled,
+ :max_toot_chars,
:configuration
has_one :contact_account, serializer: REST::AccountSerializer
@@ -12,6 +13,10 @@ class REST::V1::InstanceSerializer < ActiveModel::Serializer
has_many :rules, serializer: REST::RuleSerializer