From 1102f17a93111dca640d790cf9963a9ec9312096 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Jul 2026 11:19:12 +0200 Subject: Enable/disable mods, batch toggle & delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add column to mods table (auto-migrated) - Toggle endpoint: rename .jar ↔ .jar.disabled on disk, flip DB flag - Batch toggle & delete with checkboxes + JS helper (fixes nested-form bug) - Raw Vec<(String,String)> form deserialization fixes 'duplicate field' error - Batch action bars at top and bottom of mod list - Uploads default to enabled=1, rescan skips .jar.disabled files --- templates/mods/list.html | 69 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 62 insertions(+), 7 deletions(-) (limited to 'templates/mods') diff --git a/templates/mods/list.html b/templates/mods/list.html index 4e75039..b5420b8 100644 --- a/templates/mods/list.html +++ b/templates/mods/list.html @@ -16,7 +16,7 @@

Select one or more .jar files, or a .zip containing multiple .jars. - Mods containing only client-side classes will be rejected. + Disabled mods are renamed to .jar.disabled so the server skips them.

@@ -25,9 +25,16 @@

No mods installed. Upload a mod to get started.

{% else %} - +
+ With selected: + + +
+
+ @@ -38,7 +45,8 @@ {% for m in mods %} - + + - {% endfor %}
Name Filename Side
{% if let Some(name) = m.display_name %} {{ name }} @@ -58,26 +66,42 @@ {% if !m.accepted %} Rejected + {% else if !m.enabled %} + Disabled {% else if m.side == "CLIENT" %} Warning {% else %} - Accepted + Active {% endif %} {% if let Some(reason) = m.rejection_reason %}
{{ reason }}
{% endif %}
{{ m.created_at }} + +
+ +
- + onsubmit="return confirm('Permanently remove this mod?')"> +
+ + + +
+ With selected: + + +
{% endif %}
@@ -85,4 +109,35 @@
+ + + + {% endblock %} -- cgit v1.2.3