mirror of
https://github.com/perstarkse/minne.git
synced 2026-03-19 16:21:30 +01:00
32 lines
1.3 KiB
HTML
32 lines
1.3 KiB
HTML
{% for task in tasks %}
|
|
<li class="list-row" hx-ext="sse" sse-connect="/task/status-stream?task_id={{task.id}}" sse-close="close_stream">
|
|
<div class="bg-secondary rounded-box size-10 flex justify-center items-center text-secondary-content"
|
|
sse-swap="stop_loading" hx-swap="innerHTML">
|
|
<span class="loading loading-spinner loading-xl"></span>
|
|
</div>
|
|
<div>
|
|
<div class="flex gap-1">
|
|
<div sse-swap="status" hx-swap="innerHTML">
|
|
Created
|
|
</div>
|
|
<div hx-get="/content/recent" hx-target="#latest_content_section" hx-swap="outerHTML"
|
|
hx-trigger="sse:update_latest_content"></div>
|
|
</div>
|
|
<div class="text-xs font-semibold opacity-60">
|
|
{{task.created_at|datetimeformat(format="short", tz=user.timezone)}} </div>
|
|
</div>
|
|
<p class="list-col-wrap text-xs [&:before]:content-['Content:_'] [&:before]:opacity-60">
|
|
{% if task.content.Url %}
|
|
{{task.content.Url.url}}
|
|
{% elif task.content.File %}
|
|
{{task.content.File.file_info.file_name}}
|
|
{% else %}
|
|
{{task.content.Text.text}}
|
|
{% endif %}
|
|
</p>
|
|
<button hx-delete="/jobs/{{task.id}}" hx-target="#active_jobs_section" hx-swap="outerHTML"
|
|
class="btn btn-square btn-ghost btn-sm">
|
|
{% include "icons/delete_icon.html" %}
|
|
</button>
|
|
</li>
|
|
{% endfor %} |