mirror of
https://github.com/perstarkse/minne.git
synced 2026-05-22 15:47:20 +02:00
55 lines
2.3 KiB
HTML
55 lines
2.3 KiB
HTML
{% block active_jobs_section %}
|
|
<ul id="active_jobs_section" class="list ">
|
|
<li class="p-4 pb-2 text-xs opacity-60 tracking-wide">Active Jobs</li>
|
|
{% for item in active_jobs %}
|
|
<li class="list-row">
|
|
<div class="bg-secondary rounded-box size-10 flex justify-center items-center text-secondary-content">
|
|
{% if item.content.Url %}
|
|
{% include "icons/globe_icon.html" %}
|
|
{% elif item.content.File %}
|
|
{% include "icons/document_icon.html" %}
|
|
{% else %}
|
|
{% include "icons/chat_icon.html" %}
|
|
{% endif %}
|
|
</div>
|
|
<div>
|
|
<div class="uppercase">
|
|
{% if item.status.InProgress %}
|
|
In Progress, attempt {{item.status.InProgress.attempts}}
|
|
{% else %}
|
|
{{item.status}}
|
|
{% endif %}
|
|
</div>
|
|
<div class="text-xs font-semibold opacity-60">
|
|
{{item.created_at|datetimeformat(format="short", tz=user.timezone)}} </div>
|
|
</div>
|
|
<p class="list-col-wrap text-xs [&:before]:content-['Content:_'] [&:before]:uppercase [&:before]:opacity-60">
|
|
{% if item.content.Url %}
|
|
{{item.content.Url.url}}
|
|
{% elif item.content.File %}
|
|
{{item.content.File.file_info.file_name}}
|
|
{% else %}
|
|
{{item.content.Text.text}}
|
|
{% endif %}
|
|
</p>
|
|
<!-- <button class="btn disabled btn-square btn-ghost"> -->
|
|
<!-- <svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> -->
|
|
<!-- <g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor"> -->
|
|
<!-- <path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75z"></path> -->
|
|
<!-- <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75z"></path> -->
|
|
<!-- </g> -->
|
|
<!-- </svg> -->
|
|
<!-- </button> -->
|
|
<button hx-delete="/jobs/{{item.id}}" hx-target="#active_jobs_section" hx-swap="outerHTML"
|
|
class="btn btn-square btn-ghost">
|
|
<svg class="size-[1.2em]" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
|
<g stroke-linejoin="round" stroke-linecap="round" stroke-width="2" fill="none" stroke="currentColor">
|
|
<path d="M3 6h18"></path>
|
|
<path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path>
|
|
</g>
|
|
</svg>
|
|
</button>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endblock %} |