feat: add logs

This commit is contained in:
HRG @ SCExC 2024-10-29 21:29:40 -04:00
parent c40bdcbbed
commit 305bf8b571
11 changed files with 690 additions and 468 deletions

6
views/workshop/logs.eta Normal file
View file

@ -0,0 +1,6 @@
<div hx-swap="outerHTML" hx-get="/workshop/<%= it.structId %>/route/<%= it.routeId %>/logs?since=<%= it.since || 0 %>" hx-trigger="every 2s" class="hidden"></div>
<% it.logs.forEach((log) => { %>
<div class="<% if (log.error) { %>bg-red-800 text-white <% } %>">
<%= log.content %>
</div>
<% }) %>