You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.9 KiB

  1. - content_for :page_title do
  2. = t('settings.edit_profile')
  3. = simple_form_for @account, url: settings_profile_path, html: { method: :put } do |f|
  4. = render 'shared/error_messages', object: @account
  5. .fields-group
  6. = 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
  7. = f.input :note, placeholder: t('simple_form.labels.defaults.note'), hint: t('simple_form.hints.defaults.note', count: 500 - @account.note.size).html_safe
  8. = render 'application/card', account: @account
  9. .fields-group
  10. = f.input :avatar, wrapper: :with_label, input_html: { accept: AccountAvatar::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.avatar', dimensions: '400x400', size: number_to_human_size(AccountAvatar::LIMIT))
  11. = f.input :header, wrapper: :with_label, input_html: { accept: AccountHeader::IMAGE_MIME_TYPES.join(',') }, hint: t('simple_form.hints.defaults.header', dimensions: '1500x500', size: number_to_human_size(AccountHeader::LIMIT))
  12. .fields-group
  13. = f.input :locked, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.locked')
  14. .fields-group
  15. = f.input :bot, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.bot')
  16. .fields-group
  17. .input.with_block_label
  18. %label= t('simple_form.labels.defaults.fields')
  19. %span.hint= t('simple_form.hints.defaults.fields')
  20. = f.simple_fields_for :fields do |fields_f|
  21. .row
  22. = fields_f.input :name, placeholder: t('simple_form.labels.account.fields.name')
  23. = fields_f.input :value, placeholder: t('simple_form.labels.account.fields.value')
  24. .actions
  25. = f.button :button, t('generic.save_changes'), type: :submit
  26. %hr/
  27. %h6= t('auth.migrate_account')
  28. %p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)