diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-12 21:35:25 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-12 21:35:25 +0200 |
| commit | 9ad52d0151086252e6d8a3e60dc5b8cd4bfd5465 (patch) | |
| tree | 2e638c274e0ab9dc4f3812e8ece6c603d854e1fd /templates | |
| parent | first stable (diff) | |
| download | minecraft-ui-9ad52d0151086252e6d8a3e60dc5b8cd4bfd5465.tar.gz minecraft-ui-9ad52d0151086252e6d8a3e60dc5b8cd4bfd5465.zip | |
second stable
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/backups/list.html | 3 | ||||
| -rw-r--r-- | templates/instances/edit.html | 30 |
2 files changed, 30 insertions, 3 deletions
diff --git a/templates/backups/list.html b/templates/backups/list.html index d7508eb..d97e98d 100644 --- a/templates/backups/list.html +++ b/templates/backups/list.html | |||
| @@ -6,7 +6,6 @@ | |||
| 6 | <form action="/instances/{{ instance_id }}/backups/create" method="post" style="display:inline"> | 6 | <form action="/instances/{{ instance_id }}/backups/create" method="post" style="display:inline"> |
| 7 | <button type="submit" class="btn-ok">Create Backup</button> | 7 | <button type="submit" class="btn-ok">Create Backup</button> |
| 8 | </form> | 8 | </form> |
| 9 | <a href="/instances/{{ instance_id }}/world/export" class="btn">Export World</a> | ||
| 10 | <a href="/instances" class="btn">Back to Instances</a> | 9 | <a href="/instances" class="btn">Back to Instances</a> |
| 11 | </div> | 10 | </div> |
| 12 | </div> | 11 | </div> |
| @@ -30,7 +29,7 @@ | |||
| 30 | <td>{{ backup.filename }}</td> | 29 | <td>{{ backup.filename }}</td> |
| 31 | <td>{{ backup.created_at }}</td> | 30 | <td>{{ backup.created_at }}</td> |
| 32 | <td> | 31 | <td> |
| 33 | <a href="/backups/{{ backup.id }}/download" class="btn-sm">Download</a> | 32 | <a href="/backups/{{ backup.id }}/download" class="btn-sm" hx-boost="false">Download</a> |
| 34 | <form action="/backups/{{ backup.id }}/restore" method="post" style="display:inline"> | 33 | <form action="/backups/{{ backup.id }}/restore" method="post" style="display:inline"> |
| 35 | <button type="submit" class="btn-sm btn-ok">Restore</button> | 34 | <button type="submit" class="btn-sm btn-ok">Restore</button> |
| 36 | </form> | 35 | </form> |
diff --git a/templates/instances/edit.html b/templates/instances/edit.html index 356c7cd..b6c982c 100644 --- a/templates/instances/edit.html +++ b/templates/instances/edit.html | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | <span><strong>Version:</strong> {{ instance.version }}</span> | 7 | <span><strong>Version:</strong> {{ instance.version }}</span> |
| 8 | <span><strong>Type:</strong> {{ instance.server_type }}</span> | 8 | <span><strong>Type:</strong> {{ instance.server_type }}</span> |
| 9 | <span><strong>World:</strong> {{ instance.world_source }}</span> | 9 | <span><strong>World:</strong> {{ instance.world_source }}</span> |
| 10 | {% if let Some(seed) = instance.world_seed %} | 10 | {% if let Some(seed) = current_seed %} |
| 11 | <span><strong>Seed:</strong> {{ seed }}</span> | 11 | <span><strong>Seed:</strong> {{ seed }}</span> |
| 12 | {% endif %} | 12 | {% endif %} |
| 13 | {% if instance.has_modpack %} | 13 | {% if instance.has_modpack %} |
| @@ -59,4 +59,32 @@ | |||
| 59 | <a href="/instances" class="btn">Cancel</a> | 59 | <a href="/instances" class="btn">Cancel</a> |
| 60 | </div> | 60 | </div> |
| 61 | </form> | 61 | </form> |
| 62 | |||
| 63 | <div class="card" style="margin-top:1.5rem"> | ||
| 64 | <h3>World Management</h3> | ||
| 65 | |||
| 66 | <div class="meta" style="margin-bottom:1rem"> | ||
| 67 | <span><strong>Current seed:</strong> | ||
| 68 | {% if let Some(seed) = current_seed %} | ||
| 69 | {{ seed }} | ||
| 70 | {% else %} | ||
| 71 | <em>not yet generated</em> | ||
| 72 | {% endif %} | ||
| 73 | </span> | ||
| 74 | </div> | ||
| 75 | |||
| 76 | <div class="actions" style="flex-wrap:wrap; gap:1rem"> | ||
| 77 | <a href="/instances/{{ instance.id }}/world/export" class="btn" hx-boost="false">Export World</a> | ||
| 78 | |||
| 79 | <form action="/instances/{{ instance.id }}/world/import" method="post" enctype="multipart/form-data" style="display:flex;align-items:center;gap:0.5rem" hx-boost="false"> | ||
| 80 | <input type="file" name="world_zip" accept=".zip" required style="font-size:0.85rem"> | ||
| 81 | <button type="submit" class="btn" onclick="return confirm('This will replace the current world. Continue?')">Import</button> | ||
| 82 | </form> | ||
| 83 | |||
| 84 | <form action="/instances/{{ instance.id }}/world/regenerate" method="post" class="form-row" onsubmit="return confirm('This will DELETE the current world and generate a new one. Continue?')"> | ||
| 85 | <input type="text" name="seed" placeholder="Seed (empty = random)" style="width:180px"> | ||
| 86 | <button type="submit" class="btn-danger">Regenerate</button> | ||
| 87 | </form> | ||
| 88 | </div> | ||
| 89 | </div> | ||
| 62 | {% endblock %} | 90 | {% endblock %} |
