{% extends "base.html" %}

{% block title %}
	{% if "error" in info or info.status == "FAILURE" or info.status == "REVOKED" %}
		{{ _("Task Failed") }}
	{% else %}
		{{ _("Working…") }}
	{% endif %}
{% endblock %}

{% block content %}
	<h1>{{ self.title() }}</h1>
	<article data-task-id="{{ info.id }}">
		<p id="status"></p>
		<div id="progress" class="progress d-none">
			<div class="progress-bar bg-info" role="progressbar" style="width: 50%;" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
		</div>
	</article>

	{% if "error" in info or info.status == "FAILURE" or info.status == "REVOKED" %}
		<pre style="white-space: pre-wrap; word-wrap: break-word;">{{ info.error }}</pre>
	{% else %}
		<script src="/static/js/polltask.js?v=4"></script>
		<noscript>
			{{ _("Reload the page to check for updates.") }}
		</noscript>
	{% endif %}
{% endblock %}
