summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/dashboard.html2
-rw-r--r--templates/instances/edit.html18
2 files changed, 13 insertions, 7 deletions
diff --git a/templates/dashboard.html b/templates/dashboard.html
index 571a43e..4324526 100644
--- a/templates/dashboard.html
+++ b/templates/dashboard.html
@@ -17,6 +17,8 @@
17 Running 17 Running
18 {% else if container_state == "pulling" %} 18 {% else if container_state == "pulling" %}
19 Pulling image… 19 Pulling image…
20 {% else if container_state == "booting" %}
21 Booting…
20 {% else if container_state == "starting" %} 22 {% else if container_state == "starting" %}
21 Starting… 23 Starting…
22 {% else if container_state == "stopped" %} 24 {% else if container_state == "stopped" %}
diff --git a/templates/instances/edit.html b/templates/instances/edit.html
index b6c982c..fdfc0e1 100644
--- a/templates/instances/edit.html
+++ b/templates/instances/edit.html
@@ -60,9 +60,13 @@
60 </div> 60 </div>
61</form> 61</form>
62 62
63<div class="card" style="margin-top:1.5rem"> 63<div class="card{% if instance.is_active %} card-muted{% endif %}" style="margin-top:1.5rem">
64 <h3>World Management</h3> 64 <h3>World Management</h3>
65 65
66 {% if instance.is_active %}
67 <div class="flash flash-warn">Stop the server before managing the world.</div>
68 {% endif %}
69
66 <div class="meta" style="margin-bottom:1rem"> 70 <div class="meta" style="margin-bottom:1rem">
67 <span><strong>Current seed:</strong> 71 <span><strong>Current seed:</strong>
68 {% if let Some(seed) = current_seed %} 72 {% if let Some(seed) = current_seed %}
@@ -73,17 +77,17 @@
73 </span> 77 </span>
74 </div> 78 </div>
75 79
76 <div class="actions" style="flex-wrap:wrap; gap:1rem"> 80 <div class="actions" style="flex-wrap:wrap; gap:1rem; {% if instance.is_active %}pointer-events:none; opacity:0.5{% endif %}">
77 <a href="/instances/{{ instance.id }}/world/export" class="btn" hx-boost="false">Export World</a> 81 <a href="/instances/{{ instance.id }}/world/export" class="btn" hx-boost="false"{% if instance.is_active %} tabindex="-1"{% endif %}>Export World</a>
78 82
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"> 83 <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"> 84 <input type="file" name="world_zip" accept=".zip" required style="font-size:0.85rem"{% if instance.is_active %} disabled{% endif %}>
81 <button type="submit" class="btn" onclick="return confirm('This will replace the current world. Continue?')">Import</button> 85 <button type="submit" class="btn" onclick="return confirm('This will replace the current world. Continue?')"{% if instance.is_active %} disabled{% endif %}>Import</button>
82 </form> 86 </form>
83 87
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?')"> 88 <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"> 89 <input type="text" name="seed" placeholder="Seed (empty = random)" style="width:180px"{% if instance.is_active %} disabled{% endif %}>
86 <button type="submit" class="btn-danger">Regenerate</button> 90 <button type="submit" class="btn-danger"{% if instance.is_active %} disabled{% endif %}>Regenerate</button>
87 </form> 91 </form>
88 </div> 92 </div>
89</div> 93</div>