{% extends "dlux/base.html" %} {% load dlux_tags %} {% block title %}{{ DLUX_STRINGS.control_link_title|default:"Control Panel" }}{% endblock %} {% block extra_head %} {{ block.super }} {% include_once "dlux/forms/assets_head.html" %} {% endblock %} {% block content %}
{{ DLUX_STRINGS.control_link_kicker|default:"Composer agent" }}

{{ DLUX_STRINGS.control_link_title|default:"Control Panel" }}

{{ DLUX_STRINGS.control_link_desc|default:"Pair this application with your central control panel — no .env editing or redeploy." }}

{% if link.enrolled %} {{ DLUX_STRINGS.control_link_connected|default:"Connected" }} {% elif link.pending %} {{ DLUX_STRINGS.control_link_pending|default:"Pairing…" }} {% else %} {{ DLUX_STRINGS.control_link_not_connected|default:"Not connected" }} {% endif %}
{% if not link.bridge_available %} {% endif %} {% if link.pending %}
{{ DLUX_STRINGS.control_link_pending_note|default:"Waiting for the agent to redeem the pairing token…" }}
{% csrf_token %}
{% endif %} {% if link.queue_error %} {% endif %} {% if link.last_enroll.state == "error" %} {% endif %}

{% if link.enrolled %}{{ DLUX_STRINGS.control_link_repair_title|default:"Pair again" }}{% else %}{{ DLUX_STRINGS.control_link_connect_title|default:"Connect to control panel" }}{% endif %}

{% if link.enrolled %}

{{ DLUX_STRINGS.control_link_repair_hint|default:"To move this app to a different control panel, pair again below with a fresh token." }}

{% else %}

{{ DLUX_STRINGS.control_link_tile_desc|default:"Pair this app with your central control panel." }}

{% endif %}
{% csrf_token %}
{{ DLUX_STRINGS.control_link_token_help|default:"Generate it in the control panel: Add application → Create enrollment token." }}
{% endblock %} {% block scripts %} {{ block.super }} {% endblock %}