mirror of
https://gitlab.com/upRootNutrition/dotfiles.git
synced 2025-12-07 05:27:13 -06:00
feat: increased character limit to 5000
This commit is contained in:
parent
c175d118c6
commit
8c4d36d89b
2 changed files with 33 additions and 28 deletions
|
|
@ -1,34 +1,20 @@
|
||||||
diff --git a/app/javascript/mastodon/features/compose/components/compose_form.jsx b/app/javascript/mastodon/features/compose/components/compose_form.jsx
|
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 9222b2dc8..962310a28 100644
|
--- a/app/javascript/mastodon/features/compose/containers/compose_form_container.js
|
||||||
--- a/app/javascript/mastodon/features/compose/components/compose_form.jsx
|
+++ b/app/javascript/mastodon/features/compose/containers/compose_form_container.js
|
||||||
+++ b/app/javascript/mastodon/features/compose/components/compose_form.jsx
|
@@ -32,5 +32,5 @@
|
||||||
@@ -100,7 +100,7 @@ class ComposeForm extends ImmutablePureComponent {
|
isInReply: state.getIn(['compose', 'in_reply_to']) !== null,
|
||||||
const fulltext = this.getFulltextForCharacterCounting();
|
lang: state.getIn(['compose', 'language']),
|
||||||
const isOnlyWhitespace = fulltext.length !== 0 && fulltext.trim().length === 0;
|
- maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 500),
|
||||||
|
+ maxChars: state.getIn(['server', 'server', 'configuration', 'statuses', 'max_characters'], 5000),
|
||||||
|
});
|
||||||
|
|
||||||
- return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 500 || (isOnlyWhitespace && !anyMedia));
|
|
||||||
+ return !(isSubmitting || isUploading || isChangingUpload || length(fulltext) > 5000 || (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={5000} text={this.getFulltextForCharacterCounting()} />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
|
diff --git a/app/validators/status_length_validator.rb b/app/validators/status_length_validator.rb
|
||||||
index dc841ded3..9cb1ec94b 100644
|
|
||||||
--- a/app/validators/status_length_validator.rb
|
--- a/app/validators/status_length_validator.rb
|
||||||
+++ b/app/validators/status_length_validator.rb
|
+++ b/app/validators/status_length_validator.rb
|
||||||
@@ -1,7 +1,7 @@
|
@@ -2,6 +2,6 @@
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
class StatusLengthValidator < ActiveModel::Validator
|
class StatusLengthValidator < ActiveModel::Validator
|
||||||
- MAX_CHARS = 500
|
- MAX_CHARS = 500
|
||||||
+ MAX_CHARS = 5000
|
+ MAX_CHARS = 5000
|
||||||
URL_PLACEHOLDER_CHARS = 23
|
URL_PLACEHOLDER_CHARS = 23
|
||||||
URL_PLACEHOLDER = 'x' * 23
|
URL_PLACEHOLDER = 'x' * 23
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,16 @@ in
|
||||||
# If you really fuck up and name yourself wrong, use this shit
|
# If you really fuck up and name yourself wrong, use this shit
|
||||||
# sudo mastodon-tootctl accounts modify username --remove-role
|
# sudo mastodon-tootctl accounts modify username --remove-role
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
mastodon = prev.mastodon.overrideAttrs (oldAttrs: {
|
||||||
|
patches = (oldAttrs.patches or [ ]) ++ [
|
||||||
|
./config/chars.patch
|
||||||
|
];
|
||||||
|
});
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
microvm.vms = {
|
microvm.vms = {
|
||||||
${serviceCfg.name} = {
|
${serviceCfg.name} = {
|
||||||
autostart = true;
|
autostart = true;
|
||||||
|
|
@ -88,6 +98,15 @@ in
|
||||||
SMTP_ENABLE_STARTTLS_AUTO = "true";
|
SMTP_ENABLE_STARTTLS_AUTO = "true";
|
||||||
SMTP_SSL = "false";
|
SMTP_SSL = "false";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# if you're starting from scratch, you gotta cd into /var/lib/mastodon and run:
|
||||||
|
# sudo -u mastodon mastodon-tootctl search deploy
|
||||||
|
|
||||||
|
elasticsearch = {
|
||||||
|
preset = "single_node_cluster";
|
||||||
|
host = hostCfg.localhost.address0;
|
||||||
|
port = 9200;
|
||||||
|
};
|
||||||
mediaAutoRemove = {
|
mediaAutoRemove = {
|
||||||
enable = true;
|
enable = true;
|
||||||
olderThanDays = 14;
|
olderThanDays = 14;
|
||||||
|
|
@ -132,7 +151,7 @@ in
|
||||||
user = smtpCfg.email.address1;
|
user = smtpCfg.email.address1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
opensearch.enable = true;
|
||||||
caddy = {
|
caddy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
|
|
@ -354,8 +373,8 @@ in
|
||||||
environment.systemPackages = [ fedifetcherPython ];
|
environment.systemPackages = [ fedifetcherPython ];
|
||||||
|
|
||||||
microvm = {
|
microvm = {
|
||||||
vcpu = 2;
|
vcpu = 4;
|
||||||
mem = 1024 * 3;
|
mem = 1024 * 8;
|
||||||
hypervisor = "qemu";
|
hypervisor = "qemu";
|
||||||
interfaces = [
|
interfaces = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue