<!doctype html>
<html lang="en" data-theme="{{ page.theme }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="htmx-config" content='{"allowEval":false,"includeIndicatorStyles":false}'>
{% if title == "Inbox" %}
<title>{{ self.needs_you() }} need you · thirdshift Console</title>
<link rel="icon" href="/assets/favicon{% if self.urgent() %}-urgent{% endif %}.svg">
{% else %}
<title>{{ title }} · {{ page.hostname }} · thirdshift</title>
<link rel="icon" href="data:,">
{% endif %}
<link rel="stylesheet" href="/assets/console.css">
<script src="/assets/vendor/htmx-2.0.7.min.js" defer></script>
<script src="/assets/vendor/htmx-ext-sse-2.2.3.js" defer></script>
<script src="/assets/vendor/idiomorph-0.7.4.min.js" defer></script>
<script src="/assets/console.js" type="module"></script>
</head>
<body>
{% include "console/header.html" %}
{% include "console/nav.html" %}
<main {% if title == "Inbox" %}id="inbox"{% endif %}>
<div class="page-title"><h2>{{ title }}</h2><code>{{ cli }}</code></div>
{% match archive %}{% when Some with (archive) %}
{% if title == "History" %}
<form method="get">
<input type="hidden" name="page" value="history">
<label>Outcome <select name="outcome"><option value="">Every outcome</option>{% for value in archive.outcomes %}<option {% if value.as_str() == outcome.as_str() %}selected{% endif %}>{{ value }}</option>{% endfor %}</select></label>
<label>Repository <select name="repository"><option value="">Every repository</option>{% for value in archive.repositories %}<option {% if value.as_str() == repository.as_str() %}selected{% endif %}>{{ value }}</option>{% endfor %}</select></label>
<button>Filter</button>
</form>
{% endif %}
<details class="group archive" data-group="{{ title }}" open><summary>{{ title }} <span class="count">{{ archive.rows.len() }}</span></summary>
{% if archive.rows.is_empty() %}<p class="empty">Nothing here.</p>{% endif %}
<ul class="commands">{% for item in archive.rows %}{{ self.row(item)|safe }}{% endfor %}</ul>
</details>
{% when None %}
{% match inbox.warning %}{% when Some with (warning) %}<p role="status">Warning: {{ warning }}</p>{% when None %}{% endmatch %}
{% for section in inbox.sections %}
<details id="group-{{ loop.index }}" class="group" data-group="{{ section.group }}" {% if self.hidden(section.group) %}hidden{% endif %} {% if section.open %}open{% endif %}>
<summary><span>{{ section.title }}</span><span class="count">{{ section.rows.len() }}</span></summary>
{% if section.rows.is_empty() && section.references.is_empty() %}<p class="empty">Nothing here.</p>{% endif %}
{# Only the rendered, auto-escaped RowTemplate is trusted as HTML. #}
<ul class="commands">{% for item in section.rows %}{{ self.row(item)|safe }}{% endfor %}</ul>
{% for reference in section.references %}<p>{{ reference|linkify }}</p>{% endfor %}
</details>
{% endfor %}
{% if !inbox.idle_passes.is_empty() %}<aside aria-label="Idle Passes">{% for pass in inbox.idle_passes %}<p>{{ pass|linkify }}</p>{% endfor %}</aside>{% endif %}
{% endmatch %}
</main>
{% include "console/chrome.html" %}
</body>
</html>