blob: 356c7cdb606a42156f98ce9f85260a2a2fd19055 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
{% extends "base.html" %}
{% block content %}
<h1>Edit: {{ instance.name }}</h1>
<div class="card card-muted">
<div class="meta">
<span><strong>Version:</strong> {{ instance.version }}</span>
<span><strong>Type:</strong> {{ instance.server_type }}</span>
<span><strong>World:</strong> {{ instance.world_source }}</span>
{% if let Some(seed) = instance.world_seed %}
<span><strong>Seed:</strong> {{ seed }}</span>
{% endif %}
{% if instance.has_modpack %}
<span><strong>Modpack:</strong> Installed</span>
{% endif %}
</div>
</div>
<form action="/instances/{{ instance.id }}/edit" method="post" class="form-col">
<fieldset>
<legend>Server Properties</legend>
<label>
Memory (MB)
<input type="number" name="memory_mb" value="{{ instance.memory_mb }}" min="512" max="{{ max_memory_mb }}" required>
</label>
<label>
Difficulty
<select name="difficulty">
<option value="0" {% if instance.difficulty == 0 %}selected{% endif %}>Peaceful</option>
<option value="1" {% if instance.difficulty == 1 %}selected{% endif %}>Easy</option>
<option value="2" {% if instance.difficulty == 2 %}selected{% endif %}>Normal</option>
<option value="3" {% if instance.difficulty == 3 %}selected{% endif %}>Hard</option>
</select>
</label>
<label>
Gamemode
<select name="gamemode">
<option value="0" {% if instance.gamemode == 0 %}selected{% endif %}>Survival</option>
<option value="1" {% if instance.gamemode == 1 %}selected{% endif %}>Creative</option>
<option value="2" {% if instance.gamemode == 2 %}selected{% endif %}>Adventure</option>
<option value="3" {% if instance.gamemode == 3 %}selected{% endif %}>Spectator</option>
</select>
</label>
<label>
Max Players
<input type="number" name="max_players" value="{{ instance.max_players }}" min="1" max="100">
</label>
<label>
<input type="checkbox" name="pvp" {% if instance.pvp %}checked{% endif %}> PvP enabled
</label>
<label>
MOTD
<input type="text" name="motd" value="{{ instance.motd }}" maxlength="59">
</label>
</fieldset>
<div class="actions">
<button type="submit" class="btn-ok">Save Changes</button>
<a href="/instances" class="btn">Cancel</a>
</div>
</form>
{% endblock %}
|