Merge tag 'v3.0.1' into instance_only_statuses

This commit is contained in:
Renato "Lond" Cerqueira
2019-10-21 09:14:53 +02:00
1034 changed files with 32987 additions and 15887 deletions

View File

@ -0,0 +1,29 @@
- content_for :page_title do
= t('settings.aliases')
= simple_form_for @alias, url: settings_aliases_path do |f|
= render 'shared/error_messages', object: @alias
%p.hint= t('aliases.hint_html')
%hr.spacer/
.fields-group
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }
.actions
= f.button :button, t('aliases.add_new'), type: :submit, class: 'button'
%hr.spacer/
.table-wrapper
%table.table.inline-table
%thead
%tr
%th= t('simple_form.labels.account_alias.acct')
%th
%tbody
- @aliases.each do |account_alias|
%tr
%td= account_alias.acct
%td= table_link_to 'trash', t('aliases.remove'), settings_alias_path(account_alias), data: { method: :delete }

View File

@ -2,15 +2,28 @@
= t('settings.delete')
= simple_form_for @confirmation, url: settings_delete_path, method: :delete do |f|
.warning
%strong
= fa_icon('warning')
= t('deletes.warning_title')
= t('deletes.warning_html')
%p.hint= t('deletes.warning.before')
%p.hint= t('deletes.description_html')
%ul.hint
- if current_user.confirmed? && current_user.approved?
%li.warning-hint= t('deletes.warning.irreversible')
%li.warning-hint= t('deletes.warning.username_unavailable')
%li.warning-hint= t('deletes.warning.data_removal')
%li.warning-hint= t('deletes.warning.caches')
- else
%li.positive-hint= t('deletes.warning.email_change_html', path: edit_user_registration_path)
%li.positive-hint= t('deletes.warning.email_reconfirmation_html', path: new_user_confirmation_path)
%li.positive-hint= t('deletes.warning.email_contact_html', email: Setting.site_contact_email)
%li.positive-hint= t('deletes.warning.username_available')
= f.input :password, placeholder: t('simple_form.labels.defaults.current_password'), input_html: { 'aria-label' => t('simple_form.labels.defaults.current_password'), :autocomplete => 'off' }, hint: t('deletes.confirm_password')
%p.hint= t('deletes.warning.more_details_html', terms_path: terms_path)
%hr.spacer/
- if current_user.encrypted_password.present?
= f.input :password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, hint: t('deletes.confirm_password')
- else
= f.input :username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, hint: t('deletes.confirm_username')
.actions
= f.button :button, t('deletes.proceed'), type: :submit, class: 'negative'

View File

@ -37,12 +37,16 @@
%td= number_with_delimiter @export.total_domain_blocks
%td= table_link_to 'download', t('exports.csv'), settings_exports_domain_blocks_path(format: :csv)
%hr.spacer/
%p.muted-hint= t('exports.archive_takeout.hint_html')
- if policy(:backup).create?
%p= link_to t('exports.archive_takeout.request'), settings_export_path, class: 'button', method: :post
- unless @backups.empty?
%hr.spacer/
.table-wrapper
%table.table
%thead

View File

@ -1,6 +1,10 @@
- content_for :page_title do
= t('settings.featured_tags')
%p= t('featured_tags.hint_html')
%hr.spacer/
= simple_form_for @featured_tag, url: settings_featured_tags_path do |f|
= render 'shared/error_messages', object: @featured_tag

View File

@ -0,0 +1,27 @@
- content_for :page_title do
= t('settings.migrate')
= simple_form_for @redirect, url: settings_migration_redirect_path do |f|
%p.hint= t('migrations.warning.before')
%ul.hint
%li.warning-hint= t('migrations.warning.redirect')
%li.warning-hint= t('migrations.warning.other_data')
%li.warning-hint= t('migrations.warning.disabled_account')
%hr.spacer/
= render 'shared/error_messages', object: @redirect
.fields-row
.fields-row__column.fields-group.fields-row__column-6
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }, label: t('simple_form.labels.account_migration.acct'), hint: t('simple_form.hints.account_migration.acct')
.fields-row__column.fields-group.fields-row__column-6
- if current_user.encrypted_password.present?
= f.input :current_password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true
- else
= f.input :current_username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true
.actions
= f.button :button, t('migrations.set_redirect'), type: :submit, class: 'button button--destructive'

View File

@ -1,17 +1,89 @@
- content_for :page_title do
= t('settings.migrate')
= simple_form_for @migration, as: :migration, url: settings_migration_path, html: { method: :put } do |f|
- if @migration.account
%p.hint= t('migrations.currently_redirecting')
.simple_form
- if current_account.moved_to_account.present?
.fields-row
.fields-row__column.fields-group.fields-row__column-6
= render 'application/card', account: current_account.moved_to_account
.fields-row__column.fields-group.fields-row__column-6
%p.hint
%span.positive-hint= t('migrations.redirecting_to', acct: current_account.moved_to_account.acct)
.fields-group
= render partial: 'application/card', locals: { account: @migration.account }
%p.hint= t('migrations.cancel_explanation')
%p.hint= link_to t('migrations.cancel'), settings_migration_redirect_path, data: { method: :delete }
- else
%p.hint
%span.positive-hint= t('migrations.not_redirecting')
%hr.spacer/
%h3= t('auth.migrate_account')
= simple_form_for @migration, url: settings_migration_path do |f|
- if on_cooldown?
%p.hint
%span.warning-hint= t('migrations.on_cooldown', count: ((@cooldown.cooldown_at - Time.now.utc) / 1.day.seconds).ceil)
- else
%p.hint= t('migrations.warning.before')
%ul.hint
%li.warning-hint= t('migrations.warning.followers')
%li.warning-hint= t('migrations.warning.redirect')
%li.warning-hint= t('migrations.warning.other_data')
%li.warning-hint= t('migrations.warning.backreference_required')
%li.warning-hint= t('migrations.warning.cooldown')
%li.warning-hint= t('migrations.warning.disabled_account')
%p.hint= t('migrations.warning.only_redirect_html', path: new_settings_migration_redirect_path)
%hr.spacer/
= render 'shared/error_messages', object: @migration
.fields-group
= f.input :acct, placeholder: t('migrations.acct')
.fields-row
.fields-row__column.fields-group.fields-row__column-6
= f.input :acct, wrapper: :with_block_label, input_html: { autocapitalize: 'none', autocorrect: 'off' }, disabled: on_cooldown?
.fields-row__column.fields-group.fields-row__column-6
- if current_user.encrypted_password.present?
= f.input :current_password, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true, disabled: on_cooldown?
- else
= f.input :current_username, wrapper: :with_block_label, input_html: { :autocomplete => 'off' }, required: true, disabled: on_cooldown?
.actions
= f.button :button, t('migrations.proceed'), type: :submit, class: 'negative'
= f.button :button, t('migrations.proceed_with_move'), type: :submit, class: 'button button--destructive', disabled: on_cooldown?
- unless @migrations.empty?
%hr.spacer/
%h3= t 'migrations.past_migrations'
%hr.spacer/
.table-wrapper
%table.table.inline-table
%thead
%tr
%th= t('migrations.acct')
%th= t('migrations.followers_count')
%th
%tbody
- @migrations.each do |migration|
%tr
%td
- if migration.target_account.present?
= compact_account_link_to migration.target_account
- else
= migration.acct
%td= number_with_delimiter migration.followers_count
%td
%time.time-ago{ datetime: migration.created_at.iso8601, title: l(migration.created_at) }= l(migration.created_at)
%hr.spacer/
%h3= t 'migrations.incoming_migrations'
%p.muted-hint= t('migrations.incoming_migrations_html', path: settings_aliases_path)

View File

@ -17,11 +17,19 @@
%h4= t 'appearance.animations_and_accessibility'
.fields-group
= f.input :setting_use_pending_items, as: :boolean, wrapper: :with_label
.fields-group
= f.input :setting_auto_play_gif, as: :boolean, wrapper: :with_label, recommended: true
= f.input :setting_reduce_motion, as: :boolean, wrapper: :with_label
= f.input :setting_system_font_ui, as: :boolean, wrapper: :with_label
%h4= t 'appearance.discovery'
.fields-group
= f.input :setting_trends, as: :boolean, wrapper: :with_label
%h4= t 'appearance.confirmation_dialogs'
.fields-group
@ -34,6 +42,9 @@
.fields-group
= f.input :setting_display_media, collection: ['default', 'show_all', 'hide_all'],label_method: lambda { |item| t("simple_form.hints.defaults.setting_display_media_#{item}") }, hint: false, as: :radio_buttons, collection_wrapper_tag: 'ul', item_wrapper_tag: 'li', wrapper: :with_floating_label
.fields-group
= f.input :setting_use_blurhash, as: :boolean, wrapper: :with_label
.fields-group
= f.input :setting_expand_spoilers, as: :boolean, wrapper: :with_label

View File

@ -15,6 +15,7 @@
- if current_user.staff?
= ff.input :report, as: :boolean, wrapper: :with_label
= ff.input :pending_account, as: :boolean, wrapper: :with_label
= ff.input :trending_tag, as: :boolean, wrapper: :with_label
.fields-group
= f.simple_fields_for :notification_emails, hash_to_object(current_user.settings.notification_emails) do |ff|

View File

@ -28,7 +28,7 @@
- if Setting.profile_directory
.fields-group
= f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable_html', min_followers: Account::MIN_FOLLOWERS_DISCOVERY, path: explore_path), recommended: true
= f.input :discoverable, as: :boolean, wrapper: :with_label, hint: t('simple_form.hints.defaults.discoverable'), recommended: true
%hr.spacer/
@ -60,6 +60,11 @@
%h6= t('auth.migrate_account')
%p.muted-hint= t('auth.migrate_account_html', path: settings_migration_path)
%hr.spacer/
%h6= t 'migrations.incoming_migrations'
%p.muted-hint= t('migrations.incoming_migrations_html', path: settings_aliases_path)
- if open_deletion?
%hr.spacer/

View File

@ -12,7 +12,7 @@
%samp.qr-alternative__code= current_user.otp_secret.scan(/.{4}/).join(' ')
.fields-group
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
= f.input :otp_attempt, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
.actions
= f.button :button, t('two_factor_authentication.enable'), type: :submit

View File

@ -2,33 +2,35 @@
= t('settings.two_factor_authentication')
- if current_user.otp_required_for_login
%p.positive-hint
= fa_icon 'check'
= ' '
= t 'two_factor_authentication.enabled'
%p.hint
%span.positive-hint
= fa_icon 'check'
= ' '
= t 'two_factor_authentication.enabled'
%hr/
%hr.spacer/
= simple_form_for @confirmation, url: settings_two_factor_authentication_path, method: :delete do |f|
= f.input :code, wrapper: :with_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
.fields-group
= f.input :otp_attempt, wrapper: :with_block_label, hint: t('two_factor_authentication.code_hint'), label: t('simple_form.labels.defaults.otp_attempt'), input_html: { :autocomplete => 'off' }, required: true
.actions
= f.button :button, t('two_factor_authentication.disable'), type: :submit
= f.button :button, t('two_factor_authentication.disable'), type: :submit, class: 'negative'
%hr/
%hr.spacer/
%h6= t('two_factor_authentication.recovery_codes')
%p.muted-hint
= t('two_factor_authentication.lost_recovery_codes')
= link_to t('two_factor_authentication.generate_recovery_codes'),
settings_two_factor_authentication_recovery_codes_path,
data: { method: :post }
%h3= t('two_factor_authentication.recovery_codes')
%p.muted-hint= t('two_factor_authentication.lost_recovery_codes')
%hr.spacer/
.simple_form
= link_to t('two_factor_authentication.generate_recovery_codes'), settings_two_factor_authentication_recovery_codes_path, data: { method: :post }, class: 'block-button'
- else
.simple_form
%p.hint= t('two_factor_authentication.description_html')
= link_to t('two_factor_authentication.setup'),
settings_two_factor_authentication_path,
data: { method: :post },
class: 'block-button'
%hr.spacer/
= link_to t('two_factor_authentication.setup'), settings_two_factor_authentication_path, data: { method: :post }, class: 'block-button'