Browse Source

Expand bios.

Alex Huddleston 5 months ago
parent
commit
f585933b77
5 changed files with 1364 additions and 7 deletions
  1. 4
    4
      app/models/account.rb
  2. 1
    1
      app/views/settings/profiles/show.html.haml
  3. 2
    2
      config/puma.rb
  4. BIN
      public/favicon.ico
  5. 1357
    0
      yarn.lock

+ 4
- 4
app/models/account.rb View File

@@ -75,8 +75,8 @@ class Account < ApplicationRecord
75 75
   validates_with UniqueUsernameValidator, if: -> { local? && will_save_change_to_username? }
76 76
   validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
77 77
   validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
78
-  validates :note, length: { maximum: 160 }, if: -> { local? && will_save_change_to_note? }
79
-  validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
78
+  validates :note, length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
79
+  validates :fields, length: { maximum: 6 }, if: -> { local? && will_save_change_to_fields? }
80 80
 
81 81
   # Timelines
82 82
   has_many :stream_entries, inverse_of: :account, dependent: :destroy
@@ -236,10 +236,10 @@ class Account < ApplicationRecord
236 236
   end
237 237
 
238 238
   def build_fields
239
-    return if fields.size >= 4
239
+    return if fields.size >= 6
240 240
 
241 241
     raw_fields = self[:fields] || []
242
-    add_fields = 4 - raw_fields.size
242
+    add_fields = 6 - raw_fields.size
243 243
     add_fields.times { raw_fields << { name: '', value: '' } }
244 244
     self.fields = raw_fields
245 245
   end

+ 1
- 1
app/views/settings/profiles/show.html.haml View File

@@ -6,7 +6,7 @@
6 6
 
7 7
   .fields-group
8 8
     = f.input :display_name, placeholder: t('simple_form.labels.defaults.display_name'), hint: t('simple_form.hints.defaults.display_name', count: 30 - @account.display_name.size).html_safe
9
-    = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: 160 - @account.note.size).html_safe
9
+    = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: 500 - @account.note.size).html_safe
10 10
 
11 11
   = render 'application/card', account: @account
12 12
 

+ 2
- 2
config/puma.rb View File

@@ -1,4 +1,4 @@
1
-threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i
1
+threads_count = ENV.fetch('MAX_THREADS') { 8 }.to_i
2 2
 threads threads_count, threads_count
3 3
 
4 4
 if ENV['SOCKET'] then
@@ -7,7 +7,7 @@ else
7 7
   port ENV.fetch('PORT') { 3000 }
8 8
 end
9 9
 
10
-environment ENV.fetch('RAILS_ENV') { 'development' }
10
+environment ENV.fetch('RAILS_ENV') { 'production' }
11 11
 workers     ENV.fetch('WEB_CONCURRENCY') { 2 }
12 12
 
13 13
 preload_app!

BIN
public/favicon.ico View File


+ 1357
- 0
yarn.lock
File diff suppressed because it is too large
View File


Loading…
Cancel
Save