{% extends 'base.html' %} {% block title %}{{ t.settings_title }} — PickkerMarket{% endblock %} {% block content %}
{{ t.settings_kicker }}

{{ t.settings_title }}

{{ t.settings_edit_profile_title }}

{{ t.settings_edit_profile_desc }}

{{ t.settings_edit_profile_link }}
{% if api_keys is not None %}

{{ t.api_subscription_title }}

{{ t.api_subscription_intro }}

{% if api_subscription %} {% if api_subscription.status == 'active' %}{{ t.api_subscription_status_active }} {% elif api_subscription.status == 'suspended' %}{{ t.api_subscription_status_suspended }} {% else %}{{ t.api_subscription_status_requested }}{% endif %}

{{ t.api_subscription_plan_label }}: {{ api_subscription.plan|title }}

{% else %}
{% csrf_token %}
{% endif %}

{{ t.api_keys_title }}

{{ t.api_keys_intro }}

{% if new_api_key %}

{{ t.api_key_new_value_note }}

{{ new_api_key }}
{% endif %}
{% csrf_token %}
{% for key in api_keys %}
{{ key.label|default:"—" }}

{% if key.is_active %}Active{% else %}Revoked{% endif %} · created {{ key.created_at|slice:":10" }}{% if key.last_used_at %} · last used {{ key.last_used_at|slice:":10" }}{% endif %}

{% if key.is_active %}
{% csrf_token %}
{% endif %}
{% empty %}

{{ t.api_key_no_keys }}

{% endfor %}

{{ t.api_key_docs_intro }} X-API-Key: pk_...

{% endif %}

{{ t.settings_danger_zone }}

{{ t.settings_delete_warning }}

{% csrf_token %}
{% endblock %}