diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-12 19:38:03 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-12 19:38:03 +0200 |
| commit | ae7ef10b67737f08a86743f687bca30a12e9e17a (patch) | |
| tree | 056539ab76b801559dc8d07ee6599220e2bd8e07 /templates/instances/list.html | |
| parent | architecture (diff) | |
| download | minecraft-ui-ae7ef10b67737f08a86743f687bca30a12e9e17a.tar.gz minecraft-ui-ae7ef10b67737f08a86743f687bca30a12e9e17a.zip | |
first stable
Diffstat (limited to 'templates/instances/list.html')
| -rw-r--r-- | templates/instances/list.html | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/instances/list.html b/templates/instances/list.html new file mode 100644 index 0000000..b8b2337 --- /dev/null +++ b/templates/instances/list.html | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | {% extends "base.html" %} | ||
| 2 | {% block content %} | ||
| 3 | <div class="page-header"> | ||
| 4 | <h1>Server Instances</h1> | ||
| 5 | <a href="/instances/new" class="btn">Create Instance</a> | ||
| 6 | </div> | ||
| 7 | |||
| 8 | {% if instances.is_empty() %} | ||
| 9 | <div class="card card-muted"> | ||
| 10 | <p>No instances yet. Create one to get started.</p> | ||
| 11 | </div> | ||
| 12 | {% else %} | ||
| 13 | <div class="instance-grid"> | ||
| 14 | {% for inst in instances %} | ||
| 15 | <div class="card {% if inst.is_active %}card-active{% endif %}"> | ||
| 16 | {% if inst.is_active %} | ||
| 17 | <div class="active-badge">ACTIVE</div> | ||
| 18 | {% endif %} | ||
| 19 | <h3>{{ inst.name }}</h3> | ||
| 20 | <div class="meta"> | ||
| 21 | <span>{{ inst.version }}</span> | ||
| 22 | <span class="tag">{{ inst.server_type }}</span> | ||
| 23 | {% if inst.has_modpack %} | ||
| 24 | <span class="tag">Modded</span> | ||
| 25 | {% endif %} | ||
| 26 | </div> | ||
| 27 | <div class="actions"> | ||
| 28 | {% if !inst.is_active %} | ||
| 29 | <form action="/instances/{{ inst.id }}/activate" method="post" style="display:inline"> | ||
| 30 | <button type="submit" class="btn-ok">Activate</button> | ||
| 31 | </form> | ||
| 32 | {% else %} | ||
| 33 | <form action="/instances/deactivate" method="post" style="display:inline"> | ||
| 34 | <button type="submit" class="btn-danger">Deactivate</button> | ||
| 35 | </form> | ||
| 36 | {% endif %} | ||
| 37 | <a href="/instances/{{ inst.id }}/edit" class="btn">Edit</a> | ||
| 38 | <a href="/instances/{{ inst.id }}/backups" class="btn">Backups</a> | ||
| 39 | {% if !inst.is_active %} | ||
| 40 | <form action="/instances/{{ inst.id }}/delete" method="post" style="display:inline" | ||
| 41 | onsubmit="return confirm('Delete instance {{ inst.name }}? This cannot be undone.')"> | ||
| 42 | <button type="submit" class="btn-danger">Delete</button> | ||
| 43 | </form> | ||
| 44 | {% endif %} | ||
| 45 | </div> | ||
| 46 | </div> | ||
| 47 | {% endfor %} | ||
| 48 | </div> | ||
| 49 | {% endif %} | ||
| 50 | {% endblock %} | ||
