From db66c911080bdc4490aff9eced1754b49d623aca Mon Sep 17 00:00:00 2001
From: Mira Weller {% trans "Enable two-factor authentication" %}
@@ -11,8 +12,41 @@
{% trans "You will no longer be able to log in to pretix without one of your configured devices." %} - {% trans "Please make sure to print out or copy the emergency tokens and store them in a safe place." %}
+ {% if new_emergency_tokens %} ++ {% blocktrans trimmed %} + If you lose access to your devices, you can use one of your emergency tokens to log in. + We recommend to store them in a safe place, e.g. printed out or in a password manager. + Every token can be used at most once. + {% endblocktrans %} +
++ +
++ {% icon "info-circle" %} + {% blocktrans trimmed with generation_date_time=static_tokens_device.created_at %} + You generated your emergency tokens on {{ generation_date_time }}. + {% endblocktrans %} +
+ {% endif %}+ {% icon "info-circle" %} {% blocktrans trimmed with generation_date_time=static_tokens_device.created_at %} You generated your emergency tokens on {{ generation_date_time }}. {% endblocktrans %}
- {% else %} + + + {% trans "Generate new emergency tokens" %} + + {% elif user.require_2fa %}- {% trans "You don't have any emergency tokens yet." %} + {% icon "warning" %} + {% trans "You don't have any emergency tokens yet." %} +
+ + + {% trans "Generate emergency tokens" %} + + {% else %} ++ {% icon "info-circle" %} + {% trans "Emergency tokens will be generated when you enable two-factor authentication." %}
{% endif %} - - - {% trans "Generate new emergency tokens" %} -