0
0
Fork 0

Add account migration UI (#11846)

Fix #10736

- Change data export to be available for non-functional accounts
- Change non-functional accounts to include redirecting accounts
This commit is contained in:
Eugen Rochko 2019-09-19 20:58:19 +02:00 committed by GitHub
parent b6df9c1067
commit 3ed94dcc1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
31 changed files with 542 additions and 73 deletions

View file

@ -554,6 +554,12 @@ en:
new_trending_tag:
body: 'The hashtag #%{name} is trending today, but has not been previously reviewed. It will not be displayed publicly unless you allow it to, or just save the form as it is to never hear about it again.'
subject: New hashtag up for review on %{instance} (#%{name})
aliases:
add_new: Create alias
created_msg: Successfully created a new alias. You can now initiate the move from the old account.
deleted_msg: Successfully remove the alias. Moving from that account to this one will no longer be possible.
hint_html: If you want to move from another account to this one, here you can create an alias, which is required before you can proceed with moving followers from the old account to this one. This action by itself is <strong>harmless and reversible</strong>. <strong>The account migration is initiated from the old account</strong>.
remove: Unlink alias
appearance:
advanced_web_interface: Advanced web interface
advanced_web_interface_hint: 'If you want to make use of your entire screen width, the advanced web interface allows you to configure many different columns to see as much information at the same time as you want: Home, notifications, federated timeline, any number of lists and hashtags.'
@ -613,6 +619,7 @@ en:
confirming: Waiting for e-mail confirmation to be completed.
functional: Your account is fully operational.
pending: Your application is pending review by our staff. This may take some time. You will receive an e-mail if your application is approved.
redirecting_to: Your account is inactive because it is currently redirecting to %{acct}.
trouble_logging_in: Trouble logging in?
authorize_follow:
already_following: You are already following this account
@ -801,10 +808,32 @@ en:
images_and_video: Cannot attach a video to a status that already contains images
too_many: Cannot attach more than 4 files
migrations:
acct: username@domain of the new account
currently_redirecting: 'Your profile is set to redirect to:'
proceed: Save
updated_msg: Your account migration setting successfully updated!
acct: Moved to
cancel: Cancel redirect
cancel_explanation: Cancelling the redirect will re-activate your current account, but will not bring back followers that have been moved to that account.
cancelled_msg: Successfully cancelled the redirect.
errors:
already_moved: is the same account you have already moved to
missing_also_known_as: is not back-referencing this account
move_to_self: cannot be current account
not_found: could not be found
on_cooldown: You are on cooldown
followers_count: Followers at time of move
incoming_migrations: Moving from a different account
incoming_migrations_html: To move from another account to this one, first you need to <a href="%{path}">create an account alias</a>.
moved_msg: Your account is now redirecting to %{acct} and your followers are being moved over.
not_redirecting: Your account is not redirecting to any other account currently.
on_cooldown: You have recently migrated your account. This function will become available again in %{count} days.
past_migrations: Past migrations
proceed_with_move: Move followers
redirecting_to: Your account is redirecting to %{acct}.
warning:
backreference_required: The new account must first be configured to back-reference this one
before: 'Before proceeding, please read these notes carefully:'
cooldown: After moving there is a cooldown period during which you will not be able to move again
disabled_account: Your current account will not be fully usable afterwards. However, you will have access to data export as well as re-activation.
followers: This action will move all followers from the current account to the new account
other_data: No other data will be moved automatically
moderation:
title: Moderation
notification_mailer:
@ -950,6 +979,7 @@ en:
settings:
account: Account
account_settings: Account settings
aliases: Account aliases
appearance: Appearance
authorized_apps: Authorized apps
back: Back to Mastodon

View file

@ -2,6 +2,10 @@
en:
simple_form:
hints:
account_alias:
acct: Specify the username@domain of the account you want to move from
account_migration:
acct: Specify the username@domain of the account you want to move to
account_warning_preset:
text: You can use toot syntax, such as URLs, hashtags and mentions
admin_account_action:
@ -15,6 +19,8 @@ en:
avatar: PNG, GIF or JPG. At most %{size}. Will be downscaled to %{dimensions}px
bot: This account mainly performs automated actions and might not be monitored
context: One or multiple contexts where the filter should apply
current_password: For security purposes please enter the password of the current account
current_username: To confirm, please enter the username of the current account
digest: Only sent after a long period of inactivity and only if you have received any personal messages in your absence
discoverable: The profile directory is another way by which your account can reach a wider audience
email: You will be sent a confirmation e-mail
@ -60,6 +66,10 @@ en:
fields:
name: Label
value: Content
account_alias:
acct: Handle of the old account
account_migration:
acct: Handle of the new account
account_warning_preset:
text: Preset text
admin_account_action:

View file

@ -5,7 +5,7 @@ SimpleNavigation::Configuration.run do |navigation|
n.item :web, safe_join([fa_icon('chevron-left fw'), t('settings.back')]), root_url
n.item :profile, safe_join([fa_icon('user fw'), t('settings.profile')]), settings_profile_url, if: -> { current_user.functional? } do |s|
s.item :profile, safe_join([fa_icon('pencil fw'), t('settings.appearance')]), settings_profile_url, highlights_on: %r{/settings/profile|/settings/migration}
s.item :profile, safe_join([fa_icon('pencil fw'), t('settings.appearance')]), settings_profile_url
s.item :featured_tags, safe_join([fa_icon('hashtag fw'), t('settings.featured_tags')]), settings_featured_tags_url
s.item :identity_proofs, safe_join([fa_icon('key fw'), t('settings.identity_proofs')]), settings_identity_proofs_path, highlights_on: %r{/settings/identity_proofs*}, if: proc { current_account.identity_proofs.exists? }
end
@ -20,13 +20,13 @@ SimpleNavigation::Configuration.run do |navigation|
n.item :filters, safe_join([fa_icon('filter fw'), t('filters.index.title')]), filters_path, highlights_on: %r{/filters}, if: -> { current_user.functional? }
n.item :security, safe_join([fa_icon('lock fw'), t('settings.account')]), edit_user_registration_url do |s|
s.item :password, safe_join([fa_icon('lock fw'), t('settings.account_settings')]), edit_user_registration_url, highlights_on: %r{/auth/edit|/settings/delete}
s.item :password, safe_join([fa_icon('lock fw'), t('settings.account_settings')]), edit_user_registration_url, highlights_on: %r{/auth/edit|/settings/delete|/settings/migration|/settings/aliases}
s.item :two_factor_authentication, safe_join([fa_icon('mobile fw'), t('settings.two_factor_authentication')]), settings_two_factor_authentication_url, highlights_on: %r{/settings/two_factor_authentication}
s.item :authorized_apps, safe_join([fa_icon('list fw'), t('settings.authorized_apps')]), oauth_authorized_applications_url
end
n.item :data, safe_join([fa_icon('cloud-download fw'), t('settings.import_and_export')]), settings_export_url, if: -> { current_user.functional? } do |s|
s.item :import, safe_join([fa_icon('cloud-upload fw'), t('settings.import')]), settings_import_url
n.item :data, safe_join([fa_icon('cloud-download fw'), t('settings.import_and_export')]), settings_export_url do |s|
s.item :import, safe_join([fa_icon('cloud-upload fw'), t('settings.import')]), settings_import_url, if: -> { current_user.functional? }
s.item :export, safe_join([fa_icon('cloud-download fw'), t('settings.export')]), settings_export_url
end

View file

@ -134,8 +134,14 @@ Rails.application.routes.draw do
end
resource :delete, only: [:show, :destroy]
resource :migration, only: [:show, :update]
resource :migration, only: [:show, :create] do
collection do
post :cancel
end
end
resources :aliases, only: [:index, :create, :destroy]
resources :sessions, only: [:destroy]
resources :featured_tags, only: [:index, :create, :destroy]
end