diff options
Diffstat (limited to 'templates/instances')
| -rw-r--r-- | templates/instances/edit.html | 30 |
1 files changed, 29 insertions, 1 deletions
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 %} |
