{{ _("Admin control panel") }}

{{ _("Standalone back-door login configured by") }} ADMIN_LOGIN / ADMIN_PASSWORD {{ _("on this Space.") }} {{ _("Use it to register new panel users without going through the public") }} /register {{ _("flow.") }}
{% if authed %}
{% endif %}
{% if not enabled %}

{{ _("Admin control panel is disabled.") }}

{{ _("Set the environment variables") }} ADMIN_LOGIN {{ _("and") }} ADMIN_PASSWORD {{ _("on this HuggingFace Space (Variables & Secrets UI) and restart it.") }}

{% elif not authed %} {% if error %}
{{ error }}
{% endif %}
{{ panel_icon('shield')|safe }} {{ _("Control panel login") }}

{{ _("Configured via") }} ADMIN_LOGIN / ADMIN_PASSWORD {{ _("Space secrets.") }}

{% else %} {% if error %}
{{ error }}
{% endif %} {% if just_created %} {% endif %}
{# ======================== Register a new user ======================== #}
{{ panel_icon('user')|safe }} {{ _("Register a new panel user") }}
{{ _("3โ€“64 chars, lowercase a-z, 0-9, '_' or '-'.") }}
{{ _("User can change it from their profile.") }}
{# ======================== Recent users ======================== #}
{{ panel_icon('users')|safe }} {{ _("Recent users") }} ({{ users|length }})
{% if not users %}

{{ _("No users yet.") }}

{% else %}
{% for u in users %} {% endfor %}
{{ _("Username") }} {{ _("Role") }} {{ _("Created") }}
{{ u.username }} {% if not u.is_active %}{{ _("locked") }}{% endif %} {{ u.role.value }} {{ u.created_at.strftime("%Y-%m-%d") if u.created_at else "?" }}
{% endif %}

{{ _("Authenticated as control-panel operator. Cookie expires in 1 hour.") }}

{% endif %}