This commit is contained in:
2023-01-09 13:13:56 +00:00
commit 8d551299d9
16 changed files with 1384 additions and 0 deletions

View File

@ -0,0 +1,9 @@
diff --git a/app/javascript/styles/black.scss b/app/javascript/styles/black.scss
new file mode 100644
index 000000000..5598dbea0
--- /dev/null
+++ b/app/javascript/styles/black.scss
@@ -0,0 +1,3 @@
+$ui-base-color: #000000;
+
+@import 'application';

View File

@ -0,0 +1,10 @@
diff --git a/app/javascript/styles/merveilles.scss b/app/javascript/styles/merveilles.scss
new file mode 100644
index 000000000..5147ae626
--- /dev/null
+++ b/app/javascript/styles/merveilles.scss
@@ -0,0 +1,4 @@
+$ui-base-color: #222222;
+$ui-highlight-color: #333333;
+
+@import "application";

View File

@ -0,0 +1,10 @@
diff --git a/app/javascript/styles/tango.scss b/app/javascript/styles/tango.scss
new file mode 100644
index 000000000..9699d17b5
--- /dev/null
+++ b/app/javascript/styles/tango.scss
@@ -0,0 +1,4 @@
+$ui-base-color: #2f3436;
+$ui-highlight-color: #5c90c7;
+
+@import 'application';

View File

@ -0,0 +1,35 @@
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.js b/app/javascript/mastodon/features/compose/components/compose_form.js
index 6a65f44da..d67e29db3 100644
--- a/app/javascript/mastodon/features/compose/components/compose_form.js
+++ b/app/javascript/mastodon/features/compose/components/compose_form.js
@@ -90,7 +90,7 @@ class ComposeForm extends ImmutablePureComponent {
const fulltext = this.getFulltextForCharacterCounting();
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
- return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
+ return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 100500 || (isOnlyWhitespace && !anyMedia));
}
handleSubmit = (e) => {
@@ -277,7 +277,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>
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
index e107912b7..1e374a84d 100644
--- a/app/validators/status_length_validator.rb
+++ b/app/validators/status_length_validator.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
class StatusLengthValidator < ActiveModel::Validator
- MAX_CHARS = 500
+ MAX_CHARS = 100500
URL_PLACEHOLDER_CHARS = 23
URL_PLACEHOLDER = 'x' * 23

View File

@ -0,0 +1,13 @@
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: #6364ff;
+$classic-highlight-color: #5c90c7;
// Differences
$success-green: lighten(#3c754d, 8%);

File diff suppressed because one or more lines are too long

485
patches/logo.patch Normal file

File diff suppressed because one or more lines are too long

477
patches/mascot.patch Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,21 @@
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb
index 5ae1099d0..c9c76c700 100644
--- a/app/serializers/rest/instance_serializer.rb
+++ b/app/serializers/rest/instance_serializer.rb
@@ -11,11 +11,16 @@ class REST::InstanceSerializer < ActiveModel::Serializer
attributes :domain, :title, :version, :source_url, :description,
:usage, :thumbnail, :languages, :configuration,
+ :max_toot_chars,
:registrations
has_one :contact, serializer: ContactSerializer
has_many :rules, serializer: REST::RuleSerializer
+ def max_toot_chars
+ StatusLengthValidator::MAX_CHARS
+ end
+
def thumbnail
if object.thumbnail
{

39
patches/simple-form.patch Normal file
View File

@ -0,0 +1,39 @@
diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml
index 6edf7b4e9..fe196a387 100644
--- a/config/locales/simple_form.en.yml
+++ b/config/locales/simple_form.en.yml
@@ -99,7 +99,7 @@ en:
imports:
data: CSV file exported from another Mastodon server
invite_request:
- text: This will help us review your application
+ text: This will help us review your application. Make sure you read the rules before writing anything here
ip_block:
comment: Optional. Remember why you added this rule.
expires_in: IP addresses are a finite resource, they are sometimes shared and often change hands. For this reason, indefinite IP blocks are not recommended.
diff --git a/config/locales/simple_form.fr.yml b/config/locales/simple_form.fr.yml
index 3b2d30aae..fdc802eab 100644
--- a/config/locales/simple_form.fr.yml
+++ b/config/locales/simple_form.fr.yml
@@ -99,7 +99,7 @@ fr:
imports:
data: Un fichier CSV généré par un autre serveur de Mastodon
invite_request:
- text: Cela nous aidera à considérer votre demande
+ text: Cela nous aidera à considérer votre demande. Assurez-vous de lire les règles avant d'écrire quoi que ce soit ici
ip_block:
comment: Optionnel. Pour ne pas oublier pourquoi vous avez ajouté cette règle.
expires_in: Les adresses IP sont une ressource finie, elles sont parfois partagées et changent souvent de mains. Pour cette raison, les blocages dIP indéfiniment ne sont pas recommandés.
diff --git a/config/locales/simple_form.ru.yml b/config/locales/simple_form.ru.yml
index e95b22377..7854d633a 100644
--- a/config/locales/simple_form.ru.yml
+++ b/config/locales/simple_form.ru.yml
@@ -82,7 +82,7 @@ ru:
imports:
data: Файл CSV, экспортированный с другого узла Mastodon.
invite_request:
- text: Это поможет нам рассмотреть вашу заявку
+ text: Это поможет нам рассмотреть вашу заявку. Перед тем, как писать что-либо здесь, обязательно прочтите правила
ip_block:
comment: Необязательно. Заметка на будущее, почему вы добавили это правило.
expires_in: IP адреса — весьма ограниченный ресурс, иногда они разделяются между абонентами и часто меняют владельца. По этой причине блокировки на неопределённые сроки не рекомендуются.

View File

@ -0,0 +1,11 @@
diff --git a/config/themes.yml b/config/themes.yml
index 9c21c9459..49da04fde 100644
--- a/config/themes.yml
+++ b/config/themes.yml
@@ -1,3 +1,6 @@
default: styles/application.scss
contrast: styles/contrast.scss
mastodon-light: styles/mastodon-light.scss
+tango: styles/tango.scss
+black: styles/black.scss
+merveilles: styles/merveilles.scss