{% extends "indy_hub/base.html" %} {% load i18n %} {% load static %} {% block page_title %}{% trans "Token Management" %}{% endblock page_title %} {% block extra_css %} {% endblock extra_css %} {% block content %}
{% include "indy_hub/includes/popup.html" %}
{% trans "ESI tokens" %}

{% trans "Token Management" %}

{% trans "Keep your characters and corporations synchronized with the scopes Indy Hub needs." %}

{% trans "ESI overview" %}

{% trans "Check what is authorized and add the missing scopes." %}

{% trans "Blueprint tokens" %} {{ blueprint_token_count|default:0 }}
{% trans "Industry tokens" %} {{ jobs_token_count|default:0 }}
{% trans "Characters connected" %} {{ characters|length }}
{% with total_chars=characters|length blueprint_active=blueprint_token_count|default:0 jobs_active=jobs_token_count|default:0 %}
{% if total_chars %} {% if blueprint_active == total_chars %} {% trans "All characters share blueprint scope" %} {% elif blueprint_active %} {% blocktrans with authorized=blueprint_active total=total_chars %}{{ authorized }} of {{ total }} characters share blueprints{% endblocktrans %} {% else %} {% trans "No blueprint scopes authorized yet" %} {% endif %} {% if jobs_active == total_chars %} {% trans "All characters share industry scope" %} {% elif jobs_active %} {% blocktrans with authorized=jobs_active total=total_chars %}{{ authorized }} of {{ total }} characters share industry data{% endblocktrans %} {% else %} {% trans "No industry scopes authorized yet" %} {% endif %} {% else %} {% trans "No characters connected yet" %} {% endif %} {% if can_manage_corporate_assets %} {% with corp_total=corp_count|default:0 corp_bp=corp_blueprint_scope_count|default:0 corp_jobs=corp_jobs_scope_count|default:0 %} {% if corp_total %} {% if corp_bp == corp_total %} {% trans "All corporations share blueprints" %} {% elif corp_bp %} {% blocktrans with authorized=corp_bp total=corp_total %}{{ authorized }} of {{ total }} corporations share blueprints{% endblocktrans %} {% else %} {% trans "No corporation blueprint scopes active" %} {% endif %} {% if corp_jobs == corp_total %} {% trans "All corporations share industry data" %} {% elif corp_jobs %} {% blocktrans with authorized=corp_jobs total=corp_total %}{{ authorized }} of {{ total }} corporations share jobs{% endblocktrans %} {% else %} {% trans "No corporation industry scopes active" %} {% endif %} {% else %} {% trans "No corporation access configured" %} {% endif %} {% endwith %} {% endif %}
{% endwith %}
{% trans "Character scopes" %}
{{ characters|length }}

{% trans "Authorize or refresh personal access for blueprints and industry jobs." %}

{% if can_manage_corporate_assets %}
{% trans "Corporation scopes" %}
{{ corp_count|default:0 }}

{% trans "Directors can share corporate blueprints and jobs from a single place." %}

{% if corp_blueprint_auth_url %} {% trans "Authorize corp blueprints" %} {% endif %} {% if corp_jobs_auth_url %} {% trans "Authorize corp jobs" %} {% endif %} {% if corp_all_auth_url %} {% trans "Authorize all corp scopes" %} {% endif %}
{% endif %}

{% trans "Character access" %}

{% trans "Blueprint and industry tokens per pilot." %}

{% trans "Badges mark scopes per pilot; use the overview actions above to resolve missing access." %}

{% for char in characters %} {% empty %} {% endfor %}
{% trans "Character" %} {% trans "Blueprint sync" %} {% trans "Jobs sync" %}
{{ char.name }} {{ char.name }}
{% trans "No characters found." %}
{% if can_manage_corporate_assets %}

{% trans "Corporation sharing" %}

{% trans "Directors keep corp blueprints and jobs available for the team." %}

{% trans "Who should authorize?" %}

{% trans "Use trusted directors with the required roles because corporate tokens expose hangar blueprints and job data to Indy Hub." %}

{{ corp_count|default:0 }}
{% if corporation_sharing %}
{% trans "Blueprints synced" %} {{ corporation_sharing.total_blueprints|default:0 }}
{% trans "Jobs tracked" %} {{ corporation_sharing.total_jobs|default:0 }}
{% endif %}
{% trans "Required roles" %}
    {% if corporation_sharing %}
  • {% trans "Director or station manager roles" %}
  • {{ corporation_sharing.scopes.blueprints }}
  • {{ corporation_sharing.scopes.jobs }}
  • {% if corporation_sharing.scopes.structures %}
  • {{ corporation_sharing.scopes.structures }} {% trans "(optional - structure names)" %}
  • {% endif %} {% else %}
  • {% trans "Grant director-level access to enable corporate syncing." %}
  • {% endif %}

{% trans "Use the corporation scopes above to grant or refresh access." %}

{% trans "Sync overview" %}

{% trans "Track which corporations are covered and who authorised them." %}

{% if corporation_sharing and not corporation_sharing.has_authorised_characters %} {% trans "No authorized pilots yet" %} {% endif %}
{% trans "Blueprint tokens" %} {{ corp_blueprint_scope_count|default:0 }}/{{ corp_count|default:0 }}
{% trans "Industry tokens" %} {{ corp_jobs_scope_count|default:0 }}/{{ corp_count|default:0 }}

{% trans "Missing scopes stay highlighted until a director refreshes access from the overview actions." %}

{% if corporation_sharing %} {% for corp in corporation_sharing.corporations %} {% empty %} {% endfor %} {% else %} {% endif %}
{% trans "Corporation" %} {% trans "Blueprints" %} {% trans "Industry" %} {% trans "Updated" %}
{{ corp.name }}
ID {{ corp.corporation_id }}
{% if corp.authorization.restricted %}
{% if corp.authorization.characters %} {% trans "Whitelisted" %}: {% for pilot in corp.authorization.characters %} {{ pilot.name|default:pilot.id }}{% if not forloop.last %}, {% endif %} {% endfor %} {% else %} {% trans "Whitelisted" %}: {% trans "no pilots selected" %} {% endif %}
{% endif %}
{% if corp.blueprints.token.has_scope %} {{ corp.blueprints.token.character_name|default:_("Authorised") }}
{% blocktrans with total=corp.blueprints.total %}{{ total }} blueprints{% endblocktrans %}
{% else %} {% trans "Missing" %} {% endif %}
{% if corp.jobs.token.has_scope %} {{ corp.jobs.token.character_name|default:_("Authorised") }}
{% blocktrans with total=corp.jobs.total %}{{ total }} jobs{% endblocktrans %}
{% else %} {% trans "Missing" %} {% endif %}
{% trans "Blueprints" %}: {{ corp.blueprints.last_sync|date:"SHORT_DATETIME_FORMAT"|default:"-" }}
{% trans "Jobs" %}: {{ corp.jobs.last_sync|date:"SHORT_DATETIME_FORMAT"|default:"-" }}
{% trans "No corporation data detected yet. Authorize a director or factory manager to begin syncing." %}
{% trans "No corporation data detected yet. Authorize a director or factory manager to begin syncing." %}
{% endif %}

{% trans "Help & resources" %}

{% trans "Understand how ESI authorization fits into Indy Hub." %}

{% trans "Secure authorization" %}

{% trans "All authorization is handled securely through CCP's official ESI API using OAuth 2.0 standards." %}

{% trans "Automatic updates" %}

{% trans "Your data is automatically synchronized with EVE Online, ensuring you always have the latest information." %}

{% trans "Privacy protected" %}

{% trans "Only the data you specifically authorize will be accessed. You can revoke access at any time." %}

{% trans "Getting started" %}

{% trans "To use Indy Hub effectively, authorize both blueprint and industry jobs access:" %}

  1. {% trans "Use the buttons above to choose the scopes you need" %}
  2. {% trans "Log in via EVE Online's secure portal" %}
  3. {% trans "Select the characters or corporations to authorize" %}
  4. {% trans "Return here to confirm that sync is active" %}
{% block extra_javascript %} {% endblock extra_javascript %} {% endblock content %}