Change profile metadata from 4 to 8
This commit is contained in:
parent
531fa67246
commit
2ba7bd61e9
4 changed files with 6 additions and 6 deletions
|
@ -66,6 +66,8 @@ class Account < ApplicationRecord
|
|||
MENTION_RE = /(?<=^|[^\/[:word:]])@((#{USERNAME_RE})(?:@[[:word:]\.\-]+[a-z0-9]+)?)/i
|
||||
URL_PREFIX_RE = /\Ahttp(s?):\/\/[^\/]+/
|
||||
|
||||
DEFAULT_FIELDS_SIZE = 8
|
||||
|
||||
include AccountAssociations
|
||||
include AccountAvatar
|
||||
include AccountFinderConcern
|
||||
|
@ -100,7 +102,7 @@ class Account < ApplicationRecord
|
|||
validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? }
|
||||
validates :display_name, length: { maximum: 30 }, if: -> { local? && will_save_change_to_display_name? }
|
||||
validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? }
|
||||
validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? }
|
||||
validates :fields, length: { maximum: DEFAULT_FIELDS_SIZE }, if: -> { local? && will_save_change_to_fields? }
|
||||
|
||||
scope :remote, -> { where.not(domain: nil) }
|
||||
scope :local, -> { where(domain: nil) }
|
||||
|
@ -360,8 +362,6 @@ class Account < ApplicationRecord
|
|||
self[:fields] = fields
|
||||
end
|
||||
|
||||
DEFAULT_FIELDS_SIZE = 4
|
||||
|
||||
def build_fields
|
||||
return if fields.size >= DEFAULT_FIELDS_SIZE
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
.fields-row__column.fields-group.fields-row__column-6
|
||||
.input.with_block_label
|
||||
%label= t('simple_form.labels.defaults.fields')
|
||||
%span.hint= t('simple_form.hints.defaults.fields')
|
||||
%span.hint= t('simple_form.hints.defaults.fields', size: Account::DEFAULT_FIELDS_SIZE)
|
||||
|
||||
= f.simple_fields_for :fields do |fields_f|
|
||||
.row
|
||||
|
|
|
@ -42,7 +42,7 @@ en:
|
|||
digest: Only sent after a long period of inactivity and only if you have received any personal messages in your absence
|
||||
discoverable: Allow your account to be discovered by strangers through recommendations and other features
|
||||
email: You will be sent a confirmation e-mail
|
||||
fields: You can have up to 4 items displayed as a table on your profile
|
||||
fields: You can have up to %{size} items displayed as a table on your profile
|
||||
header: PNG, GIF or JPG. At most %{size}. Will be downscaled to %{dimensions}px
|
||||
inbox_url: Copy the URL from the frontpage of the relay you want to use
|
||||
irreversible: Filtered posts will disappear irreversibly, even if filter is later removed
|
||||
|
|
|
@ -42,7 +42,7 @@ ja:
|
|||
digest: 長期間使用していない場合と不在時に返信を受けた場合のみ送信されます
|
||||
discoverable: ディレクトリはあなたのアカウントをより多くの人に見つけてもらうためのひとつの手段です
|
||||
email: 確認のメールが送信されます
|
||||
fields: プロフィールに表として4つまでの項目を表示することができます
|
||||
fields: プロフィールに表として%{size}つまでの項目を表示することができます
|
||||
header: "%{size}までのPNG、GIF、JPGが利用可能です。 %{dimensions}pxまで縮小されます"
|
||||
inbox_url: 使用したいリレーサーバーのトップページからURLをコピーします
|
||||
irreversible: フィルターが後で削除されても、除外された投稿は元に戻せなくなります
|
||||
|
|
Loading…
Reference in a new issue