46 lines
1.3 KiB
Text
46 lines
1.3 KiB
Text
<h2>Dashboard</h2>
|
|
|
|
<div style="display:flex; gap:1rem; margin-bottom:1.5rem; flex-wrap:wrap;">
|
|
<div>
|
|
<strong>Channel:</strong>
|
|
<%= settings.channel || '<em>not set</em>' %>
|
|
</div>
|
|
<div>
|
|
<strong>Overlay URL:</strong>
|
|
<code><%= process.env.APP_BASE_URL %>/overlay/<%= settings.overlay_id %></code>
|
|
</div>
|
|
</div>
|
|
|
|
<h3>Recent activity</h3>
|
|
<% if (logs.length === 0) { %>
|
|
<p><em>No activity yet. Events will appear here once your overlay is connected and Twitch fires events.</em></p>
|
|
<% } else { %>
|
|
<figure>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Event</th>
|
|
<th>User</th>
|
|
<th>Detail</th>
|
|
<th>Actions fired</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% for (const log of logs) { %>
|
|
<tr>
|
|
<td><small><%= log.created_at %></small></td>
|
|
<td><code><%= log.event_type %></code></td>
|
|
<td><%= log.username || '—' %></td>
|
|
<td><%= log.event_detail || '—' %></td>
|
|
<td>
|
|
<span class="badge <%= log.actions_fired > 0 ? 'badge-green' : 'badge-grey' %>">
|
|
<%= log.actions_fired %>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<% } %>
|
|
</tbody>
|
|
</table>
|
|
</figure>
|
|
<% } %>
|