From 74d2ada067bd2fd9436710ab7ac260e0eddf1314 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Jul 2026 01:03:24 +0200 Subject: Add per-instance mod management with client-side detection - New mod validation engine (src/mods.rs) with constant-pool class-file scanning: detects server-side content (block, tileentity, command, worldgen) vs client-only API (gui, renderer, forge/client) - 7 client-only mods correctly detected (AppleSkin, CraftingTweaks, Durability101, EnchantmentDescriptions, InventoryHUD, MouseTweaks, TrashSlot); 51 server-capable; 1 unknown - Routes + templating for mod upload (jar/zip), listing, delete, rescan - Multipart upload with 500MB limit (bypasses axum's default 2MB) - Per-instance mod summary card on edit page - Whitelist toggle checkbox on edit page (persisted, drives ENABLE_WHITELIST) - Dynamic Java image tag (java8/java17/java21) based on MC version - Class scan is informational-only; rejection based on metadata side=CLIENT - has_modpack flag cleanup on mod delete - Remove hx-boost from (was corrupting multipart uploads) --- templates/instances/edit.html | 349 ++++++++++++++++++++++++++++++++---------- 1 file changed, 271 insertions(+), 78 deletions(-) (limited to 'templates/instances') diff --git a/templates/instances/edit.html b/templates/instances/edit.html index fdfc0e1..2660461 100644 --- a/templates/instances/edit.html +++ b/templates/instances/edit.html @@ -1,94 +1,287 @@ -{% extends "base.html" %} -{% block content %} +{% extends "base.html" %} {% block content %}

Edit: {{ instance.name }}

-
- Version: {{ instance.version }} - Type: {{ instance.server_type }} - World: {{ instance.world_source }} - {% if let Some(seed) = current_seed %} - Seed: {{ seed }} - {% endif %} - {% if instance.has_modpack %} - Modpack: Installed - {% endif %} -
+
+ Version: {{ instance.version }} + Type: {{ instance.server_type }} + World: {{ instance.world_source }} + {% if let Some(seed) = current_seed %} + Seed: {{ seed }} + {% endif %} {% if instance.has_modpack %} + Modpack: Installed + {% endif %} +
-
- Server Properties - - - - - - -
+
+ Server Properties + + + + + + + +
-
- - Cancel -
+
+ + Cancel +
-
-

World Management

+
+

World Management

- {% if instance.is_active %} -
Stop the server before managing the world.
- {% endif %} + {% if instance.is_active %} +
Stop the server before managing the world.
+ {% endif %} -
- Current seed: - {% if let Some(seed) = current_seed %} - {{ seed }} - {% else %} - not yet generated - {% endif %} - -
+
+ Current seed: + {% if let Some(seed) = current_seed %} {{ seed }} {% else %} + not yet generated + {% endif %} + +
-
- Export World +
+ Export World -
- - -
+
+ + +
+ +
+ + +
+
+
-
- - -
-
+
+

Mods

+
+ + {% if instance.has_modpack %} + {{ mod_count }} mod{% if mod_count != 1 %}s{% endif %} + installed {% if rejected_count > 0 %} ({{ rejected_count }} + rejected) {% endif %} {% else %} No mods installed {% endif %} + +
+
{% endblock %} -- cgit v1.2.3