2017-11-27 21:47:06 +00:00
|
|
|
- content_for :page_title do
|
|
|
|
= t('settings.migrate')
|
|
|
|
|
2019-09-19 19:58:19 +01:00
|
|
|
.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
|
2022-03-22 09:07:11 +00:00
|
|
|
%span.positive-hint= t('migrations.redirecting_to', acct: current_account.moved_to_account.pretty_acct)
|
2017-11-27 21:47:06 +00:00
|
|
|
|
2019-09-19 19:58:19 +01:00
|
|
|
%p.hint= t('migrations.cancel_explanation')
|
|
|
|
|
2019-09-29 04:03:19 +01:00
|
|
|
%p.hint= link_to t('migrations.cancel'), settings_migration_redirect_path, data: { method: :delete }
|
2019-09-19 19:58:19 +01:00
|
|
|
- else
|
|
|
|
%p.hint
|
|
|
|
%span.positive-hint= t('migrations.not_redirecting')
|
|
|
|
|
|
|
|
%hr.spacer/
|
|
|
|
|
2019-09-29 04:03:19 +01:00
|
|
|
%h3= t('auth.migrate_account')
|
2019-09-19 19:58:19 +01:00
|
|
|
|
|
|
|
= simple_form_for @migration, url: settings_migration_path do |f|
|
|
|
|
- if on_cooldown?
|
2019-09-29 04:03:19 +01:00
|
|
|
%p.hint
|
|
|
|
%span.warning-hint= t('migrations.on_cooldown', count: ((@cooldown.cooldown_at - Time.now.utc) / 1.day.seconds).ceil)
|
2019-09-19 19:58:19 +01:00
|
|
|
- else
|
|
|
|
%p.hint= t('migrations.warning.before')
|
|
|
|
|
|
|
|
%ul.hint
|
|
|
|
%li.warning-hint= t('migrations.warning.followers')
|
2019-09-29 04:03:19 +01:00
|
|
|
%li.warning-hint= t('migrations.warning.redirect')
|
2019-09-19 19:58:19 +01:00
|
|
|
%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')
|
|
|
|
|
2019-09-29 04:03:19 +01:00
|
|
|
%p.hint= t('migrations.warning.only_redirect_html', path: new_settings_migration_redirect_path)
|
|
|
|
|
2019-09-19 19:58:19 +01:00
|
|
|
%hr.spacer/
|
2017-11-27 21:47:06 +00:00
|
|
|
|
|
|
|
= render 'shared/error_messages', object: @migration
|
|
|
|
|
2019-09-19 19:58:19 +01:00
|
|
|
.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?
|
2022-11-17 10:05:39 +00:00
|
|
|
= f.input :current_password, wrapper: :with_block_label, input_html: { autocomplete: 'current-password' }, required: true, disabled: on_cooldown?
|
2019-09-19 19:58:19 +01:00
|
|
|
- else
|
2022-11-17 10:05:39 +00:00
|
|
|
= f.input :current_username, wrapper: :with_block_label, input_html: { autocomplete: 'off' }, required: true, disabled: on_cooldown?
|
2017-11-27 21:47:06 +00:00
|
|
|
|
|
|
|
.actions
|
2019-09-19 19:58:19 +01:00
|
|
|
= 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
|
2022-10-18 18:01:59 +01:00
|
|
|
= migration.acct
|
2019-09-19 19:58:19 +01:00
|
|
|
|
|
|
|
%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)
|