{% trans %}You can now set up your legacy XMPP client with the above address and the password you chose during registration.{% endtrans %}
{% trans login_url=url_for('main.login') %}You can now safely close this page, or log in to the web portal to manage your account.{% endtrans %}
+ + {% if migration_success %} +{% trans %}Congratulations! Your account data has been successfully imported.{% endtrans %}
+ {% endif %} + + {% if form %} +{% trans %}If you are moving from a different Snikket instance or another XMPP-compatible service, you may optionally import the data (contacts, profile information, etc.) from your previous account. When you have exported the data from your previous account, upload it using the form below.{% endtrans %}
+ + + {% endif %} {% endblock %} diff --git a/snikket_web/user.py b/snikket_web/user.py index eb9e278..c8c1ed7 100644 --- a/snikket_web/user.py +++ b/snikket_web/user.py @@ -77,6 +77,16 @@ class ProfileForm(BaseForm): ) +class ImportAccountDataForm(BaseForm): + account_data_file = wtforms.FileField( + _l("Account data") + ) + + action_upload = wtforms.SubmitField( + _l("Upload"), + ) + + @bp.route("/") @client.require_session() async def index() -> str: diff --git a/tools/icons.list b/tools/icons.list index b68f97d..050a9e5 100644 --- a/tools/icons.list +++ b/tools/icons.list @@ -17,6 +17,7 @@ content/content_copy:copy content/link_off:remove_link content/send:send file/file_download:download +file/file_upload:upload file/folder:folder navigation/arrow_back:back navigation/arrow_forward:forward