38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
||
{% block title %}Apps – LaunchPad Admin{% endblock %}
|
||
{% block content %}
|
||
<div class="header-row">
|
||
<h1>Apps</h1>
|
||
<a class="btn" href="{{ url_for('app_create') }}">+ Add App</a>
|
||
</div>
|
||
|
||
{% if apps %}
|
||
<table class="table">
|
||
<thead>
|
||
<tr>
|
||
<th>ID</th><th>Icon</th><th>Name</th><th>URL</th><th>Enabled</th><th>Created</th><th>Actions</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{% for a in apps %}
|
||
<tr>
|
||
<td>{{ a.id }}</td>
|
||
<td>{% if a.image %}<img src="{{ a.image }}" alt="{{ a.name }}" class="icon"/>{% else %}-{% endif %}</td>
|
||
<td>{{ a.name }}</td>
|
||
<td><a href="{{ a.url }}" target="_blank" rel="noopener">{{ a.url }}</a></td>
|
||
<td>{{ 'Yes' if a.enabled else 'No' }}</td>
|
||
<td>{{ a.created_at }}</td>
|
||
<td class="actions">
|
||
<a class="btn small" href="{{ url_for('app_edit', app_id=a.id) }}">Edit</a>
|
||
<form method="post" action="{{ url_for('app_delete', app_id=a.id) }}" onsubmit="return confirm('Delete this app?')" style="display:inline-block">
|
||
<button class="btn danger small" type="submit">Delete</button>
|
||
</form>
|
||
</td>
|
||
</tr>
|
||
{% endfor %}
|
||
</tbody>
|
||
</table>
|
||
{% else %}
|
||
<p>No apps yet. Click “Add App” to create your first one.</p>
|
||
{% endif %}
|
||
{% endblock %} |